I have this table in Postgres:
name - varchar, weight and height - int4. I need to compute the ration of weight to maximum weight and height to the maximum height for each record.
So far I have only this:
select people.name, people.weight, people.height, people.weight/max(people.weight)
as weight_ratio, people.height/max(people.height) from people
but I get this error: column "people.name" must appear in the GROUP BY clause or be used in an aggregate function
How do I fix the issue?