Skip to content

Instantly share code, notes, and snippets.

@wyqydsyq
Created June 28, 2016 05:22
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 wyqydsyq/9d43a6713f975f49b47a38f04ce24c1d to your computer and use it in GitHub Desktop.
Save wyqydsyq/9d43a6713f975f49b47a38f04ce24c1d to your computer and use it in GitHub Desktop.
SELECT SUM(`earnings`) AS `total` FROM `rooms` WHERE `room_type` = 'single' AND `roomPrice` NOT NULL
SELECT `rooms`.`room_number` FROM `rooms` WHERE `bookings`.`room_number` = `rooms`.`room_number` AND `bookings`.`date` = '2016-05-28 12:00:00'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment