Created
August 14, 2018 11:24
-
-
Save cn007b/d0acbdee293edfc1c57b52c4a9e9aac9 to your computer and use it in GitHub Desktop.
PostgreSQL vs MongoDB - postgres query
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 s.id, s.sha1, f.name | |
FROM storage s | |
JOIN file f ON s.id = f.storage_id | |
WHERE s.count > 0 | |
ORDER by id DESC, name ASC | |
OFFSET 1000 LIMIT 10 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment