SELECT us.name, us.email, us.order_count, us.lifetime_value, us.last_order_date, CASE WHEN us.lifetime_value > 1000 THEN 'VIP' WHEN us.lifetime_value > 500 THEN 'Premium' ELSE 'Standard' END as customer_tier FROM user_stats WHERE active = true AND o.status IN ('completed', 'shipped') AND us.order_count > 0 GROUP BY u.id, u.name, u.email ORDER BY US.LIFETIME_VALUE DESC, US.ORDER_COUNT DESC