postgreSQL question

Associate
Joined
4 Mar 2007
Posts
315
Location
United Kingdom
So, I have two tables, A and B of which I want to get EVERYTHING from one table and only a grouped segment from B. I have B Working like so:

Code:
SELECT id, AVG(price) AS avgPrice FROM B GROUP BY id ORDER BY AVG(price) DESC

Which is good, However In table A I need to get the persons first name and last name. Ultimatley outputting. the Id, the Average Price, first name, last name.

Any clues on how I would go about doing this?
 
Back
Top Bottom