You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ratio_to_report.md
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -35,13 +35,13 @@ order by team, position;
35
35

36
36
37
37
38
-
The `over()` in the query above tells the database to expand the _window_ in which the `ratio_to_report()` operates to the whole dataset.
38
+
The `over()` in the query above tells the database to expand the **_window_** in which the `ratio_to_report()` operates to the whole dataset.
39
39
40
-
The `ratio_to_report()` window function takes an expression (usually a column) as input and calculates the ratio of that expression to the window that is defined (in this case, the whole dataset).
40
+
The `ratio_to_report()` window function takes an expression (usually a column) as input and calculates the ratio of that expression to the **_window_** that is defined (in this case, the whole dataset).
41
41
42
42
## Using ratio_to_report() to Calculate Partitioned Percentages
43
43
44
-
Let’s say we were not only interested in each players overall contribution to goals, but also their contribution to goals for their specific team. We can then add a partition by to the _window_:
44
+
Let’s say we were not only interested in each players overall contribution to goals, but also their contribution to goals for their specific team. We can then add a partition by to the **_window_**:
0 commit comments