Created
July 6, 2018 21:27
-
-
Save jaraco/0b7d8933d3355fcaa2d82aef127023f7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT TARGETS.*, TASKS.LAST_HARVESTED | |
FROM TARGETS | |
LEFT OUTER JOIN ( | |
SELECT TARGET_ID, max(HARVESTED) LAST_HARVESTED | |
FROM TASKS | |
GROUP BY TARGET_ID | |
) TASKS | |
on TARGETS.ID = TASKS.TARGET_ID |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment