这属于嵌套语句的问题
比如你的sql语句本来为

select user_name,brand_name,count(sat_name) from a inner join b on a.goods_id=b.good_id where user_name='小明' and brand_name='花王' and sat_name='好评';

得到结果:

你想给他起个别名l1
你就这样就不会出错了,不要忘记在最后as l1:

select * from (select user_name,brand_name,count(sat_name) from a inner join b on a.goods_id=b.good_id where user_name='小明' and brand_name='花王' and sat_name='好评') as l1;