ชื่อของลูกค้าที่ซื้อสินค้ามากที่สุดคืออะไร?
What is the name of the customer that has purchased the most items?
df_order_items = pd.DataFrame(columns=['order_id', 'order_quantity']); df_customers = pd.DataFrame(columns=['customer_name', 'customer_id']); df_customer_orders = pd.DataFrame(columns=['customer_id', 'order_id'])
df_customers.loc[df_customers['customer_id'].isin(df_customer_orders.loc[df_customer_orders['order_id'].isin(df_order_items.groupby('order_id')['order_quantity'].idxmax())]['customer_id']), 'customer_name']