我不断收到一条错误消息,显示“列名无效”'a'。任何人都可以帮忙吗?
Select
datename(mm,t.gift_date) as month,
s.campaign as campaign,
count(s.Campaign) as a
From usga_stage.facts.transactions t, usga_dw.dbo.DimSourceCode s
Where t.trans_source=s.SourceCode
and t.payment_channel = 'Web'
and t.gift_date like '2013%'
Group by month(t.gift_date),Campaign, a
按月(t.gift_date)、活动、a 排序