On Wed, Sep 5, 2012 at 9:12 AM, Baruch Burstein <[email protected]>wrote:
> SELECT id, a, b, ..., mtime
> FROM tab
> WHERE rowid IN (
> SELECT id, min(mtime)
> FROM tab
> GROUP BY id
> )
> ORDER BY mtime DESC;
>
In the actual application, "tab" is not a real table but is a join:
http://www.fossil-scm.org/fossil/artifact/5dfd626877f?ln=271-273
So there isn't a ROWID available to select from.
>
> On Wed, Sep 5, 2012 at 4:03 PM, Richard Hipp <[email protected]> wrote:
>
> >
> > SELECT id, a, b, ..., min(mtime)
> > FROM tab
> > GROUP BY id
> > ORDER BY min(mtime) DESC;
>
>
>
>
> --
> ˙uʍop-ǝpısdn sı ɹoʇıuoɯ ɹnoʎ 'sıɥʇ pɐǝɹ uɐɔ noʎ ɟı
> _______________________________________________
> sqlite-users mailing list
> [email protected]
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
--
D. Richard Hipp
[email protected]
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users