OK, I see.

I get an error for that specific query, but it should in any case not be a
problem to filter out the zero-rows.

If you don't mind me asking, how do I craft a CQ from this? The docs say
"Because CQs run on regularly incremented time intervals you don't need to
(and shouldn't!) specify a time range in the `WHERE` clause."

On Wed, Aug 24, 2016 at 12:45 AM, Sean Beckett <[email protected]> wrote:

> Ahh, okay. That makes perfect sense. You issued a GROUP BY time(10 years)
> query with no explicit time range. Therefore the first bucket starts at the
> default lower bound, which is epoch 0. Then you see a result for each 10
> year bucket, and the final result holds the actual data you've written,
> since that's all in the 40-50 year decade since epoch.
>
> To get only a single line, use
>
> select count(*) from car where time > 0 group by time(522w) WHERE time >
> now() - 522w
>
> or something like
>
> select count(*) from car where time > 0 group by time(522w) WHERE time >
> '2007-01-01'
>
> On Tue, Aug 23, 2016 at 4:36 PM, Emiliano Heyns <
> [email protected]> wrote:
>
>> On Wed, Aug 24, 2016 at 12:30 AM, Sean Beckett <[email protected]> wrote:
>>
>>> Can you share the output from "select count(*) from car where time > 0
>>> group by time(315360000s)"?
>>>
>>>
>> Sure: https://gist.github.com/anonymous/6e064df2baae476dfc623bcb2f8eae5a
>>
>>
>> --
>> Remember to include the InfluxDB version number with all issue reports
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "InfluxDB" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To post to this group, send email to [email protected].
>> Visit this group at https://groups.google.com/group/influxdb.
>> To view this discussion on the web visit https://groups.google.com/d/ms
>> gid/influxdb/CAHOSGO54qntocRe2CyjXH9qgu9DtnRfZy0p2N_J71xpjtH
>> -iBA%40mail.gmail.com
>> <https://groups.google.com/d/msgid/influxdb/CAHOSGO54qntocRe2CyjXH9qgu9DtnRfZy0p2N_J71xpjtH-iBA%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> Sean Beckett
> Director of Support and Professional Services
> InfluxDB
>
> --
> Remember to include the InfluxDB version number with all issue reports
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "InfluxDB" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/influxdb/eUrSfCRi8_c/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/influxdb.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/influxdb/CALGqCvO6mzfs4LFAwusy9VRE9cEOBNkDJNZx%2BNPEdWujx_YiNA%
> 40mail.gmail.com
> <https://groups.google.com/d/msgid/influxdb/CALGqCvO6mzfs4LFAwusy9VRE9cEOBNkDJNZx%2BNPEdWujx_YiNA%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
Remember to include the InfluxDB version number with all issue reports
--- 
You received this message because you are subscribed to the Google Groups 
"InfluxDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/influxdb.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/influxdb/CAHOSGO5FvkU%2B5VtMCddoSjHjU%3DHEHBtAPhkA%3Dbe76bWbSvvXUA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to