SQL Access Practice Work
SQL Access Practice Work
1. College Database
Student (Rollno, name, stream)
Exam (Course_no, course_name, date)
Appeared (Roll_no, course_no)
Design the queries for the following and show the result for your sample data.
a) List the students studying in computer Engineering.
b) List courses for which the examination was conducted on 1-12-2003.
c) List the students who have appeared for “C Programming” examination.
d) List the courses in which no student has appeared.
e) Delete the information about student whose roll no. is 501.
f) Change the name of the coursex “C programming” to “Programming in C”.
g) Display date wise information of examination.
2. Department Database
Employee (emp_id, name, gender, salary, dept_id, DOJ, degree, emp_phone)
Department (dept_id, name, dept_phone)
Manager (dept_id, man_id)
Note: m_id is the value from e_id only.
Design the queries for the following and give it’s working.
a) Give the employee names who works on project “database”.
b) List the employees having salary more than 10,000.
c) List the employees working in project number 110.
d) List the employees working on both “MIS” and “VB” project.
e) List the employees working on “MIS” or “VB” project.
f) Find the project on which maximum no of employees are working.
g) Which employee is getting lowest salary?
h) Find all the employees working on project CRM and store them in a new table called CRM.
i) Delete the employee having salary between 1000 and 2000.
j) Modify the project name to maxEmployee in which maximum number of employees are
working.
k) Find the total salary of employees working on project “System”.
4. Order Processing Database
Supplier (Supp id, Supp name, City, Rating)
Part (Part id, Part name, Supp_id, Desc, Weight, Price)
Order (Order id, Order date, Supply date, Part id, Order qty, Supply qty, Salesman id, Order
cost)
Salesman (Salesman id, First Name, Last Name, City, commission, Salary)
9. Movie Database
Theatre (Theatre Code, Theatre Name, Theatre Type, Price Hindi, Price Other);
Default hindi price is Rs. 100.
Default other price is Rs. 50.
Theatre type is lookup wizard with values single and multiplex.
Movie (Movie Code, Short Name, Long Name, Language);
Default language is hindi.
Short name eg: DDLJ, PKDK.
Collection (Date, Theatre Code, Short Name, Collection (in Rs));
Collection must be greater than or equal to 0.