Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Find all capital cities that are one of the three largest cities in the state/province using intersect Tables are set up like this Government Table

  1. Find all capital cities that are one of the three largest cities in the state/province using intersect

Tables are set up like this 

Government Table
-State
-Capital
-Governor
-LowerHouse
-UpperHouse
-Country

Large Table
-State
-Firstcity
-SecondCity
-ThirdCity
-Country

Ticket to Ride Table
-State
-City
-Tickets
-Country
 

 

 

This is my query so far I need it working in Oracle:

SELECT FirstCity, SecondCity, ThirdCity 

FROM Large 

WHERE IN(Capital = FirstCity

 OR Capital = SecondCity 

OR Capital = ThirdCity) 

Intersect

SELECT Capital 

FROM Government 

WHERE IN(Capital = FirstCity 

OR Capital = SecondCity 

OR Capital = ThirdCity);


Step by Step Solution

There are 3 Steps involved in it

Step: 1

Your query is almost correct but you need to use the INTERSECT keyword correctly The ... 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

Step: 3

blur-text-image

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

Managerial Economics

Authors: Mark Hirschey

12th edition

9780324584844, 324588860, 324584849, 978-0324588866

More Books

Students also viewed these Databases questions