Created
June 14, 2019 16:50
-
-
Save skarger/91953039ed388ea8ef64e68dca5c4ba4 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 DISTINCT ON (workouts.sport_id) workouts.* | |
FROM workouts | |
ORDER BY sport_id ASC, created_at DESC |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment