以下のクエリのように、FROM句のテーブルを並べ替えてください。それ以外の場合は、dim_locationの結合に適用されることを意図したON句の結合条件 およびfact_flight テーブルは、dim_dateに誤って適用されます およびfact_flight 上記のエラーが発生するテーブル:
SELECT
dim_location.country_name,
COUNT(fact_flight.sk_fact)
FROM
dim_date, dim_location
INNER JOIN fact_flight ON dim_location.sk_location = fact_flight.sk_location
WHERE
fact_flight.date_key = dim_date.date_key
GROUP BY
dim_location.country_name