开发者

SQLite subquery syntax error near "("

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)
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜