3 Executing SQL Queries
This chapter covers
- The different categories of SQL statements and their fundamental structure
- Creating tables and structures for ingesting a real world dataset
- Laying the fundamentals for analyzing a huge dataset in detail
- Exploring DuckDB-specific extensions to SQL
Now that you’ve learned about the DuckDB CLI, it’s time to tickle your SQL brain. We will be using the CLI version of DuckDB throughout this chapter. However, all the examples here can be fully applied from within any of the supported environments, such as the Python client, the Java JDBC driver, or any of the other supported language interfaces.
In this chapter, we will quickly go over some basic and necessary SQL statements and then move on to more advanced querying. In addition to explaining SQL basics, we’ll also be covering more complex topics like common table expressions and window functions. DuckDB supports both of these and this chapter will teach you how to build queries for doing the best possible in-memory Online Analytical Processing (OLAP) with DuckDB.