Answered step by step
Verified Expert Solution
Link Copied!

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Price theory and applications

Authors: Steven E landsburg

8th edition

538746459, 1133008321, 780538746458, 9781133008323, 978-0538746458

More Books

Students also viewed these Databases questions

Question

What is impulse buying? (p. 319)

Answered: 1 week ago