Skip to content

Commit d252b85

Browse files
Update and rename ratio_to_report.md to ratio_to_report-in-Snowflake.md
1 parent 406d216 commit d252b85

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

ratio_to_report.md renamed to ratio_to_report-in-Snowflake.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# RATIO_TO_REPORT in Snowflake
2+
23
`RATIO_TO_REPORT` is a powerful #snowflakedb Window function that lets you calculate the ratio of a value to the sum of the values in a window. The following query uses the `RATIO_TO_REPORT` function to calculate the percentage of the sales by channel (online vs. store) for each day.
34

45
### Raw Order Data
@@ -67,3 +68,17 @@ group by transaction_date, channel;
6768
| 2022-12-01 | store | 30 | 50 | 60% |
6869
| 2022-12-01 | online | 20 | 50 | 40% |
6970
| 2022-12-02 | store | 100 | 100 | 100% |
71+
72+
73+
74+
# See also:
75+
<ul id="recent-articles">
76+
{% for page in site.pages %}
77+
{% if page.title contains "RATIO_TO_REPORT" %}
78+
<li>
79+
<a href="{{ page.url | relative_url }}">{{ page.title | escape }}</a>
80+
</li>
81+
{% endif %}
82+
{% endfor %}
83+
</ul>
84+

0 commit comments

Comments
 (0)