每一个派生表必须有它自己的别名
select count(*) from (select t.a from test t group by t.a)
解决办法:
select count(*) from (select t.a from test t group by t.a)[color=red]c[/color]
select count(*) from (select t.a from test t group by t.a)
解决办法:
select count(*) from (select t.a from test t group by t.a)[color=red]c[/color]