GROUP BY / HAVING fails to return results
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
sqlite3 (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Ubuntu 12.04 is running on Travis.ci with sqlite 3.7.9 and that's where we ran into this bug (see https:/
On sqlite3 3.6.20 (and likely the version on Travis, which is 3.7.9, but not on 3.7.17):
```
sqlite> SELECT * FROM ingests;
id ingest_id bag_id ingested created_at
---------- -------
1 99bb3c9c-
2 06ac1f23-
3 308d53c9-
4 03f98430-
sqlite> SELECT * FROM ingests GROUP BY bag_id HAVING created_at = max(created_at);
sqlite> # wtf?
```
When using sqlite 3.13.0 it returns results, i.e.
```
sqlite> SELECT * FROM ingests GROUP BY bag_id HAVING created_at = max(created_at);
id ingest_id bag_id ingested created_at
---------- -------
1 99bb3c9c-
3 308d53c9-
```
description: | updated |
description: | updated |