File tree Expand file tree Collapse file tree 4 files changed +12
-11
lines changed
Expand file tree Collapse file tree 4 files changed +12
-11
lines changed Original file line number Diff line number Diff line change @@ -19,10 +19,10 @@ from cities
1919derive temp_c = (fahrenheit_to_celsius temp_f)
2020```
2121
22- This function is named ` interp ` , and has two positional parameters named ` high `
23- and ` x ` , and one named parameter named ` low ` which takes a default argument of
24- ` 0 ` . It calculates the proportion of the distance that ` x ` is between ` low ` and
25- ` high ` .
22+ The function below is named ` interp ` , and has two positional parameters named
23+ ` high ` and ` x ` , and one named parameter named ` low ` which takes a default
24+ argument of ` 0 ` . It calculates the proportion of the distance that ` x ` is
25+ between ` low ` and ` high ` .
2626
2727``` prql
2828let interp = low:0 high x -> (x - low) / (high - low)
Original file line number Diff line number Diff line change 11# Aggregation
22
3- A key feature of analytics is reducing many values down to some summary. This
4- act is called "aggregation" and always includes a function &mdash ; for example,
3+ A key feature of analytics is reducing many values down to a summary. This act
4+ is called "aggregation" and always includes a function &mdash ; for example,
55` average ` or ` sum ` &mdash ; that reduces values in the table to a single row.
66
77### ` aggregate ` transform
Original file line number Diff line number Diff line change @@ -57,6 +57,7 @@ We did something a bit odd at the end: first we took rows `11..20` and then took
5757the first 3 rows from that result.
5858
5959> [ !NOTE] Note that a single transform ` take 11..13 ` would have produced the
60- > same SQL. The example serves an example of how PRQL allows fast data
61- > exploration by "stacking" transforms in the pipeline, reducing the cognitive
62- > burden of how a new transform with the previous query.
60+ > same SQL. The example shows how PRQL allows fast data exploration by
61+ > "stacking" transforms in the pipeline. This reduces the cognitive burden:
62+ > unlike SQL, each new transform interacts _ only_ with the results of the
63+ > previous query.
Original file line number Diff line number Diff line change @@ -34,8 +34,8 @@ from invoices
3434
3535> [ !NOTE] Try each of these examples here in the
3636> [ Playground.] ( https://prql-lang.org/playground/ ) Enter the query on the
37- > left-hand side, and click ** output.arrow ** in the right-hand side to see the
38- > result.
37+ > left-hand side, and click the ** Query Results ** tab on the right-hand side to
38+ > see the result.
3939
4040The result of the query above is not terribly interesting, it's just the same
4141relation as before.
You can’t perform that action at this time.
0 commit comments