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.
我正在尝试运行此查询
select customerID, sum(OrderID) from employee_T where 2 < select(sum(OrderID) from employee_T) group by customerID;
我想列出客户 ID 以及为每个拥有超过 2 个订单的客户下的订单总数。
我在这一行得到语法错误
where 2 < select(sum(OrderID) from employee_T)
是因为 2?s
我不熟悉 ms-access 语法,但这是您在常规 sql 中执行此操作的方式:
select customerID, count(OrderID) from employee_T group by customerID having count(orderID) > 2