Cs Term 2 Practical File
Cs Term 2 Practical File
TERM 2
ANIKET AGARWAL
CLASS XII-C
ROLL NO-5
SQL
Create Table:
(b) To show all information of students where capacity is more than the number of
students in order of Rtn.
(c) To show Area_covered for buses covering more than 20 km, but charges less
than 80000.
(e) To show Rtn, Area_covered, and average cost per student for all routes
where average cost per student is Charges / No_of_students.
(f) Add a new record with the following data:
(iii) Select the average Charges from SchoolBus where Transporter = 'Anand
Travels':
(a) List the names of those students who have obtained DIV 1 sorted by NAME.
(b) Display a report, listing NAME, STIPEND, SUBJECT, and amount of stipend
received in a year (assuming STIPEND is paid every month).
(c) To count the number of students who are either PHYSICS or COMPUTER Sc.
graduates.
(e) Give the output of the following SQL statements based on the GRADUATE table:
Table: GUIDE
(a) Display the names of all the activities with their Acodes in descending order.
(b) Display the sum of PrizeMoney for the activities played in each of the
stadiums separately.
(c) Display the coach’s name and Acodes in ascending order of Acode from the
table COACH.
(d) Display the content of the Activity table whose ScheduleDate is earlier than
01/01/2004 in ascending order of ParticipantsNum.
(e) Display the names of coaches who are not associated with any activity at all.
(f) Display the names of activities and their corresponding coach names.
(iv) SELECT Name, ActivityName FROM activity A, COACH C WHERE A.Acode = C.Acode
AND A.ParticipantsNum = 10;
Example Interaction:
Content of NAdd.TXT after replacement: