class: left, top, title-slide .title[ # Relational Data
SQL Queries ] .author[ ### Keith VanderLinden
Calvin University ] --- # The Structured Query Language .pull-left[ SQL is the standard language used to work with relational databases. It provides a *data query language* (DQL). <pre> SELECT <i>list-of-field-names</i> FROM <i>list-of-table-names</i> [ JOIN <i>join-table-condition</i> ] [ WHERE <i>list-of-filter-conditions</i> ] [ORDER BY <i>list-of-order-fields</i> ]</pre> The clauses in square brackets (`[]`) are optional. `dplyr` functions were modeled on SQL. ] ??? - Queries retrieve data from databases. - We now demo some basic SQL query commands, querying the same database using both: - `dplyr` commands in RStudio - Students can do this using the demo Rmd document. - SQL on ElephantSQL, a cloud database service - Only I can do this using my ElephantSQL login. --- # Data Query Demo .pull-left[ We now demo data queries using both `dplyr` and SQL. The demo will run queries on our local machine that access data from a cloud database system.  We’ll run RStudio on a local machine and connect to [ElephantSQL](https://www.elephantsql.com/). ] ??? The students may well be running RStudio in the cloud as well (rstudio.calvin.edu).