我的mysql查询有问题,
我有这些表格:上传、用户和评级。
我正在使用以下查询来获取我的最新帖子:
Select All
upload.*,
Count(ratings.id) As totalrates,
Avg(ratings.rating) As avgrating,
users.nickname
From upload
Inner Join ratings
On ratings.upload_id1 = upload.id
Inner Join users
On upload.users_id = users.id
Group By upload.id DESC
但是,当帖子还没有任何评分时,它不会出现,因此无法投票:p
是否有任何人知道如何调整此查询或有关如何解决此问题的任何其他好的建议?
非常感谢!