Skip to content

Instantly share code, notes, and snippets.

@cn007b
Created August 14, 2018 11:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cn007b/d0acbdee293edfc1c57b52c4a9e9aac9 to your computer and use it in GitHub Desktop.
Save cn007b/d0acbdee293edfc1c57b52c4a9e9aac9 to your computer and use it in GitHub Desktop.
PostgreSQL vs MongoDB - postgres query
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