+1 vote
in Class 12 by kratos

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

+3 votes
by kratos
 
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 | *.K. Chandra | 100 | Engagement | 450 |

...