我想用用户名获取一些不在评分表中的详细信息,并进行了交叉连接查询。但它显示了语法错误
SELECT applications.reference as "User id", applications.id
FROM applications
cross join ratings where (applications.id) NOT IN ( SELECT ratings.application_id FROM ratings )
INNER JOIN ratings ON users.id=ratings.user_id
错误显示
# 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'INNER JOIN ratings ON users.id=ratings.user_id LIMIT 0, 25' at line 2
我想获得应用程序中的用户详细信息,其中不在评分表中,用户名在用户表中。我怎样才能解决这个问题?
2条答案
按热度按时间lsmepo6l1#
选择applications.reference作为“user id”,applications.id from applications inner join ratings on users.id=ratings.user\u id交叉连接ratings where(applications.id)not in(选择ratings.application\u id from ratings)
z4iuyo4d2#
我想你需要这样一个问题: