Description Usage Arguments Functions Examples
Generate an SQL snippet for SELECT or SELECT DISTINCT
1 2 3 4 5 |
... |
Columns to select. Single arguments are assumed to be column names. Single named arguments are renamed columns. Named arguments with a vector of length greater than 1 or a vector with named entries are assumed to be table names; entry names are column aliases. |
.distinct |
If true, uses SELECT DISTINCT as keyword |
table_cols |
Named list of tables and columns |
SELECT_
: Standard eval version of SELECT
SELECT_DISTINCT
: Alias for SELECT(..., .distinct = TRUE)
1 2 3 4 5 6 7 | SELECT(letters[1:3])
SELECT(letters[1:3], 't2' = letters[4:6])
SELECT(a = 'apple', b = 'banana', c = 'cherry')
SELECT('t1' = c(a = 'apple', b = 'banana'), c = 'cherry')
SELECT('t1' = c(a = 'apple', b = 'banana'), c = 'cherry', 't2' = c(d = 'dragon_fruit'))
SELECT_(list('t1' = c('a', z = 'b'), 't2' = 'c'))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.