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:
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?
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?