I have an sql query that will return the average sold price for a given property type at a particular year.
SELECT
`table`.Property AS 'Property',
`table`.Year AS 'Year',
AVG(`table`.`Value`) AS 'Average Sold Price'
FROM
`table`
WHERE `table`.`Area` LIKE '%NW1%'
AND `table`.`Property` LIKE '%F%'
AND `table`.`Year` = '2011'
GROUP BY `table`.Property,`table`.Year
ORDER BY
`table`.Property ASC
the output looks like this
| Property | Year | Average Sold Price
| F | 2011 | 440242.18137204903
on a look up at 2016
| Property | Year | Average Sold Price
| F | 2016 | 702453.9544754727
-- how would I alter the query to get a merged output - so something like this, try to reduce the number of calls etc..
| Property | Average Sold Price (2011) | Average Sold Price (2016)
| F | 440242.18137204903 | 702453.9544754727