Changes between Initial Version and Version 1 of Ticket #26634
- Timestamp:
- May 18, 2016, 11:46:42 AM (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #26634 – Description
initial v1 10 10 The SQL looks like this: 11 11 12 {{{#!sql 12 13 select * from myapp_project where 13 14 id in (SELECT id from myapp_project p WHERE p.version = (SELECT max(version) FROM myapp_project p1 WHERE p1.ref = p.ref)) 15 }}} 14 16 15 I had to use extra(where=[maxids])to achieve this*.17 I had to use `extra(where=[maxids])` to achieve this*. 16 18 17 *Where maxids = "id in (SELECT id from myapp_project p WHERE p.version = (SELECT max(version) FROM myapp_project p1 WHERE p1.ref = p.ref))"19 *Where `maxids = "id in (SELECT id from myapp_project p WHERE p.version = (SELECT max(version) FROM myapp_project p1 WHERE p1.ref = p.ref))"` 18 20 19 21 Stackoverflow discussion here: