Question: 3. Write an SQL command to list all clients names and cities in alphabetical order. (1 mark) 4. Write an SQL command to list technician

3. Write an SQL command to list all clients names and cities in alphabetical order. (1 mark)

4. Write an SQL command to list technician name and charge for technicians whose charge is more than 14. (1.5 marks)

5. Write an SQL command to display the average of technician charges. (1.5 marks)

6. Write an SQL command to list the client name and his ready product(s). (1 marks)

7. List name of technicians who have not ready products along with product types and prices. (1.5 marks)

8. Write an SQL command to display names of clients and the number of hours of repair for clients who have repaired Automatic Washer. (1.5 marks)

9. Write an SQL command to add the attribute tcSection to table TECH. (1 mark)

10. Write an SQL command to create the view damaged that contains client name, product type, technician name for damaged products. (1.5 marks)

3. Write an SQL command to list all clients names and citiesin alphabetical order. (1 mark) 4. Write an SQL command to list

Consider the following database schema for AAA Electronics. CLIENT(INum, clName, clAddress, clCity) PRODUCT(prNum, pr Type, prPrice) TECH (teNum, tcName, tcCharge) REPAIR (rpCode. IpDate.rpHours, #clNum. #prNum. #tcNum. IpStat) Note: primary keys are underlined, foreign keys have #sign. Answer the following questions: 1. Create the above tables in Oracle Express Edition or Oracle Developer. Do not forget in include primary keys and foreign keys and any other constraints. Note that scrMarks should be between 0 and 100. (3 marks) clCity 2. Insert the following data in the tables: (1.5 marks) CLIENT clNum clName clAddress 2020001 Maher Sami Ten Street 2020002 Khaled Awad First Street 2019001 Yousef Ahmed Main avenue 2019005 Sameer Abod Hill Street 2021001 Radhi Radwan Almoratefa 2018006 Wael Ismael Alkhdar 2017013 Fawzi Farahat Center Road Suhar Sur Salalah Muscat Ibri Ibri Muscat PRODUCT prNum prType 123456 Automatic Washer 654321 Smart TV 951357 Home Cinema 864239 LCD TV 741258 SA Washer 987123 Water cooler prPrice 240.000 499.990 725.000 125.250 69.950 45.000 TECH tcNum 1 2 3 tcName Ahmed Mohammad Salem Al Arabi Khaled Ali Issa Ibrahim Omar Abduallah tcCharge 14.000 25.000 8.500 15.000 14.500 4 5 rpHours clNum 1.5 2019005 prNum 951357 3 741258 2018006 2017013 2.5 864239 1 REPAIR rpCode rpDate 1 25/07/2019 2 01/12/2019 3 15/01/2020 4 11/02/2020 5 07/06/2020 6 12/07/2020 7 09/08/2020 8 21/08/2020 9 31/12/2020 10 02/01/2021 11 05/01/2021 1 2 teNum rpStat 2 Not ready 3 Ready 1 Ready 3 Damaged 5 Ready 4 Ready 4 Ready 3 Ready 3 Not ready 2 Ready 2 Ready 2018006 2020002 2020001 2020001 2019001 2019005 2021001 2021001 4 987123 123456 864239 123456 123456 987123 654321 951357 3 2 2 2 3. Write an SQL command to list all clients names and cities in alphabetical order. (1 mark)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!