Last active
August 29, 2015 14:08
-
-
Save csarcom/20ded1d158b7dcb4f2cb to your computer and use it in GitHub Desktop.
Presto empty rows
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select from_unixtime(86400 + floor(to_unixtime(time) / 86400) * 86400), sum(sum) from metrics_rollup60 where name= 'bytes_sent.0044b.ha' and to_unixtime(time) > to_unixtime(TIMESTAMP '2014-09-29 00:00:00.000') and to_unixtime(time) < to_unixtime(TIMESTAMP '2014-11-30 00:00:00.000') GROUP BY floor(to_unixtime(time) / 86400); | |
Result: | |
_col0 | _col1 | |
-------------------------+--------- | |
2014-10-02 00:00:00.000 | 1083855 | |
2014-10-03 00:00:00.000 | 1080823 | |
2014-10-04 00:00:00.000 | 1076970 | |
2014-10-05 00:00:00.000 | 1080710 | |
2014-10-06 00:00:00.000 | 1085219 | |
2014-10-07 00:00:00.000 | 1075464 | |
2014-10-08 00:00:00.000 | 969836 | |
..... | |
What I need: | |
_col0 | _col1 | |
-------------------------+--------- | |
2014-09-30 00:00:00.000 | 0 | |
2014-09-31 00:00:00.000 | 0 | |
2014-10-01 00:00:00.000 | 1454665 | |
2014-10-02 00:00:00.000 | 1083855 | |
2014-10-03 00:00:00.000 | 1080823 | |
2014-10-04 00:00:00.000 | 1076970 | |
2014-10-05 00:00:00.000 | 1080710 | |
2014-10-06 00:00:00.000 | 1085219 | |
2014-10-07 00:00:00.000 | 1075464 | |
2014-10-08 00:00:00.000 | 0 | |
2014-10-09 00:00:00.000 | 1787734 | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment