3 ms·
This doesn't work, at least in PostgreSQL: select b, max(a) as ma from t group by b where ma > 100 ERROR: column "ma" does not exist You woul
by combatentropy 10y ago
This doesn't work, at least in PostgreSQL:
select b, max(a) as ma
from t
group by b
where ma > 100
ERROR: column "ma" does not exist
You would have to use the having clause:
select b
from t
group by b
having max(a) > 100