Det kan göras med några knep.
SELECT id,
price,
code
FROM table1
WHERE id IN (SELECT Ceil(Avg(id)) AS `id`
FROM table1
GROUP BY code);
Det kan göras med några knep.
SELECT id,
price,
code
FROM table1
WHERE id IN (SELECT Ceil(Avg(id)) AS `id`
FROM table1
GROUP BY code);