Use app×
Join Bloom Tuition
One on One Online Tuition
JEE MAIN 2025 Foundation Course
NEET 2025 Foundation Course
CLASS 12 FOUNDATION COURSE
CLASS 10 FOUNDATION COURSE
CLASS 9 FOUNDATION COURSE
CLASS 8 FOUNDATION COURSE
0 votes
2.5k views
in Computer by (79.3k points)
edited by

Write commands in SQL for (i) and (ii) and output for (iii) given below :

(i) To displays client names of clients, their  phone numbers, partyId, and party decription who will have number of guests more than 50 for their parties.

(ii) To displays Client Ids, their addresses, number of guests of those client who have 'Adarsh' anywhere in their addresses.

ClientId ClientIdName Address Phone No of Guests PartyId

SELECT Clientld, ClientName, NoofGuests, Description, Costperperson, From Client, Party WHERE Client.ParyId =Party.Partyld AND NoofGuests BETWEEN 50 AND 100;

1 Answer

+1 vote
by (76.4k points)
selected by
 
Best answer

(i) Select ClientName, Phone, p.partyld., partyDescription from party P, Client C where P. Partyld = C.Partyld and C. No of Guests > 50;

(ii) Select ClientlD, Address, NoOfGuests from Client where Address like  '% Adarsh %';

(iii) 

Clientld ClientName NoofGtrests Description CostPerPerson
C101 A.K. Antony 20 Birthday 400
C103 RashmiKhana 50 Birthday 400
C104 S.K. Chandra 100 Engagement 450

Welcome to Sarthaks eConnect: A unique platform where students can interact with teachers/experts/students to get solutions to their queries. Students (upto class 10+2) preparing for All Government Exams, CBSE Board Exam, ICSE Board Exam, State Board Exam, JEE (Mains+Advance) and NEET can ask questions from any subject and get quick answers by subject teachers/ experts/mentors/students.

Categories

...