I am very new to the SQL coding and I am struggling with this query.
I need to retrieve the MAX roomPrice AS "Total Room Cost" in a building chain grouped by buildingNo and the subquery forms part of the FROM statement.
The table consists of roomNo(pk), buildingNo(fk), roomSize, roomPrice
Each building has a number of rooms so I know I need to get the SUM of those before I can do the MAX.
I know it sounds easy but for me just learning it has been doing my head in.
Any help would be much appreciated