开发者

SQLite subquery syntax error near "("

开发者 https://www.devze.com 2023-01-23 19:46 出处:网络
So I am trying to perform th开发者_开发百科is query on my database: select count(*) from (select

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

精彩评论

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