SELECT
*,
IFNULL((SELECT
SUM(`rating`)
FROM
`shop_rating`
WHERE
`shop_rating`.`shop_id` = `user_response`.`user_id`
GROUP BY `shop_id`
ORDER BY `shop_rating`.`date` DESC
LIMIT 1),0) AS rating,
(SELECT
`shop_rating`.`date` as rating_id
FROM
`shop_rating`
WHERE
`shop_rating`.`response_id` = `user_response`.`id`
AND
`shop_rating`.`date` >= NOW() - INTERVAL 1 HOUR) as rating_last_date
FROM
`user_response`
WHERE
`user_response`.`is_accepted` = 1
AND
`user_response`.`is_confirmed_by_shop` = 0
AND
`user_response`.`created_at` < NOW() - INTERVAL 1 HOUR
AND
rating_last_date IS NOT NULL
Выдает ошибку: