hi everyone,

i'm having some troubles with a query and i can't seem to be able to figure 
out how to make it work. so here is the problem.
i have a table in a google spreadsheet with the following columns (they 
should be straightforward and in the query script i use the column values):

A:Timestamp 
B:ID 
C:sessionDate 
D:First Name 
E:Surname 
F:Email 
G:EntryNo

apart for the entryNo (which is an incremental number for each ID, which 
means that for every ID i could have multiple entries with different 
sessionDates) they are all strings. 

what i would like to pull out is a list of all IDs for a given sessionDate, 
but filter only the latest entryNo, which represents the latest entry for a 
given ID.can anyone suggest the right way of doing it?

so far i managed to get these;
if i use a query like the following i can get the latest entry for a given 
ID: 
SELECT * where B = 'myID' order by G desc limit 1

the following query gives me the list of all IDs in a particular session 
and sorted by last name (however also counts those where the entryNo is not 
the highest value):
SELECT * where C = 'mySession' order by E asc 

in order query languages i would try some joins, but with the google query 
script i just can't figure it out! any help/suggestion will be very much 
appreciated,
many thanks

lorenzo



-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-visualization-api/-/CGhKifu38dYJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-visualization-api?hl=en.

Reply via email to