Drivers, cars, riders, trips and payments. More than fifteen hundred rides across Tashkent.
6 tables · 3,413 rows
One table: selecting, sorting, conditions
Grouping, counting, joining two tables
Subqueries, several JOINs, window functions
The lines show foreign keys: which table points to which.
Drivers
Cars
driver_id → drivers.idtariff_id → tariffs.id
Tariffs
Riders
Trips
rider_id → riders.iddriver_id → drivers.idcar_id → cars.idtariff_id → tariffs.id
Payments
trip_id → trips.id