On Sep 11, 2012, at 2:48 PM, bardzotajneko...@interia.pl wrote: > select id, a, min(mtime) over(partition by id order by mtime) m from tab > qualify row_number() over(partition by id order by mtime) = 1
While using analytics would indeed be the best approach overall, these are sadly not supported in SQLite in any ways or forms. (For the record, if using analytics, the only thing one really need to do is to mark the lead row for selection. No point to over complicate things as above). _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users