2.7 Write a query to retrieve and display a list of activities including activity reference codes,…

Written by

in

2.7 Write a query to retrieve and display a list of activities including activity reference codes, activity name along with the date on which each activity takes place as well as detailed information regarding the facility such as the facility identity, facility name, capacity and address of each facility. In addition, the municipalities and province in which the facility are situated should be displayed with other requested information. This task requires obtaining information from multiple collections, with a sample output of the query as shown below:
[ { useDate: ISODate(‘2025-05-20T00:00:00.000Z’), activityRef: ‘MUS01’, activityName: ‘Music Concert’, facilityId: ‘Arts’, facilityName: ‘Artscape Theatre Centre’, capacity: 1500, address: ‘D.F. Malan St, Foreshore, Cape Town, 8001’, municipality: ‘City of Cape Town’, province: ‘Western Cape’ }, { useDate: ISODate(‘2025-06-15T00:00:00.000Z’), activityRef: ‘EXH01’, activityName: ‘Art Exhibition’, facilityId: ‘ICC’, facilityName: ‘Durban ICC’, capacity: 10000, address: ’45 Bram Fischer Rd, Durban Central, Durban, 4001′, municipality: ‘eThekwini Metropolitan Municipality’, province: ‘KwaZulu-Natal’ } ]

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *