Code
test_translate_sql(paste0(x, collapse = ""))
Condition
Error in `check_collapse()`:
! `collapse` not supported in DB translation of `paste()`.
i Please use `str_flatten()` instead.
Code
test_translate_sql(pmin(x, y, z, na.rm = TRUE))
Output
<SQL> COALESCE(IFF(COALESCE(IFF(`x` <= `y`, `x`, `y`), `x`, `y`) <= `z`, COALESCE(IFF(`x` <= `y`, `x`, `y`), `x`, `y`), `z`), COALESCE(IFF(`x` <= `y`, `x`, `y`), `x`, `y`), `z`)
Code
test_translate_sql(pmax(x, y, z, na.rm = TRUE))
Output
<SQL> COALESCE(IFF(COALESCE(IFF(`x` >= `y`, `x`, `y`), `x`, `y`) >= `z`, COALESCE(IFF(`x` >= `y`, `x`, `y`), `x`, `y`), `z`), COALESCE(IFF(`x` >= `y`, `x`, `y`), `x`, `y`), `z`)
Code
mf %>% mutate(rown = row_number())
Output
<SQL>
SELECT `df`.*, ROW_NUMBER() OVER (ORDER BY (SELECT NULL)) AS `rown`
FROM `df`
Code
mf %>% group_by(y) %>% mutate(rown = row_number())
Output
<SQL>
SELECT
`df`.*,
ROW_NUMBER() OVER (PARTITION BY `y` ORDER BY (SELECT NULL)) AS `rown`
FROM `df`
Code
mf %>% arrange(y) %>% mutate(rown = row_number())
Output
<SQL>
SELECT `df`.*, ROW_NUMBER() OVER (ORDER BY `y`) AS `rown`
FROM `df`
ORDER BY `y`
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.