For each bike repair shop, find the number of completed repairs and the median repair duration in hours. Do not count unfinished repairs; exclude shops with no completed repairs.
Columns: shop_name, completed_repairs, median_hours
Round the median to 2 decimal places. Sort by median_hours in descending order, then by shop_name in ascending order.
PostgreSQL 17; the query is run in a browser.
Starting PostgreSQL…
Starting PostgreSQL…