我正在尝试运行以下查询,但始终收到“错误:意外。请再试一次':
select sum( ssw.stem_count ) as sum_stem_count, ssw.stem, min( ssw.term )
from ( select * from mediacloud.ssw_2011_11_14_2011_11_20, mediacloud.ssw_2011_11_21_2011_11_27 )
as ssw left join mediacloud.topic_obama as ssw_q
on ssw.stories_id = ssw_q.stories_id
group by ssw.stem order by sum_stem_count desc limit 1000;
以下查询工作正常:
select sum( ssw.stem_count ) as sum_stem_count, ssw.stem, min( ssw.term )
from mediacloud.ssw_2011_11_14_2011_11_20 as ssw
left join mediacloud.topic_obama as ssw_q
on ssw.stories_id = ssw_q.stories_id
group by ssw.stem order by sum_stem_count desc limit 1000;
文档似乎说子查询可以用作 from 子句中的条目,但我无法让它工作。我究竟做错了什么?