Oreilly Advanced SQL For Data Analysis
Oreilly Advanced SQL For Data Analysis
Author of Ge#ng Started with SQL by O'Reilly and Learning RxJava by Packt
For Windows and Linux, simply unzip the folder to a locaCon of your choice and open
SQLiteStudio or SQLiteStudio.exe
For MacOS, double-click the downloaded DMG to install it or drag it to your ApplicaCons folder
Getting Resource Files
The few resources needed for this class are available on GitHub:
hSps://github.com/thomasnield/oreilly_advanced_sql_for_data
Unzip the contents to a locaCon of your choice, and note where you put them
Contents include:
◦ A SQLite database file called thunderbird_manufacturing.db
◦ Class notes with all examples (in three formats)
◦ A customer_order.sql SQL script file to create a CUSTOMER_ORDER table
Section II Exercise
Bring in all fields from CUSTOMER_ORDER, but for each record show the total quanCty ordered
for that given CUSTOMER_ID and PRODUCT_ID.
Section III Exercise
Find all customers with an address ending in "Blvd" or "St"
Section VI Exercise
For every CALENDAR_DATE and CUSTOMER_ID, show the total QUANTITY ordered for the date
range of 2017-01-01 to 2017-03-31:
Section V Exercise
For the month of March, bring in the rolling sum of QUANTITY ordered (to each ORDER_DATE) by
CUSTOMER_ID and PRODUCT_ID.
Windowing Functions Support
Windowing funcCons are found on many database plagorms, including:
◦ Oracle
◦ Teradata
◦ PostgreSQL
◦ SQL Server
◦ Apache Spark SQL
◦ MySQL 8