Last active
August 21, 2020 20:28
-
-
Save baileywickham/43ba25a76e72d746611f7f75dac43f8b 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 dayofweek(checkin), count(code), sum(datediff(checkout, checkin)*rate) | |
from reservations | |
join rooms on rooms.roomcode=reservations.room | |
group by dayofweek(checkin) | |
order by dayofweek(checkin) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment