题目链接:点击打开链接
题目大意:略。
解题思路:略。
AC 代码
-- 解决方案(1) WITH t AS(SELECT customer_id FROM Store GROUP BY customer_id HAVING MAX(amount) > 500) SELECT COUNT(*) rich_count FROM t -- 解决方案(2) SELECT COUNT(DISTINCT customer_id) rich_count FROM Store WHERE amount > 500