split_query | R Documentation |
Splits a SQL SELECT
statement into clauses, and splits
comma-separated column lists within the clauses.
split_query(query, tidyverse)
query |
a character string containing a SQL |
tidyverse |
for queryparser internal use only |
A list object with named elements representing the clauses of the query
parse_query
my_query <- "SELECT origin, dest, COUNT(flight) AS num_flts, round(AVG(distance)) AS dist, round(AVG(arr_delay)) AS avg_delay FROM flights WHERE distance BETWEEN 200 AND 300 AND air_time IS NOT NULL GROUP BY origin, dest HAVING num_flts > 3000 ORDER BY num_flts DESC, avg_delay DESC LIMIT 100;" split_query(my_query)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.