所以我试图在我的数据库上执行此查询:
select
count(*)
from (select
userID
from users
where rating> 1000
except (select
userID
from users
where rating > 1000
except select sellerID from auctions));
我收到此错误: “错误:靠近第1行:靠近”(“:语法错误”
任何帮助表示赞赏
答案 0 :(得分:5)
如何使用它呢?这是逻辑上的等价物吗?
SELECT COUNT(*) FROM Users
WHERE Rating > 1000
AND UserID NOT IN (SELECT SellerID FROM Auctions)