Exercise 11 of 17
Filter with a set of values
Fixed training server
Count the sequences from Germany, France and Italy, broken down by country, most frequent first.
The output should have this shape:
country | count
------- | -----
Germany | 1234
France | 987
Italy | 654Write a query and run it. The result is compared with the reference answer without considering row order.
Loading query editor…
Loading query editor…
Explanation
Reference answer
data
.filter(country.in({'Germany', 'France', 'Italy'}))
.group(by:={country}, aggs:={count:=count()})
.order(by:={count.desc()})