0
我有这样的查询与子查询as clicks
我想做的事情,然后where clicks > 0
,但我得到一个错误,这不是一个公认的列。使用父母嵌套查询结果WHERE子句
SELECT top 10 *, (select count(*) FROM po_events aeclk WITH(NOLOCK) where (aeclk.[source] = ae.[source]) as clicks
FROM archived_events ae with(NOLOCK)
where clicks > 0
可能重复(http://stackoverflow.com/questions/8370114/referring-to-一列别名在-A-where子句) – Pondlife