I am working with data on multiple tables and I am trying to get some info but I keep getting repeat data.
SELECT Airport.city, StateInfo.state_name, TravelInfo.destination,
Carrier.unique_carrier_name, CarrierInfo.passengers
FROM Airport
INNER JOIN TravelInfo
ON Airport.airport_id = TravelInfo.destination_airport_id
INNER JOIN Flights
ON Airport.airport_id = Flights.destination_airport_id
INNER JOIN StateInfo
ON Airport.airport_id = StateInfo.airport_id
INNER JOIN Carrier
ON Flights.airline_id = Carrier.airline_id
INNER JOIN CarrierInfo
ON Carrier.airline_id = CarrierInfo.airline_id
WHERE Airport.state = 'CO';
What I am trying to do is get the city name the carrier and a number of passengers but it seems that the output keeps repeating the data. For example I will get:
As you can see the data gets repeated a few hundred times is there a way to fix this?