Skip to content
Louvre Ops DB

View

slot_availability

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

Rows 51–75 of 443

slot_availability, page 3 of 18
slot_idINTEGERexhibition_idINTEGERtitleTEXTslot_dateTEXTstart_timeTEXTcapacityINTEGERbookedanyadmittedanyremainingany
513Quiet Rooms: Dutch Domestic Painting2016-04-2411:45454341
523Quiet Rooms: Dutch Domestic Painting2016-04-2814:45452243
533Quiet Rooms: Dutch Domestic Painting2016-05-0113:30453342
543Quiet Rooms: Dutch Domestic Painting2016-05-0410:30451144
553Quiet Rooms: Dutch Domestic Painting2016-05-0413:15451044
563Quiet Rooms: Dutch Domestic Painting2016-05-0615:15451144
573Quiet Rooms: Dutch Domestic Painting2016-05-0815:15452243
583Quiet Rooms: Dutch Domestic Painting2016-05-1612:45451144
593Quiet Rooms: Dutch Domestic Painting2016-05-1816:15452243
603Quiet Rooms: Dutch Domestic Painting2016-05-2214:30454441
613Quiet Rooms: Dutch Domestic Painting2016-05-2512:00452243
623Quiet Rooms: Dutch Domestic Painting2016-05-2512:15453342
633Quiet Rooms: Dutch Domestic Painting2016-05-2713:00452243
643Quiet Rooms: Dutch Domestic Painting2016-05-2716:00451144
653Quiet Rooms: Dutch Domestic Painting2016-05-2811:45451144
663Quiet Rooms: Dutch Domestic Painting2016-05-2915:30452243
674Paper Masters: Renaissance Drawings2016-06-2410:45302228
684Paper Masters: Renaissance Drawings2016-06-2713:30304426
694Paper Masters: Renaissance Drawings2016-06-2915:45301129
704Paper Masters: Renaissance Drawings2016-07-0114:153030290
714Paper Masters: Renaissance Drawings2016-07-0114:303028272
724Paper Masters: Renaissance Drawings2016-07-0710:45301129
734Paper Masters: Renaissance Drawings2016-07-2411:00301129
744Paper Masters: Renaissance Drawings2016-08-2512:15305425
755Scribes of the Nile2016-10-1211:15452243
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;