Initial commit
This commit is contained in:
+10
@@ -0,0 +1,10 @@
|
||||
SELECT -- Incorrect table reservations
|
||||
Left.reservation,
|
||||
datetime (Left.reservation, Left.time_reserve) AS reserved_until,
|
||||
Right.reservation
|
||||
from
|
||||
Bookings AS Left
|
||||
LEFT JOIN Bookings AS Right ON Left.id != Right.id
|
||||
AND Left.id_tables = Right.id_tables
|
||||
WHERE
|
||||
datetime (Right.reservation) BETWEEN datetime (Left.reservation) AND datetime (Left.reservation, Left.time_reserve)
|
||||
Reference in New Issue
Block a user