This device is not compatible.
You will learn to:
Design a relational database schema using SQLite.
Insert data into a database using Python’s sqlite3 module.
Write SQL queries and aggregate functions.
Calculate totals and counts using SQL functions across joined tables.
Organize query logic into reusable Python functions.
Skills
Database
Database Design
Data Engineering
Prerequisites
Basic familiarity with VS Code
Basic understanding of Python functions and scripts
Familiarity with the basics of databases
Technologies
MYSQL
Python
Project Description
In this project, we’ll build a terminal-based sales analytics pipeline for a coffee shop using Python and SQLite. We’ll first design a relational schema with four related tables, populate it with sample transactional data, and then write SQL queries to extract key business metrics. We’ll use core SQL features such as JOIN, GROUP BY, SUM, COUNT, and ORDER BY. We’ll also use Python’s built-in sqlite3 module to connect to the database and run queries without external dependencies.
By the end of the project, we’ll have a terminal-based sales analytics tool that answers four business questions: which items sell the most, which menu category generates the highest revenue, which hours are busiest, and which staff member processes the most transactions. All four analyses are combined into a formatted report that prints to the terminal with a single command. This creates a clean, repeatable pipeline that can be run on demand.
Project Tasks
1
Getting Started
Task 0: Get Started
Task 1: Set Up the Database and Create Tables
Task 2: Populate the Database with Sample Data
2
Querying the Data
Task 3: Query Best-Selling Menu Items
Task 4: Analyze the Revenue by Category
Task 5: Identify Peak Sales Hours
Task 6: Find the Top-Performing Staff
3
Bringing It Together
Task 7: Generate the Final Sales Report
Congratulations!
Subscribe to project updates
Atabek BEKENOV
Senior Software Engineer
Pradip Pariyar
Senior Software Engineer
Renzo Scriber
Senior Software Engineer
Vasiliki Nikolaidi
Senior Software Engineer
Juan Carlos Valerio Arrieta
Senior Software Engineer
Relevant Courses
Use the following content to review prerequisites or explore specific concepts in detail.