powered by
Unqualifies column references in the clauses of a parsed SQL SELECT statement that begin with any of the specified prefixes followed by a dot
SELECT
unqualify_query(tree, prefixes, except = character(0))
A list the same as tree but with all column references in the
tree
SELECT, WHERE, GROUP BY, HAVING, and
WHERE
GROUP BY
HAVING
ORDER BY clauses unqualified, except those in except
ORDER BY
except
a list returned by parse_query containing named elements representing the clauses of a SQL SELECT statement
parse_query
a character vector containing one or more table names or table aliases
a character vector containing column references to leave as is (optional)
In the returned list, the FROM clause is unmodified and column alias assignments made in the SELECT clause are unmodified.
FROM
my_query <- "SELECT f.flight, manufacturer, p.model FROM flights f JOIN planes p USING (tailnum);" unqualify_query( parse_query(my_query), prefixes = c("p", "f") )
Run the code above in your browser using DataLab