So I am trying to perform th开发者_开发百科is query on my database:
select
count(*)
from (select
userID
from users
where rating> 1000
except (select
userID
from users
where rating > 1000
except select sellerID from auctions));
And am getting this error: "Error: near line 1: near "(": syntax error"
Any help appreciated
How about using this instead? Is this the logical equivalent?
SELECT COUNT(*) FROM Users
WHERE Rating > 1000
AND UserID NOT IN (SELECT SellerID FROM Auctions)
精彩评论