Skip to content
Louvre Ops DB

View

slot_availability

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

Rows 226–250 of 443

slot_availability, page 10 of 18
slot_idINTEGERexhibition_idINTEGERtitleTEXTslot_dateTEXTstart_timeTEXTcapacityINTEGERbookedanyadmittedanyremainingany
2269Crossroads: Art of the Mediterranean2018-11-2815:00452243
2279Crossroads: Art of the Mediterranean2018-11-3010:15452243
2289Crossroads: Art of the Mediterranean2018-11-3013:45452243
2299Crossroads: Art of the Mediterranean2018-12-0110:45453342
2309Crossroads: Art of the Mediterranean2018-12-0112:45452243
2319Crossroads: Art of the Mediterranean2018-12-0415:154545410
2329Crossroads: Art of the Mediterranean2018-12-0415:30457638
2339Crossroads: Art of the Mediterranean2018-12-0911:45451144
2349Crossroads: Art of the Mediterranean2018-12-0913:154539306
2359Crossroads: Art of the Mediterranean2018-12-1111:15451144
2369Crossroads: Art of the Mediterranean2018-12-2716:45454441
2379Crossroads: Art of the Mediterranean2019-01-1212:45452243
23810Bodies in Marble2019-02-2517:00451144
23910Bodies in Marble2019-02-2714:154545450
24010Bodies in Marble2019-02-2714:3045151430
24110Bodies in Marble2019-03-0112:15453342
24210Bodies in Marble2019-03-0313:15452243
24310Bodies in Marble2019-03-0510:30454341
24410Bodies in Marble2019-03-0610:30451144
24510Bodies in Marble2019-03-0709:45455440
24610Bodies in Marble2019-03-1211:30451144
24710Bodies in Marble2019-03-1212:45452143
24810Bodies in Marble2019-03-1311:00454341
24910Bodies in Marble2019-03-1513:454545410
25010Bodies in Marble2019-03-1514:00454341
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;