Creates a SQL pivot query. Similar to the tidyr::gather
function.
sql_unpivot(con, from, select, key, value, levels, order_by = NULL)
a Database connection
the from clause
variables to select in addition to levels.
Variable columns originate from
The expression to evaluate to create the values
the columns to turn into values of a variable.
optional order by clause