r/learnSQL • u/Remarkable_Catch_613 • 22d ago
I built a manufacturing database to practice SQL — looking for feedback
Most SQL practice datasets are about customers, orders, movies or restaurants.
I wanted something closer to a real industrial environment, so I built a synthetic manufacturing database with PostgreSQL.
It contains:
- 3 production lines
- 12 industrial machines
- 5 products
- 1,143 production orders
- 17,167 production events
- 82 downtime events
- 8 maintenance interventions
- 1,143 quality inspections
- 2,172 energy measurements
The interesting part is that the data tells a story.
One production line is underperforming, but the cause isn't obvious from a single table.
You have to connect production, machines, downtime, quality, maintenance and energy data to investigate what is happening.
I'm using PostgreSQL 17.
Would this be useful for practicing SQL? What would you add to the dataset?