Skip to content
Louvre Ops DB

View

slot_availability

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

Rows 101–125 of 443

slot_availability, page 5 of 18
slot_idINTEGERexhibition_idINTEGERtitleTEXTslot_dateTEXTstart_timeTEXTcapacityINTEGERbookedanyadmittedanyremainingany
1016Light on the Water: Venetian Views2017-03-2016:45351134
1026Light on the Water: Venetian Views2017-03-2513:00352233
1036Light on the Water: Venetian Views2017-03-2513:15352233
1046Light on the Water: Venetian Views2017-03-2514:30351134
1056Light on the Water: Venetian Views2017-03-2813:00351134
1066Light on the Water: Venetian Views2017-03-2911:15351134
1076Light on the Water: Venetian Views2017-04-0514:45351134
1086Light on the Water: Venetian Views2017-04-1212:15352133
1096Light on the Water: Venetian Views2017-04-1810:45351134
1106Light on the Water: Venetian Views2017-04-1911:00351134
1116Light on the Water: Venetian Views2017-04-1911:15351134
1126Light on the Water: Venetian Views2017-04-1913:30352233
1136Light on the Water: Venetian Views2017-04-1915:00354331
1146Light on the Water: Venetian Views2017-04-2012:15354431
1156Light on the Water: Venetian Views2017-04-2216:30351134
1166Light on the Water: Venetian Views2017-04-2311:15352233
1176Light on the Water: Venetian Views2017-04-2314:15354431
1186Light on the Water: Venetian Views2017-04-2817:15352233
1196Light on the Water: Venetian Views2017-04-2913:30351134
1206Light on the Water: Venetian Views2017-05-0115:15352233
1216Light on the Water: Venetian Views2017-05-0416:00351134
1226Light on the Water: Venetian Views2017-05-0611:00355530
1236Light on the Water: Venetian Views2017-05-0616:15351134
1246Light on the Water: Venetian Views2017-05-0713:15355530
1256Light on the Water: Venetian Views2017-05-0717:15353232
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;