Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- person | version | date | created_at | data
- 1 | 1 | 01/01/2019 | 05/08/2019 | null
- 2 | 1 | 01/01/2019 | 05/08/2019 | null
- 1 | 1 | 02/01/2019 | 05/08/2019 | null
- 2 | 1 | 02/01/2019 | 05/08/2019 | null
- 1 | 2 | 01/01/2019 | 06/08/2019 | "some data"
- 1 | 3 | 01/01/2019 | 06/08/2019 | "some altered data"
- 1 | 3 | 01/01/2019 | 05/08/2019 | "also altered data"
- /*
- DESIRED RESULT
- I want to select the data for all different persons and dates at the highest versions and highest created at.
- It is possible for the same person, data and version to co-exists (the created at will never be the same in this case)
- */
- (person 1, date 01/01/2019, "some altered data")
- (person 1, date 02/01/2019, null)
- (person 2, date 01/01/2019, null)
- (person 2, date 02/01/2019, null)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement