Subject: | 'SELECT SUM(f) FROM t' works but 'SELECT SUM(f)/2 FROM t' fails with: Can't find table containing column named 'sum' |
'SELECT SUM(f) FROM t' works but 'SELECT SUM(f)/2 FROM t' fails with: Can't find table containing column named 'sum'.
Same with other aggregate function like COUNT() or AVG().
Same happens with other expressions like 2*SUM(f), AVG(f)+100, and so on.