Created
January 27, 2016 21:26
-
-
Save ABM-Dan/16ee7591b5ac8d856983 to your computer and use it in GitHub Desktop.
This file contains 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 l.*, MAX(s.sale_ts) FROM location AS `l` LEFT JOIN sales AS `s` ON l.id = s.location_id GROUP BY(s.location_id); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment