Код: Выделить всё
WITH temp_table AS (
SELECT *
FROM (SELECT *, ROW_NUMBER() OVER(PARTITION BY games ORDER BY id desc ) AS RN FROM marks WHERE mark not in ('minus,46px,yellow', 'question,46px,yellow') and games in ('football', 'tennis')) sub
WHERE RN
Подробнее здесь: [url]https://stackoverflow.com/questions/79342176/mysql-update-statement-not-working-after-with-clause[/url]
Мобильная версия