powered by
Generate a PostgreSQL select statement, optionally execute the statement if con is not NULL.
querySELECT( select, from = list(), where = NULL, group_by = NULL, having = NULL, order_by = NULL, con = NULL )
A string, PostgreSQL select statement; or the results retrieved by DBI::dbGetQuery after executing the statement.
A vector of columns/items to select.
A string, the table(s) to select from.
A string, text to include in the where clause.
A vector of columns/items to group by.
A vector of conditions to be met by aggregations.
A vector of columns/items to order by.
A database connection that can be passed to DBI::dbSendQuery/DBI::dbGetQuery.
querySELECT( select = c("col1", "col2", "col1 + col2 AS col3"), from = "schema1.table1" )
Run the code above in your browser using DataLab