postgresql must appear in the group by clause or be used in an aggregate function
Try using "DISTINCT" instead of "GROUP BY"
postgresql must appear in the group by clause or be used in an aggregate function
Try using "DISTINCT" instead of "GROUP BY"
column must appear in the GROUP BY clause or be used in an aggregate function
SELECT m.cname, m.wmname, t.mx
FROM (
SELECT cname, MAX(avg) AS mx
FROM makerar
GROUP BY cname
) t JOIN makerar m ON m.cname = t.cname AND t.mx = m.avg
;
cname | wmname | mx
--------+--------+------------------------
canada | zoro | 2.0000000000000000
spain | usopp | 5.0000000000000000
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us