找出买全了所有品类的客户。
- “买过”只看
status = 'paid'的订单;cancelled / refunded / pending 订单里的商品不算。 - “所有品类”指
products表中出现的全部非 nullcategory(去重),包括从来没卖出过的商品所在的品类。category为 null 的商品不属于任何品类,买了也不加分,也不计入品类总数。 - 同一品类买多件、多次只算一次;一个客户的多笔订单合起来算。
- 只输出
customers表里存在的客户;customer_id为 null 或在客户表中找不到的订单忽略。 - 如果没有任何客户满足条件,输出空表(保留列名)。
输入
customers(customer_id, name, email, city, signup_date, tier)products(product_id, name, category, price, cost, launched_on)orders(order_id, customer_id, order_ts, status, channel)order_items(order_id, product_id, qty, unit_price, discount)
输出
列为 customer_id, name,行顺序不限。