CS403 Assignment 3 Solution Fall 2022 by VU Answer
CS403 Assignment 3 Solution Fall 2022 by VU Answer
VUAnswer.com
Total Marks: 20
Due Date: 15 Feb 2022
Note:
Your answer must follow the below given specifications.
VUAnswer.com
Question:
Perform the following tasks by considering the above given diagram.
You are required to write the SQL commands for each of the following statements.
1. Create a table named Booking. You also have to define primary key and foreign key (if any).
Solution:
2. Create a table named Agreement. You also have to define primary key and foreign key (if
any).
Solution:
VUAnswer.com
3. Show the age, Name and Address of Driver: and make sure that selected column should not
contain any duplicated values.
Solution:
4. Change the Data type of Feedback_desc column from varchar (100) to Text in Feedback
table.
VUAnswer.com
Solution:
5. Insert one record in Agreement table having data against each column (Agre_Id: 01,
Duration: 2 days, Fuel: 5 litter, Rent_fee: 5000, Return_date: 15/03/2022).
Solution:
INSERT INTO Agreement(Agre_Id, Duration, Fuel, Rent_fee, Return_date) VALUES ('01', '2
days', '5 liter', '5000', ‘15/03/2022’);
Solution:
VUAnswer.com
DROP COLUMN Bk_Date, Driver_option;
7. Show the Name in Upper case latter and Contact_No of those customers whose ages are
between 30 to 60 from Customer table.
Solution:
SELECT UPPER(Name), Contact_No FROM customer WHERE ages BETWEEN 30 AND 60;
8. Display the Bk_Date in ascending order and Driver_option of all those booking where
driver_option should be yes from Booking table.
Solution:
9. Display sum, minimum, maximum and average Rent_fee from agreement table.
Solution:
VUAnswer.com
10. What is the maximum Total_amount and average total_payable for each pay_status in
payment table.
Solution:
REMEMBER IN PRAYERS
VUAnswer.com
REGARD SARIM
WHATSAPP +923162965677
PLEASE NOTE:
Don't copy-paste the same answer.
Make sure you can make some changes to your solution file
before submitting copy paste solution will be marked zero.
If you found any mistake then correct yourself and inform me.
Before submitting an assignment check your assignment
requirement file.
If you need some help and question about file and solutions.