= Use-case 0012 - View Event Attendance Summary = '''Initiating actor:''' Wedding Organizer (Assistant) '''Other actors:''' Bride / Groom (Wedding owner) == Description == The organizer or wedding owner views attendance list and statistics per event, including number of attendees per role/table and overall status. == Scenario == 1. The user selects an event. 2. The system lists attendance details for all guests. {{{ SET search_path TO project; SELECT a.attendance_id, g.first_name, g.last_name, a.status, a.table_number, a.role FROM attendance a JOIN guest g ON a.guest_id = g.guest_id WHERE a.event_id = :event_id ORDER BY a.table_number NULLS LAST, g.last_name, g.first_name; }}} 3. The system shows a summary (counts by status). {{{ SET search_path TO project; SELECT status, COUNT(*) AS total FROM attendance WHERE event_id = :event_id GROUP BY status ORDER BY total DESC; }}} 4. The system can show guests per table (optional view). {{{ SET search_path TO project; SELECT table_number, COUNT(*) AS guests_on_table FROM attendance WHERE event_id = :event_id AND table_number IS NOT NULL GROUP BY table_number ORDER BY table_number; }}}