239 D6
239 D6
desc bride_groom
desc event
1.
insert into bride_groom values(1,'aditi sharma','rahul
varma',9876543212,'aditi@gmail.com')
2.
insert into caterer values(1,'taj caterers', 'south
indian',500000,'9000451236','tajcaterers@email.com')
4.
insert into venue values(1,'Grand Lotus Banquet','vadodara',500,150000)
5.
insert into photographer values(1,'kiran
photographer',40000,9988947859,'kiran@gmail.com')
6.
insert into event values(1,'mehendi','10-feb-2025',1,1,1,63000)
insert into event values(2,'sangeet','25-jan-2025',2,1,3,1500000)
QUERIES:-
V_NAME EVENT_COUNT
Grand Lotus Banquet 3
4. List all events along with their budget and venue cost.
PLANNER_NAME EVERAGE_BUDGET
rajiv patel 2854333.33333333333333333333333333333333
Shailesh shah 1600000
vandana shah 4500000
amit virani 980000
PLANNER_NAME MULTIPLE_VENUE
rajiv patel 3
Shailesh shah 3
8.Find all events managed by a planner with experience greater than 7 years.//query
select p.experience,e.event_name,p.planner_name
from event e join planner p on p.planner_id=e.planner_id
where p.experience>7
COUNT(E.EVENT_ID) PLANNER_NAME
3 rajiv patel
3 Shailesh shah
1 vandana shah
1 amit Virani
10.Retrieve all wedding events with bride and groom names, planner details, and
venue names.
11.List the venues where the event capacity is higher than the average venue
capacity.//sub-query
V_NAME CAPACITY
Royal Heritage Hall 3000
Oberoi Udaivilas 1500
12.Find the names of photographers who charge above the average cost.//sub-query
PHOTOGRAPHER_NAME COST
Dream Clicks 120000
Neha Clicks 80000
Snap Studio 100000
capture photographer 100000
13.Retrieve the name of the couple who spent the highest amount on their
event.//sub-query
14.Retrieve the planner(s) who managed at least one event with a budget greater
than 50,000.
15.Find all events planned by a planner who has more than 5 years of
experience//sub-query
SELECT event_name
FROM Event
WHERE planner_id IN (
SELECT planner_id FROM Planner WHERE experience > 5
);
EVENT_NAME
reception
engagment
mehendi
haldi
reception
16. Find the planner who managed the most expensive event//sum of all event's
budget sub-query
17. Find caterers who provide services at a lower cost than the most expensive
caterer.//sub-query
C_NAME COST
taj caterers 500000
Royal Treats 550000
Spice Delight 450000
taj grand Feast 600000
18.Find events where the budget is greater than the average budget of events
planned by the same planner//sub-query
EVENT_NAME BUDGET
mehendi 63000
SELECT *
FROM Event
WHERE v_id = (
SELECT v_id
FROM Venue
WHERE cost = (SELECT MAX(cost) FROM Venue)
);