A=datetime
B=temperature
My query is:
SELECT toDate(A), max(B) group by toDate(A)
...that works fine. But if I try to query with:
SELECT toDate(A), A, max(B) group by toDate(A)
...to include the A (so I can display the time that the high temp.
occurred), I get the following error:
"Error in query: Invalid query Column [A] should be added to GROUP BY,
removed from SELECT, or aggregated in SELECT."
So how do I include the time?
--
You received this message because you are subscribed to the Google Groups "Google Visualization API" group.
To post to this group, send email to google-visua...@googlegroups.com.
To unsubscribe from this group, send email to google-visualizati...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-visualization-api?hl=en.
As I tried to explain, I was trying to show the TIME that the high
temperature occurred, thus the reason for the A column. Other query
languages (MySQL and MSSql) would let you include column A without an
aggregate function.
Thanks...
On Feb 11, 1:22 am, Viz Kid <viz...@google.com> wrote:
> Hi.
>
> I'm not sure I understand what the problem is.
> In the first query you suggested here, you get in return two columns - the
> date (A) and the maximum temperature. Why do you need to add yet another A
> to the query?
>
> Viz Kid
>
> On Wed, Feb 10, 2010 at 7:30 PM, take.it.easy <wgcampb...@gmail.com> wrote:
> > I have a datetime and a temperature column in a google spreadsheet.
> > I'm trying to query to find the high temperatures by date and display
> > the time of day that the high temperature occurred, then visualize the
> > result.
>
> > A=datetime
> > B=temperature
>
> > My query is:
>
> > SELECT toDate(A), max(B) group by toDate(A)
>
> > ...that works fine. But if I try to query with:
>
> > SELECT toDate(A), A, max(B) group by toDate(A)
>
> > ...to include the A (so I can display the time that the high temp.
> > occurred), I get the following error:
>
> > "Error in query: Invalid query Column [A] should be added to GROUP BY,
> > removed from SELECT, or aggregated in SELECT."
>
> > So how do I include the time?
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Google Visualization API" group.
> > To post to this group, send email to
> > google-visua...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > google-visualizati...@googlegroups.com<google-visualization-api%2Bunsu...@googlegroups.com>
I have a similar problem. I am tracking items(column B) and each item has multiple locations with a date(A), lat(E), long(F), and description(G) of that location. I would like to query the latest location for each item.