Created
November 28, 2021 21:49
-
-
Save nedgrady/934543f32bd03fb21929e148d8c9b59a to your computer and use it in GitHub Desktop.
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 R.Id, | |
C.Name, | |
R.Start, | |
R.Finish | |
FROM ReservationRequest R | |
INNER JOIN Customer C ON C.Id = R.CustomerId | |
LEFT JOIN Booking B ON B.CustomerId = C.Id | |
WHERE R.Start < GETDATE() | |
AND B.BookingId IS NULL |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment