Answered step by step
Verified Expert Solution
Question
1 Approved Answer
(d) Answer question (d) by referring to the two tables shown below. Table: Branch Branch ID Branch_Nane Prefix Telephone ! 1001 Petaling Jaya 1002
(d) Answer question (d) by referring to the two tables shown below. Table: Branch Branch ID Branch_Nane Prefix Telephone ! 1001 Petaling Jaya 1002 Shah Alam 03 : 03 23456789: : 34567890: 1003 Ravang 03 34590123: 1004 Kluang : 07 54567890: 1005 Muar 1006 Kota Kinabalu 07 088 54590120 90120123: Table: Area Prefix Region Population 03 Selangor ! 5874000 07 Johor 3554000 088 Sabah 3544000: 06 Melaka 05 Pahang. 872000 1623000 Figure: Branch and Area Tables i. Using subquery, find the branch id and branch name in the region named 'Selangor'. The intended SQL result set is shown below. Answer: Branch ID Branch Nane 1001 1002 1003 Petaling Jaya ! Shah Alam Ravang ii. Using subquery, find the region and population for the regions with above average population among the 5 regions in Area table. The intended SQL result set is shown below. Region Population Selangor Johor Sabah 5874000: 3554000 3544000: Answer:
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started