Skip to content
Louvre Ops DB

View

slot_availability

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

Rows 26–50 of 443

slot_availability, page 2 of 18
slot_idINTEGERexhibition_idINTEGERtitleTEXTslot_dateTEXTstart_timeTEXTcapacityINTEGERbookedanyadmittedanyremainingany
262Bronze and Fire: Renaissance Sculpture2015-11-2013:15402238
272Bronze and Fire: Renaissance Sculpture2015-11-2115:00403337
282Bronze and Fire: Renaissance Sculpture2015-12-1514:15401139
292Bronze and Fire: Renaissance Sculpture2015-12-2114:30401139
302Bronze and Fire: Renaissance Sculpture2015-12-2213:45401139
312Bronze and Fire: Renaissance Sculpture2016-01-0411:30402238
322Bronze and Fire: Renaissance Sculpture2016-01-0517:15404436
332Bronze and Fire: Renaissance Sculpture2016-01-0611:45401139
343Quiet Rooms: Dutch Domestic Painting2016-02-2611:15452143
353Quiet Rooms: Dutch Domestic Painting2016-02-2713:15455540
363Quiet Rooms: Dutch Domestic Painting2016-02-2915:45454441
373Quiet Rooms: Dutch Domestic Painting2016-03-0312:004540385
383Quiet Rooms: Dutch Domestic Painting2016-03-0513:45452243
393Quiet Rooms: Dutch Domestic Painting2016-03-1012:30452043
403Quiet Rooms: Dutch Domestic Painting2016-03-1613:15455540
413Quiet Rooms: Dutch Domestic Painting2016-03-1913:15452143
423Quiet Rooms: Dutch Domestic Painting2016-03-2116:00455540
433Quiet Rooms: Dutch Domestic Painting2016-03-2616:15452243
443Quiet Rooms: Dutch Domestic Painting2016-03-2811:45455540
453Quiet Rooms: Dutch Domestic Painting2016-03-2813:15452243
463Quiet Rooms: Dutch Domestic Painting2016-03-2911:00455440
473Quiet Rooms: Dutch Domestic Painting2016-04-0115:15453242
483Quiet Rooms: Dutch Domestic Painting2016-04-0315:00452243
493Quiet Rooms: Dutch Domestic Painting2016-04-1412:00452243
503Quiet Rooms: Dutch Domestic Painting2016-04-1911: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;