I have a datatable with a column "year" and a column "country". Each country can appear more than one year, ranging from 1900 to 2021. How to select only countries that appear in all the year (1900 to 2021)?
This is my code in selecting which is the earliest and latest year:
SELECT
MIN(year) AS EarliestYear,
MAX(year) AS LatestYear
FROM
owid_energy_data;