0% found this document useful (0 votes)
10 views5 pages

Class12 SQL 5 Questions Expanded Final

The document contains SQL practice questions for Class XII Computer Science, following the CBSE pattern. It includes queries for various databases such as Library, Employee, Student, Product, and Hospital, covering operations like displaying specific records, counting entries, and finding maximum or minimum values. Each section provides a set of SQL queries related to the respective database tables.

Uploaded by

ansh66901
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views5 pages

Class12 SQL 5 Questions Expanded Final

The document contains SQL practice questions for Class XII Computer Science, following the CBSE pattern. It includes queries for various databases such as Library, Employee, Student, Product, and Hospital, covering operations like displaying specific records, counting entries, and finding maximum or minimum values. Each section provides a set of SQL queries related to the respective database tables.

Uploaded by

ansh66901
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Class XII Computer Science (083) SQL Practice

Questions – CBSE Pattern

QUESTION 1: LIBRARY DATABASE

Tables: BOOKS, MEMBERS

(a) Display members from Delhi


SELECT * FROM Members WHERE City='Delhi';

(b) Display book title and price above 600


SELECT Title, Price FROM Books WHERE Price > 600;

(c) Display member name with book title


SELECT [Link], [Link] FROM Members M, Books B WHERE [Link] = [Link];

(d) Display total number of books


SELECT COUNT(*) FROM Books;

(e) Display maximum book price


SELECT MAX(Price) FROM Books;
QUESTION 2: EMPLOYEE DATABASE

Tables: EMPLOYEE, DEPARTMENT

(a) Employees with salary above 40000


SELECT * FROM Employee WHERE Salary > 40000;

(b) Employee name with department name


SELECT [Link], [Link] FROM Employee E, Department D WHERE [Link] =
[Link];

(c) Count total employees


SELECT COUNT(*) FROM Employee;

(d) Display minimum salary


SELECT MIN(Salary) FROM Employee;

(e) Display employees from Delhi


SELECT * FROM Employee WHERE City='Delhi';
QUESTION 3: STUDENT DATABASE

Tables: STUDENT, COURSE

(a) Students scoring more than 80


SELECT * FROM Student WHERE Marks > 80;

(b) Student name with course name


SELECT [Link], [Link] FROM Student S, Course C WHERE [Link] = [Link];

(c) Count total students


SELECT COUNT(*) FROM Student;

(d) Display highest marks


SELECT MAX(Marks) FROM Student;

(e) Display students of section B


SELECT * FROM Student WHERE Section='B';
QUESTION 4: PRODUCT DATABASE

Tables: PRODUCT, SUPPLIER

(a) Products priced above 5000


SELECT * FROM Product WHERE Price > 5000;

(b) Product with supplier name


SELECT [Link], [Link] FROM Product P, Supplier S WHERE [Link] = [Link];

(c) Count total suppliers


SELECT COUNT(*) FROM Supplier;

(d) Display average product price


SELECT AVG(Price) FROM Product;

(e) Display products with stock less than 20


SELECT * FROM Product WHERE Stock < 20;
QUESTION 5: HOSPITAL DATABASE

Tables: DOCTOR, PATIENT

(a) Patients from Delhi


SELECT * FROM Patient WHERE City='Delhi';

(b) Patient name with doctor name


SELECT [Link], [Link] FROM Patient P, Doctor D WHERE [Link] = [Link];

(c) Count total patients


SELECT COUNT(*) FROM Patient;

(d) Display maximum doctor fees


SELECT MAX(Fees) FROM Doctor;

(e) Display doctors with experience above 10


SELECT * FROM Doctor WHERE Experience > 10;

You might also like