Start here to learn what DuckDB is, why it shines for analytics, and how this course is structured.
By Kevin McAleer, 3 Minutes
DuckDB for Analytics β Introduction
DuckDB is an in-process, columnarSQL database that runs anywhere you can run your app. It excels at fast analytical queries on local files like Parquet and CSV, without needing a server, a cluster, or cloud credits.
New to terms like Parquet, CTE, or materialize? See the Beginner glossary.
This course is part of the Databases learning pathway, focused on practical analytics: querying files, creating small analytical datasets, and integrating with Python.
What youβll learn
Install and run DuckDB (CLI and Python)
Query CSV/Parquet directly with SQL
Create and persist a local analytics database
Work with DuckDB from Python and Pandas/Polars
Read data from data lakes (local, HTTP/S3) and tune performance
Use extensions and best practices for analytical workloads
Who this is for
Makers, analysts, and developers who want fast local analytics
Beginners to databases and data lakes who prefer practical examples
Prerequisites
Basic command line and Python familiarity
macOS, Linux, or Windows
Optional: Python 3.10+ and VS Code for notebook-style work
Why DuckDB
No server: embed it in your scripts and apps
Fast analytical SQL: vectorized, columnar execution
File-first: query Parquet/CSV directly, no ETL required
Great with Python: query DataFrames and return results as DataFrames
Portable: a single .duckdb file you can version and ship
When to choose it:
You need quick, local analytics (OLAP) on files
You want to prototype or build repeatable data workflows without infra
You want SQL over DataFrames, or to complement Pandas/Polars
Quick start (macOS)
CLI: brew install duckdb
Python: python -m pip install duckdb
Try the CLI:
duckdb
Then run a tiny analytics query directly on a CSV from the web:
-- Create a table from a remote CSVCREATETABLEtipsASSELECT*FROMread_csv_auto('https://raw.githubusercontent.com/mwaskom/seaborn-data/master/tips.csv');-- Simple aggregateSELECTday,ROUND(SUM(total_bill),2)ASrevenue,COUNT(*)ASordersFROMtipsGROUPBYdayORDERBYrevenueDESC;
Exit with .quit.
Or from Python:
importduckdb,pandasaspddf=pd.read_csv('https://raw.githubusercontent.com/mwaskom/seaborn-data/master/tips.csv')# Query a DataFrame directly
result=duckdb.query("""
SELECT day, AVG(total_bill) AS avg_bill
FROM df
GROUP BY day
ORDER BY avg_bill DESC
""").df()print(result)
What weβll build in this course
A small, local analytics workspace using DuckDB
Reproducible queries over CSV/Parquet (local and remote)
A persisted .duckdb database and lightweight βdata martβ
Python integrations for analysis and notebooks (like Jupyter notebooks)
Practical performance tips (statistics, Parquet predicate pushdown, and more)
Comments