我要问:
SELECT
offer,
(SELECT
AVG(offer)
FROM
project_bids
) as var1
FROM
`project_bids`
WHERE
offer > var1
It causes "#1054 - Unknown column var1 in where clause " error. Can anybody expalain why gives that error ? (i know working sql but i want to learn why it fails)