Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想从订单表中查询客户,只有两次以上的客户订单是合格的。我应该使用哪个子句或过滤器来过滤这些客户订单两次以上?请帮助我使用 SQLite。
最好的问候汤姆
SELECT customer_id FROM orders GROUP BY customer_id HAVING count(*) > 2;
将来,请提供更多信息,例如表定义,否则您可能会得到一些反对票:)