I'm trying a SEDE query to known the questions that has an accepted answer and with big difference of votes between the accepted answer as "best" answer.
My try of query is:
SELECT TOP 10 q.Title, (select max(m.Score) from Posts m where m.ParentId = q.Id ) as Maximum, a.Score as Accepted FROM Posts q INNER JOIN Posts a ON q.AcceptedAnswerId = a.Id WHERE q.PostTypeId = 1 order by Maximum-Accepted desc
however, following error appears:
Invalid column name 'Maximum'. Invalid column name 'Accepted'.
Looking for examples, I see similar ones, it seems the query is near than ok, but I do not see where is the error.
Any help is welcome.