SELECT t.title, (
SELECT AVG(star_rating)
FROM reviews r
WHERE r.id = t.id ) AS rating
FROM table_1 t
WHERE rating >= '4'
PHPMYADMIN显示错误 - > 'where中的未知列'评级' 条款“
答案 0 :(得分:0)
试试这个;
SELECT t.title,
(SELECT AVG(star_rating)
FROM reviews r
WHERE r.id = t.id ) AS rating
FROM table_1 t
WHERE (SELECT AVG(star_rating)
FROM reviews r
WHERE r.id = t.id ) >= 4