MulaiMulai sekarang secara gratis

Order of operations impact on query structure

The World Bank has data on a lot of countries, but they are missing values for some years. You decide to look for countries that have at least one year of missing population data. You write the following query, but it does NOT run.

SELECT olympic_cc, COUNT(*)
FROM demographics
WHERE population IS NULL
AND COUNT(*) > 1

You reference your notes about the SQL order of operations to understand why.

Which of the following explains the logical error?

Latihan ini adalah bagian dari kursus

Improving Query Performance in PostgreSQL

Lihat Kursus

Latihan interaktif praktis

Ubah teori menjadi tindakan dengan salah satu latihan interaktif kami.

Mulai berolahraga