Warning: include_once(../../../headder.php): Failed to open stream: No such file or directory in /home/cbseguess/public_html/ebooks/xii/computer_science1/structurequery_language4.php on line 16

Warning: include_once(): Failed opening '../../../headder.php' for inclusion (include_path='.:/opt/cpanel/ea-php83/root/usr/share/pear') in /home/cbseguess/public_html/ebooks/xii/computer_science1/structurequery_language4.php on line 16

CBSE Computer Science - Revision Tour(Solved)

CBSE Guess > eBooks > Class XII > CBSE Computer Science Structure Query Language Solved Revision Tour By Mr. Ravi Kiran

COMPUTER SCIENCE STRUCTURED QUERY LANGUAGE


Warning: include(../../../ads_330x250_middle.php): Failed to open stream: No such file or directory in /home/cbseguess/public_html/ebooks/xii/computer_science1/structurequery_language4.php on line 23

Warning: include(): Failed opening '../../../ads_330x250_middle.php' for inclusion (include_path='.:/opt/cpanel/ea-php83/root/usr/share/pear') in /home/cbseguess/public_html/ebooks/xii/computer_science1/structurequery_language4.php on line 23

Previous Index Next

Delhi 2007:

5.b) Consider the following tables. Write SQL command for the statements (i)to(iv)and give outputs for the SQL quries (v) to (viii). 6

TABLE : SENDER

SenderID SenderName Sender Address Sender City
ND01 R jain 2,ABC Appts New Delhi
MU02 H sinha 12, Newton Mumbai
MU1 5 S haj 27/ A,Park Street New Delhi
ND5 0 T Prasad 122-K,SDA Mumbai

TABLE :RECIPIENT

RecID SenderID ReCName RecAddress ReCCity
KO05 ND01 RBajpayee 5,Central Avenue Kolkata
ND08 MU0 2 S Mahajan 116, A Vihar NewDelhi
MU19 ND01 H sing 2A,Andheri East Mumbai
MU32 MU1 5 PK Swamy B5, CS erminus Mumbai
ND48 ND50 S Tripathi 13, B1 D,Mayur Vihar NewDelhi

(i) To display the names of all senders from Mumbai.

Ans: Select * from Sender where SenderCity =’Mumbai’;

(ii) To display the recID, senderName, senderAddress, RecName, RecAddress for every recipt.

Ans: Select recID, SenderName, SenderAddress, RecName, RecAddress from Sender, Recipient where Sender.Senderid=Recipient.RenderId;

(iii) To display the sender details in ascending order of SenderName.

Ans: Select * from Sender order by SenderName;

(iv) To display number of Recipients from each city.

Ans: Select RecCity,Count(*) from Recipient group by RecCity;

CnorName

R singhal

Amit Kumar

 

CneeName

Rahul Kishore

S mittal

 

CneeName

CneeAddress

P Dhingra

16/j,Moore Enclave

B P jain

13,Block d,a,viha

 

(v) SELECT DISTINCT SenderCity FROM Sender;

Ans:

 

Previous Index Next

CBSE Computer Science Solved Revision Tour By Mr. Ravi Kiran ( [email protected] )



Warning: include(../../../120_60_others.php): Failed to open stream: No such file or directory in /home/cbseguess/public_html/ebooks/xii/computer_science1/structurequery_language4.php on line 189

Warning: include(): Failed opening '../../../120_60_others.php' for inclusion (include_path='.:/opt/cpanel/ea-php83/root/usr/share/pear') in /home/cbseguess/public_html/ebooks/xii/computer_science1/structurequery_language4.php on line 189