3 ms·
I agree, that doesn't make sense to me either. What about select versionId, max(checkinTime), min(checkinTime)? Can as well query SqlGPT. And above all, it's no
by tannhaeuser 3y ago
I agree, that doesn't make sense to me either. What about select versionId, max(checkinTime), min(checkinTime)? Can as well query SqlGPT. And above all, it's not what the SQL standard says when that's the entire point of using a standard in the first place.
- OskarS 3y agoWell, it doesn't error out! In this example, it seems like it picks the result from whatever matches the last column, but not sure if this is determinstic: sqlite> create table x(c1, c2); sqlite> insert into x values ("a", 1); sqlite> insert into x values ("b", 2); sqlite> insert into x values ("c", 3); sqlite> select c1, max(c2) from x; c|3 sqlite> select c1, max(c2), min(c2) from x; a|3|1 sqlite> select c1, min(c2), max(c2) from x; c|1|3 (note: since SQLite is dynamically typed, no need to specify column types for simple examples like this).