Skip to content

Commit 5360539

Browse files
authored
Added spell column to group by (#61)
1 parent 38aa442 commit 5360539

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

aggregations-and-analytics/05_top_n/05_top_n.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ each spell a wizard has cast, we can maintain a continuous total of how many tim
1414
```sql
1515
SELECT wizard, spell, COUNT(*) AS times_cast
1616
FROM spells_cast
17-
GROUP BY wizard;
17+
GROUP BY wizard, spell;
1818
```
1919

2020
This result can be used in an `OVER` window to calculate a [Top-N](https://docs.ververica.com/user_guide/sql_development/queries.html#top-n).

0 commit comments

Comments
 (0)