Skip to content
Louvre Ops DB

View

slot_availability

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

Rows 201–225 of 443

slot_availability, page 9 of 18
slot_idINTEGERexhibition_idINTEGERtitleTEXTslot_dateTEXTstart_timeTEXTcapacityINTEGERbookedanyadmittedanyremainingany
2018Romantic Fury: French Painting 1820-18502018-07-0710:45454341
2028Romantic Fury: French Painting 1820-18502018-07-0812:30452243
2038Romantic Fury: French Painting 1820-18502018-07-1011:45451144
2048Romantic Fury: French Painting 1820-18502018-07-1113:00452243
2058Romantic Fury: French Painting 1820-18502018-07-1211:15452243
2068Romantic Fury: French Painting 1820-18502018-07-1514:00451144
2078Romantic Fury: French Painting 1820-18502018-07-1711:304545430
2088Romantic Fury: French Painting 1820-18502018-07-1711:4545101035
2098Romantic Fury: French Painting 1820-18502018-07-1714:30451144
2108Romantic Fury: French Painting 1820-18502018-07-1910:15452243
2118Romantic Fury: French Painting 1820-18502018-07-2112:30451144
2128Romantic Fury: French Painting 1820-18502018-07-2213:30453342
2139Crossroads: Art of the Mediterranean2018-10-2011:00451144
2149Crossroads: Art of the Mediterranean2018-10-2013:30452243
2159Crossroads: Art of the Mediterranean2018-10-2511:154545410
2169Crossroads: Art of the Mediterranean2018-10-2511:30451144
2179Crossroads: Art of the Mediterranean2018-10-2716:00451144
2189Crossroads: Art of the Mediterranean2018-10-2717:15452243
2199Crossroads: Art of the Mediterranean2018-10-2912:00451144
2209Crossroads: Art of the Mediterranean2018-11-0309:30451144
2219Crossroads: Art of the Mediterranean2018-11-1111:30452043
2229Crossroads: Art of the Mediterranean2018-11-1114:15451144
2239Crossroads: Art of the Mediterranean2018-11-1211:30452243
2249Crossroads: Art of the Mediterranean2018-11-1616:45454441
2259Crossroads: Art of the Mediterranean2018-11-2811: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;