0% found this document useful (0 votes)
161 views

Chapter12 Solution Mysql Class XI

This document contains sample SQL queries on various tables like STUDENT, SPORTS, CLUB, STUDENT1, LIBRARY, MOV, GRADUATE and TEACHER. The queries select, filter and order data from the tables based on different columns and conditions.

Uploaded by

Veer
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
161 views

Chapter12 Solution Mysql Class XI

This document contains sample SQL queries on various tables like STUDENT, SPORTS, CLUB, STUDENT1, LIBRARY, MOV, GRADUATE and TEACHER. The queries select, filter and order data from the tables based on different columns and conditions.

Uploaded by

Veer
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Chapter-12 (Simple Queries in SQL)

Type B

Ans.10 Table - STUDENT

(i) Select Name from student where grade1=’C’ or grade2=’C’;

(ii) Select DISTINCT game from student;

(iii) Select SUPW from student where name like ‘A%’;

Ans.11 Table - SPORTS

(i) Select Name from sports where grade1=’C’ or grade2=’C’;

(ii) Select Name from sports where game1=game2;

(iii) Select game1, game2 from sports where name like ‘A%’;

Ans.12 Table - CLUB

(i) Select *from club where sports=’SWIMMING’;

(ii) Select CoachName from club order by DateOfApp Desc:

(iii) Select coachname, pay, age, pay*15/100 from club;

(iv) insert into club values(11, ‘Rajiv’, 40, ‘Hockey’, ‘2006-05-27’, 2000, ‘M’)

Ans.13 Table – STUDENT1

(i) Select stream from student1 where stream=Nonmedical;

(ii) Select name from student1 where class like ‘12%’ order by stipend;

(iii) Select *from student1 order by Avgmark desc;

(iv) select name, stipend, stream, stipend*12 from student1;

Ans.14 Table – Library

(i) Select type from library where type=’PROG’ and Pub=’BPB’;

(ii) Select *from library where price>130 order by quantity;

(iii) Select *from library order by price;


Ans.15 Table – MOV

(i) Select *from MOV where price>20 order by price;

(ii) Select *from MOV order by quy DESC;

(iii) Select no, qty*price, qty*price*1.15 from MOV;

Ans.16 Table – GRADUATE

(i) Select Name from graduate where Rank=1 order by Name;

(ii) Select Name, stipend, subject, stipend*12 from graduate;

Ans.17 Table - relation Teacher

(i) Select *from teacher where department=’Histry’;

(ii) Select Name, sex from teacher where sex=’F’ and Department=’History’;

(iii) Select Name, Dateofjoin from relation Teacher order by dateofjoin.

You might also like