I wrote the following query:
SELECT DISTINCT gno, avg(weight) as x
FROM Edge
GROUP BY gno
HAVING avg(weight)<max(weight)/2
and got this (correct) table:

now i want to use the right column and find the max value there and show only that line. how can I do it?