[Solved] Select from Two tables last name first name and avg salary in descending order by last name


You use JOIN but didn’t use on to connect two table, from your tables you might use actorID columns to be the connected condition.

when you use an aggregate function you might use non-aggregate columns in group by

SELECT a.lname,a.fname,AVG(c.salary)
FROM Actor a 
JOIN Castings c on a.actorID = c.actorID 
group by a.lname,a.fname
order by a.lname desc

Here is a link talking about JOIN

3

solved Select from Two tables last name first name and avg salary in descending order by last name