parent
e306514b98
commit
cd9b6ac81f
|
@ -453,7 +453,7 @@ Notice how `desc()` is translated to `DESC`: this is one of the many dplyr funct
|
|||
Sometimes it's not possible to translate a dplyr pipeline into a single `SELECT` statement and you need to use a subquery.
|
||||
A **subquery** is just a query used as a data source in the `FROM` clause, instead of the usual table.
|
||||
|
||||
dplyr typically uses subqueries to work around limitations of SQL.
|
||||
dbplyr typically uses subqueries to work around limitations of SQL.
|
||||
For example, expressions in the `SELECT` clause can't refer to columns that were just created.
|
||||
That means that the following (silly) dplyr pipeline needs to happen in two steps: the first (inner) query computes `year1` and then the second (outer) query can compute `year2`.
|
||||
|
||||
|
|
Loading…
Reference in New Issue