runtime
296 / 500
question 296 Packaging & Databases · medium

The repeat-customers report

repeat_customers(conn, city, min_orders) should list the customers in a city with at least min_orders orders. Support reports two problems: for the city Coeur d'Alene the report crashes, and customers with exactly min_orders orders are missing. Fix both.

Functionrepeat_customers(conn, city, min_orders)
Tablescustomers (customer_id, last_name, city), orders (order_id, customer_id, total)
Returns[(customer_id, order_count), …] ordered by customer_id

Loading your progress…

The repeat-customers report — Python practice · Runtime