CommencerCommencer gratuitement

Filtering impacts

You will revisit filtering while examining the African countries with athletes competing in the Summer Olympics. You will look at the average age by gender for the Rio de Janeiro and Beijing games.

Along the way, you will compare the query plans using numeric filters, text filters, and indexed filters.

Cet exercice fait partie du cours

Improving Query Performance in PostgreSQL

Afficher le cours

Exercice interactif pratique

Essayez cet exercice en complétant cet exemple de code.

SELECT city, sex, COUNT(DISTINCT athlete_id), ___(___) AS avg_age
FROM athletes_summ
WHERE city IN ('Rio de Janeiro','Beijing')
GROUP BY city, sex;
Modifier et exécuter le code