Skip to content
Louvre Ops DB

View

slot_availability

Booked, admitted and remaining places for every dated slot. Replaces the stored 2020 count.

Rows 126–150 of 443

slot_availability, page 6 of 18
slot_idINTEGERexhibition_idINTEGERtitleTEXTslot_dateTEXTstart_timeTEXTcapacityINTEGERbookedanyadmittedanyremainingany
1266Light on the Water: Venetian Views2017-05-1311:00354331
1276Light on the Water: Venetian Views2017-05-1414:30352133
1286Light on the Water: Venetian Views2017-05-1812:15351134
1296Light on the Water: Venetian Views2017-05-1813:15352133
1306Light on the Water: Venetian Views2017-05-2014:15353332
1316Light on the Water: Venetian Views2017-05-2017:15351134
1327Cities of Clay: Mesopotamia2017-10-1011:004542413
1337Cities of Clay: Mesopotamia2017-10-1017:15454441
1347Cities of Clay: Mesopotamia2017-10-2110:15451144
1357Cities of Clay: Mesopotamia2017-10-2212:15451144
1367Cities of Clay: Mesopotamia2017-10-2811:45454341
1377Cities of Clay: Mesopotamia2017-10-2815:15451144
1387Cities of Clay: Mesopotamia2017-11-0614:304543412
1397Cities of Clay: Mesopotamia2017-11-1113:00452043
1407Cities of Clay: Mesopotamia2017-11-1812:00452243
1417Cities of Clay: Mesopotamia2017-11-2213:004545370
1427Cities of Clay: Mesopotamia2017-11-2213:1545131032
1437Cities of Clay: Mesopotamia2017-11-2315:00451144
1447Cities of Clay: Mesopotamia2017-12-0611:45452243
1457Cities of Clay: Mesopotamia2017-12-0612:45451044
1467Cities of Clay: Mesopotamia2017-12-0710:45452143
1477Cities of Clay: Mesopotamia2017-12-1017:00452043
1487Cities of Clay: Mesopotamia2017-12-1712:00452243
1497Cities of Clay: Mesopotamia2017-12-1712:45452243
1507Cities of Clay: Mesopotamia2017-12-1912:15451144
View definition
CREATE VIEW slot_availability AS
SELECT
  s.slot_id,
  s.exhibition_id,
  e.title,
  s.slot_date,
  s.start_time,
  s.capacity,
  count(b.booking_id)              AS booked,
  count(h.scan_id)                 AS admitted,
  s.capacity - count(b.booking_id) AS remaining
FROM exhibition_slot s
JOIN exhibition e ON e.exhibition_id = s.exhibition_id
LEFT JOIN exhibition_booking b ON b.slot_id = s.slot_id
LEFT JOIN hall_napoleon_scan h ON h.booking_id = b.booking_id
GROUP BY s.slot_id;