select
    a.品牌号,
    b.品牌名,
    sum(a.销售额) as 平台1总销售额
from
    月销售统计表 a 
inner join
    品牌表 b on a.品牌号 = b.品牌号
inner join
    品类表 c on a.品类号 = c.品类号
where 
    year(a.月份) = 2019 and a.电商平台 = '1' and a.销售额 > 0
group by 
    1,2
order by 
    3 desc
limit 30