Skip to content

Instantly share code, notes, and snippets.

@francois
Created April 28, 2011 13:18
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 francois/946329 to your computer and use it in GitHub Desktop.
Save francois/946329 to your computer and use it in GitHub Desktop.
SELECT
DISTINCT ON (rs.hotel)
rs.*
FROM
room_sets rs, VALUES(3) AS setup(people)
WHERE
s.people = rs.people
ORDER BY
rs.hotel, rs.price
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment