Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 32

ACT

AMERICAN COLLAGE OF TECHNOLOGY

PREPARED BY :MEKDES TADESE


SUBMITTED TO : DR SOLOMON
1.Create a table called Customer table.

A. Insert records into the table.

B. Add salary column to the table.


C. Drop salary column of the customer table.

2. Create a table called branch table.


A. Increase the size of data type for asserts to the branch. And B. Add and drop a column to
the branch table.
C. Insert values to the table

D. Update the branch name column


E. Delete any two columns from the table

3. Create a table called sailor table


A. Add column age to the sailor table.
B. Insert values into the sailor table.

C. Delete the row with rating >8.


E. Insert null values into the table.

4. Create a table called reserves table


A. Insert values into the reserves table
B. Add column time to the reserves table

C. Alter the column day data type to date.


D. Drop the column time in the table.

E. Delete the row of the table with some condition


LAB EXCRCISE WEEK 2

1 a, create a user and grant all permissions to the user

B. Insert values into the table and use commit.


C. Delete any three records in the department table and use rollback

D. Add constraint primary key and foreign key to the table.


2 a. create a user and grant all permissions to the user
B. Insert records in the sailor table and use commit.

C. Add save point after insertion of records and verify save point.
D. Add constraints not null and primary key to the sailor table.
3 a. create a user and grant all permissions to the use
b. Use revoke command to remove user permissions.

C. Change password of the user created.


D. Add constraint foreign key and not null

4 a. create a user and grant all permissions to the user.


b. Update the table reserves and use save point and rollback.

c. Add constraint primary key, foreign key and not null to the reserves table
d. Delete constraint not null to the table column
WEEK 3
1. A. By using the group by clause, display the enames who belongs to deptno 10 along
with average salary

B. Display lowest paid employee details under each department.


C. Display number of employees working in each department and their department
number.

D. Using built in functions, display number of employees working in each department


and their department name from dept table. Insert deptname to dept table and insert
deptname for each row, do the required thing specified above.

E. List all employees which start with either B or C


F. Display only these ename of employees where the maximum salary is greater than or
equal to 5000.

2.A. Calculate the average salary for each different job


B. Show the average salary of each job excluding manager.

C. Display employees who earn more than the lowest salary in department 30
3List all employee names, salary and 15% rise in salary

Display lowest paid emp details under each manager


Display the average monthly salary bill for each deptno.

Show the average salary for all departments employing more than two people

By using the group by clause, display the eid who belongs to deptno 05 along with average salary
4a Count the number of employees in department 20

Find the minimum salary earned by clerk.

Find minimum, maximum, average salary of all employees.

List the minimum and maximum salaries for each job type.

List the employee names in descending order.


List the employee id, names in ascending order by empid.

5.a. Find the sids ,names of sailors who have reserved all boats called “INTERLAKE”
Find the age of youngest sailor who is eligible to vote for each rating level with at least two such sailors.

Find the sname , bid and reservation date for each reservation.
Find the ages of sailors whose name begin and end with B and has at least 3 characters.

List in alphabetic order all sailors who have reserved red boat.
Find the age of youngest sailor for each rating level.

6. List the Vendors who have delivered products within 6 months from order date

Display the Vendor details who have supplied both Assembled and Sub parts.

Display the Sub parts by grouping the Vendor type (Local or Non Local).

Display the Vendor details in ascending order.

You might also like