Hi Scot,

Thank you for the post! This looks like a bug. I'm able to reproduce the 
issue on my instance. I've opened an issue on GitHub to alert the team to 
this behavior: https://github.com/influxdata/influxdb/issues/8045. Feel 
free to comment on that issue if you have any additional information.

Like you said, it looks like queries with a subquery, a function in the 
main query, and a WHERE tag clause in the main query return no results. 
Queries with a subquery and just a function in the main query seem to 
behave as expected, and queries with a subquery and just a WHERE tag clause 
in the main query seem to behave as expected. Interestingly, queries with a 
subquery, a function in the main query, and a WHERE time clause in the main 
query appear to work just fine.

Thank you for finding and posting this issue - subqueries in version 1.2 
are our first implementation of the feature and we really appreciate the 
feedback.

Regan

On Thursday, February 9, 2017 at 6:46:51 AM UTC-8, [email protected] wrote:
>
> Hi all,
>
> I'm new to influxdb, so I may not be understanding something about it. 
>  However, I've been trying to do some queries against my data and I'm 
> running into some unexpected results.  I've distilled the problem down to 
> this very simple case:
>
>
> > select * from testtable;
> name: testtable
> time                    value
> ----                    -----
> 1970-01-18T04:43:14.92Z 3
>
> > select sum(value) from testtable where value > 0;
> name: testtable
> time                 sum
> ----                 ---
> 1970-01-01T00:00:00Z 3
>
> > select sum(value) from (select value from testtable) where value > 0;
> > 
>
>
> What does it mean when it returns no result like that?  Am I missing 
> something here?  Simpler queries with the subquery seem to work fine 
> (withough the sum or without the where), I get the data back.
>
> This is influxdb 1.2 on Fedora 25.
>
> Thanks
>
> Scot
>
>

-- 
Remember to include the version number!
--- 
You received this message because you are subscribed to the Google Groups 
"InfluxData" 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/0cd4e210-09bb-4990-aa24-5eb82964dc5d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to