SELECT *,
(select SUM(sl.priceeach*sl.qty) as 'tot'
from salesline sl where sl.soid=so.soid) as 'total',
so.total,
so.discount,
so.tax
from salesorder so
我试图弄清楚这个查询,但我无法在另一列中显示总数以显示含税和减去折扣的数据
ERROR : #1054 - Unknown column 'so.total' in 'field list'
我的查询有什么问题?