# NOT RUN {
library(dplyr)
# Returns the row count per am
mtcars %>%
db_compute_count(am)
# Returns the average mpg per am
mtcars %>%
db_compute_count(am, mean(mpg))
# Returns the average and sum of mpg per am
mtcars %>%
db_compute_count(am, mean(mpg), sum(mpg))
# }
Run the code above in your browser using DataLab