Hi, Mark,
Mark Fenbers schrieb:
> Wow! I didn't know you could have a (select ...) as a replacement for a
> 'from' table/query. Your SQL worked as-is, except I had to add a 'limit
> 1' to the first subquery.
>
> Thanks! I would have never figured that out on my own!
SQL has more power than mo
Wow! I didn't know you could have a (select ...) as a replacement for
a 'from' table/query. Your SQL worked as-is, except I had to add a
'limit 1' to the first subquery.
Thanks! I would have never figured that out on my own!
Mark
chester c young wrote:
--- Mark Fenbers <[EMAIL PROTECTE
--- Mark Fenbers <[EMAIL PROTECTED]> wrote:
> select l.lid,l.fs,max(h.obstime) from location as l
> inner join height as h on h.lid = l.lid
> where l.fs > 0.0
> group by l.lid,l.fs;
>
> The above query works as expected in that is fetches the lid, fs and
> time of the latest observation in the h
select l.lid,l.fs,max(h.obstime) from location as l
inner join height as h on h.lid = l.lid
where l.fs > 0.0
group by l.lid,l.fs;
The above query works as expected in that is fetches the lid, fs and
time of the latest observation in the height table (for the
corresponding lid), but I also want