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

Mahadevi Varma

The document contains 9 assignments with SQL queries to create tables, insert data, and perform various operations on the data like filtering, sorting, aggregating in the tables. Each assignment contains around 8-10 SQL queries.

Uploaded by

somamahapatra470
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)
15 views

Mahadevi Varma

The document contains 9 assignments with SQL queries to create tables, insert data, and perform various operations on the data like filtering, sorting, aggregating in the tables. Each assignment contains around 8-10 SQL queries.

Uploaded by

somamahapatra470
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
You are on page 1/ 15

Assignment no:1 Date:16.02.

23
1.Write a SQL query to create Student(Name,Roll,Marks) table and insert the
values .

2.Write a SQL query to find the Name of students from Student table.

1
3.Write a SQL query to find the Marks of students from Student table.

4. Write a SQL query to find the Name from Student table whose Marks is
above 90.

5. Write a SQL query to find the Name and squared Marks of students from
Student table.

2
6. Write a SQL query to find the percentage of Marks for each students with
the full Marks 200.

7. Write a SQL query to display the student record according to ascending


order of Marks from Student table.

8. Write a SQL query to display the Marks of students according to


descending order of Marks from Student table.

3
Assignment no:2 Date:25.02.23
1.Write a SQL query to create Employee(Name,Empid,Dept_no,Salary) table
and insert the values by addressing method .

2. Write a SQL query to find the Name of Employees whose salary is more
than 20000.

4
3. Write a SQL query to give 10% increament to the salary of all employees.

4. Write a SQL query to give 10% increament to the employee whose salary
is less than 25000.

5.Write a SQL query to find the Name of the employee whe gets highest
salary.

6. Write a SQL query to find the Second highest salary from Employee table.

5
7. Write a SQL query to find the name of the employee whose Name starts
with ’A’.

8. Write a SQL query to find the name of the employee whose Name contain
‘a’ as 2nd letter.

9. Write a SQL query to find the name of the employee whose Name contain
‘a’ .

10. Write a SQL query to arrange the employee according to the descending
order of salary.

6
Assignment no:3 Date:3.3.23
1.Write a SQL query to create Emp(Name,Empid,Age,Salary) table and insert
the values .

2. Write a SQL query to find the name of the employee whose Name starts
with ‘M%’.

3. Write a SQL query to find the maximum salary according to Age.

7
4. Write a SQL query to find the age wise total salary where total salary is
more than 30000.

5. Write a SQL query to find the Name of the employee whose name’s 3rd
letter is ‘i’.

6. Write a SQL query to find the average salary from Emp table.

8
Assignment no:4 Date:10.03.23
1.Write a SQL query to create Account(Acc_no,Cust_no,Brcode,Balance) table
and insert the values .

2. Write a SQL query to create Customer(Cust_no,Name,Address,Phone)


table and insert the values.

9
3. Write a SQL query to find the name of customer who has highest balance
including all branches.

4. Write a SQL query to find the name of the customer and their
corresponding balance.

5. Write a SQL query to find the customer number and total balance of each
customer.

6. Write a SQL query to find the customer and their corresponding phone
number.

10
7. Write a SQL query to delete all the account details from branch code ‘B1’.

8. Write a SQL query to remove all the customer details from Customer table
whose account exist in branch code ‘B2’.

11
Assignment no:5 Date:23.03.23
1.Write a SQL query to create Doctor(D_id,D_name,Address,Phone) table and
insert the values .

2.Write a SQL query to create Patients(P_id,P_name,P_Address,P_Phone)


table and insert the values .

12
3.Write a SQL query to create Visit(D_id,P_id,D_Date) table and insert the
values .

4.Write a SQL query to display the Doctor and their corresponding Patients
name.

5. Write a SQL query to find the name of patients and number of times they
visited a doctor.

13
6. Write a SQL query to find the name of the doctor and their number of
patients.

7. Write a SQL query to find the name of the doctor who have treated the
patients whose names end with ‘2’.

8. Write a SQL query to find the name of the patients who have been treated
by multiple doctors.

9. Write a SQL query to find the name of the patients who had visited
between ’12-MAR-23’ and ‘17-APR-23’.

14
15

You might also like