|
15 Mar 2011
Updated: 15 Mar 2011
Rating: 0.00/5
Votes: 0
Popularity: 0.00
Licence: CPOL
Views: 6,411
Bookmarked: 3
Downloaded: 0
select ExDate, SUM(case when Dept='A' then expense else 0 end)[Store A Expense],SUM(case when Dept='B' then expense else 0 end)[Store B Expense],SUM(case when Dept='C' then expense else 0 end)[Store C Expense]from expenseTable where Dept in ('A','B','C') group by ExDate
|