Find all capital cities that are one of the three largest cities in the state/province using intersect
Fantastic news! We've Found the answer you've been seeking!
Question:
- 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);
Related Book For
Posted Date: