This repository provides a small synthetic e-commerce dataset along with helper scripts for generating CSVs, loading them into SQLite, and running analytical queries.
data/– generated CSV files (users.csv,products.csv,orders.csv,order_items.csv,payments.csv) plusgenerate_data.py.ingest.py– createsecommerce.db, defines tables, and loads the CSV files using pandas.query.sql– join query combining all entities.run_query.py– executesquery.sqlagainstecommerce.dband prints the result set.
- Python 3.8+
pip install pandas
- Generate data (optional if CSVs already exist)
python data/generate_data.py
- Load data into SQLite
This creates/overwrites
python ingest.py
ecommerce.dbin the project root and printsIngestion complete. - Run the join query
Outputs the joined table defined in
python run_query.py
query.sql.
- Adjust record counts or value ranges by editing
data/generate_data.py. - Modify
query.sqlto explore other questions, then re-runrun_query.py.
This dataset and scripts are provided for demonstration and testing purposes. Use freely within your projects.***