0% found this document useful (0 votes)
6 views27 pages

Computer Science Practical File SQL Queries

Uploaded by

pathakharsh677
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)
6 views27 pages

Computer Science Practical File SQL Queries

Uploaded by

pathakharsh677
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

PRINCE PUBLIC SCHOOL

PRACTICAL FILE

COMPUTER SCIENCE

Name – SAHIL SAUNTHWAL


Class – XII ‘SCIENCE’
Roll no. 30
Submitted to: RENUKA PARTAP MAM
Certificate:
This is to certify that the practical file has been
successfully completed and submitted by Sahil
Saunthwal, Roll No. 29, of Class XII-Science,
during the academic year 2025-2026, in partial
fulfillment of the requirements of Computer
Science subject.
The work embodied in this project is original
and carried out by the student under my
supervision and guidance.

Teacher Signature.

_____________________
Acknowledgement:
I would like to express my sincere gratitude to
all those who helped me complete this project
successfully.
First and foremost, I am thankful to my
Computer Science teacher, Mrs. Renuka Mam,
for their constant guidance, support, and
encouragement throughout the project.
I would also like to thank our principal,
[Link] Kumar Mam, for providing us with
the opportunity and necessary facilities.
Lastly, I am grateful to my parents and friends
who supported me and inspired me during the
completion of this project.
INDEX:
💥------------SQL ASSIGNMENTS------------💥

-- Step 1: First create a database of name ClubDB and use it to make


same table:
-- Step 2: Now insert same values in the table:

-- Step 3: Now check the table by printing it:

-- Step 4: Now perform the queries that are asked in the above Question:
a) To display all the information about the female coaches.
b) To display ID, name, and age of all coaches whose age is greater than 35.

c) To display the name and salary of all the male coaches having age lesser
than 36.

d) To display the ID, name and age of all coaches whose names start with ‘K’.
e) To display the details of the SQUASH and BASKETBALL coaches.

f) To display the names of and sport of coaches whose DATOFAPP is between


‘1997-02-01’ and ‘1998- 02-01’.
-- Step 1: First create a database of name ProductSupplierDB and use it
to make both same tables:
-- Step 2: Now insert same values in both tables:

-- Step 3: Now check the tables by printing them:


-- Step 4: Now perform the queries that are asked in the above Question:
a) To display the details of all the products in the ascending order of product
names

b) display the supcode and To number of products, which are supplied by each
supplier.
c) To display the names of those suppliers, who are either from DELHI or from
CHENNAI.

d) To display the highest and the least price from the products.

e) To display the total amount (price*qty) of products with ID 102 and 104.
f) To add a new column named ‘rating’ of char (4) to the table PRODUCTS.
-- Step 1: First create a database of name ShopAccessoriesDB and use it
to make both same tables:
-- Step 2: Now insert same values in both tables:
-- Step 3: Now check the tables by printing them:
-- Step 4: Now perform the queries that are asked in the above Question:
a) To display name and price of all the accessories in ascending order of
their price.

b) To display area and number of shops in each area.


c) To display the different areas where the shops are located.

d) To display name and discount of items with id S02 and S03 where
discount is calculated as price x 0.05.
-- Step 1: First create a database of name ProductBrandDB and use it to
make both same tables:
-- Step 2: Now insert same values in both tables:

-- Step 3: Now check the tables by printing them:


-- Step 4: Now perform the queries that are asked in the above Question:
a) Display product name and brand name from the tables PRODUCT and
BRAND:

b) Display the structure of the table PRODUCT:

c) Display the average rating of Medimix and Dove brands:


d) Display the name, price, and rating of products in descending order of
rating:
-- Step 1: First create a database of name StudentResultDB and use it to
make same table:
-- Step 2: Now insert same values in the table:

-- Step 3: Now check the table by printing it:

-- Step 4: Now perform the queries that are asked in the above Question:
a) Insert a new student record (Roll_no: 108, Name: Aadit...)
b) Increase SEM2 marks by 3% for students whose name starts with ‘N’

c) Delete records of students securing 'IV' division


d) Add a column REMARKS of VARCHAR (50) data type

e) Display all records from the table


Conclusion:
Through this practical file, I explored the core
functionalities of SQL, including data definition,
manipulation, and querying. I learned to structure
tables, use conditional logic, apply aggregate functions,
and write optimized queries. These skills are
foundational for working with real-world databases and
building data-driven applications.

You might also like