0% found this document useful (0 votes)
3 views8 pages

CS File SQL

The document contains a series of queries related to three tables: STUDENT, EMP, and ITEMS. It includes tasks such as displaying student details, filtering by scores, counting students, and manipulating employee data, as well as managing item prices and listings. Each query is aimed at extracting specific information or performing operations on the data within the tables.

Uploaded by

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

CS File SQL

The document contains a series of queries related to three tables: STUDENT, EMP, and ITEMS. It includes tasks such as displaying student details, filtering by scores, counting students, and manipulating employee data, as well as managing item prices and listings. Each query is aimed at extracting specific information or performing operations on the data within the tables.

Uploaded by

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

TABLE STUDENT

RollN Name Class Marks


o
1 Aman 12 88
2 Riya 12 92
3 Kunal 11 76
4 Simran 12 85

QUES1: Display all details of class 12 students.

QUES2: Display Name and Marks of students who scored more than 85.

QUES3: Display details of students whose name starts with 'S'.

QUES4: Display names in alphabetical order.


QUES5: Display RollNo and Name of students scoring between 80 and 95.

QUES6: Count the number of students in class 12.

QUES7: Display maximum marks from the table.

QUES8: Display minimum marks from the table.


QUES9: Display average marks of class 12.

QUES10: Increase marks of all students by 5.


TABLE EMP

EID Name Salary Dept


101 Arun 25000 HR
102 Meera 30000 IT
103 Ravi 28000 Sales
104 Rohan 26000 IT

QUES11: Display Name and Salary of IT department employees.

QUES12: Display all employees whose salary is less than 28000.

QUES13: Sort the employee table by Salary (ascending).


QUES14: Display Name and Dept of employees whose name ends with ‘a’.

QUES15: Display all unique departments.

TABLE ITEMS

ICode ItemName Price


1 Pen 10
2 Pencil 5
3 Eraser 7
4 Diary 50

QUES16: Display ItemName and Price of items costing more than 10.

QUES17: Display the ItemName where Price between 5 and 10.


QUES18: Display all items in descending order of Price.

QUES19: Display total number of items.


QUES20: Display sum of all item prices.

QUES21: Update price of the Pen to 12.

QUES22: Delete the item whose ICode = 4.


QUES23: Display the cost of each item after adding 10% GST.

QUES24: Display item names that contain the letter ‘e’.

QUES25: Display ItemName and Price*2 for all items.

You might also like