我是SQL新手,这里有一个使用以下查询的表: select concat((sum(sales)/10250) * 100, '%') as 'sales_percentage' group by shop_name; 输出: +-----------+-------------+---31.7100% |
+-----------+--
t_score.s3) as score where t_score.id_sub = t_sub.id_sub AND t_score.id_sub = 1
GROUPt_score.s1' is invalid in the select list because it is not contained in either an aggregate function or the GROUPt_score.s2' is invalid in the select list because it
from Mappings where MT = A) as 'Cat'where A in (select MT from Mappings where AED in (@Cli))目前我的数据是对A上的数据进行计数和求和,但我希望由Cat对数据进行计数和求和。有没有办法对另一列上的数据进行分组任何帮助我们都将不胜感激