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

Question: Create The Table CLUB and Insert The Data. Solution

This document contains questions and solutions related to creating and querying tables called CLUB and GRADUATE. It asks to insert data, display data, count, filter, sort and calculate aggregates on the column values in the tables. New rows are also inserted into the tables.

Uploaded by

Sahil Sahni
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views

Question: Create The Table CLUB and Insert The Data. Solution

This document contains questions and solutions related to creating and querying tables called CLUB and GRADUATE. It asks to insert data, display data, count, filter, sort and calculate aggregates on the column values in the tables. New rows are also inserted into the tables.

Uploaded by

Sahil Sahni
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 10

Question: Create the table CLUB and Insert the data.

Solution.

Q. Show all content of CLUB table


Solution.
Question. To show all information about the swimming coaches in the club.

Solution

Question. To list names of all coaches with their date of appointment


(DATEOFAPP) in descending order.

Solution.
Question. To display report, showing coach name, pay, age and bonus (15% of
pay) for all the coaches.

Solution.

Question. To insert a new row in the CLUB table with the following data:
11, “Rajiv”, 40, “Hockey”, {27/05/2000}, 2000, “M”
Solution.

Question. Give the output of following SQL statements:


(i) Select COUNT(Distinct SPORTS) From CLUB;
(ii) Select MIN(Age) FROM CLUB Where Sex=’F’;

(iii) SELECT AVG(Pay) FROM CLUB Where Sports=’KARATE’;

(iv) Select SUM(Pay) FROM CLUB Where DATEOFAPP > ‘1998-01-31’ ;

QUESTION. Create the table graduate.


QUESTION . SHOW ALL THE CONTENT OF GRADUATE TABLE.

QUESTION . LIST THE NAME OF THOSE STUDENTS WHO HAVE OBTAINED


DIVISION 1 SORTED BY NAME.
QUESTION.DISPLAY THE REPORT LISTING NAME , STIPEND,SUBJECT AND
AMOUNT OF STIPEND RECEIVED IN A YEAR ASSUMING THAT THE STIPEND IS
PAID EVERY MONTH.

QUESTION. TO COUNT THE NO. OF SYUDENTS WHO ARE EITHER PHYSICS OR


COMPUTER SCIENCE GRADUATES.
QUESTION . TO INSERT A NEW ROW IN THE GRADUATE TABLE:
11,KAJOL,300,COMPUTERSC,75,1.

QUESTION. GIVE THE OUTPUTS OF THE FOLLOWING.


1. SELECT MIN(AVERAGE) FROM GRADUATE WHERE SUBJECT= PHYSICS

2. SELECT SUM(STIPEND) FROM GRADUATE WHERE DIVISION = 2.

3.SELECT AVG(STIPEND) FROM GRADUATE WHERE AVERAGE>=65.


4.SELECT COUNT (DISTINCT SUBJECT) FROM GRADUATE.
QUESTION . CREATE TABLE OF LAB AND INSERT VALUES.

QUESTION . SHOW THE TABLE.

You might also like