Database-backed price tracker with SQL change detection and price-drop alerts (SQLite + Python).
A database-backed price tracking system that stores price history across runs and detects price changes (drops/rises) using SQL window functions. Built for competitor monitoring and market intelligence workflows.
- Creates a SQLite database with two tables:
runsandprices - Inserts a new “run” each time prices are captured
- Compares the latest run vs the previous run per product
- Flags meaningful price drops (alert logic)
- Python 3
- SQLite3
- SQL window functions (
ROW_NUMBER())
reset_db.py— createsmarket_data.db+ tables and seeds sample datainsert_run_and_prices.py— inserts a baseline run (3 products)insert_run_with_changes.py— inserts another run with simulated price changes (drop/rise)
Note:
market_data.dbis generated locally and is not committed.
python3 reset_db.py
python3 insert_run_and_prices.py
python3 insert_run_with_changes.py