Я пытаюсь отображать свои годовые сводные данные в новом формате от оригинала. В текущем формате отображается номер клиента, год и общая сумма за каждый месяц этого месяца. Имена Example.Column являются клиентами, 0 в течение года и 1-12 месяцев дляОтображение ежегодных сводных данных в SQL
customer 0 1 2 3 4 5 6 7 8 9 10 11 12
VALLERO 2014 634.150000 560.740000 254.670000 370.292500 99.225000 157.426666 358.650000 190.925000 767.515000 71.665000 587.305000 615.525000
VALLERO 2015 634.150000 560.740000 254.670000 370.292500 99.225000 157.426666 358.650000 190.925000 767.515000 71.665000 587.305000 615.525000
Что мне нужно сейчас, чтобы изменить формат, чтобы быть что-то вроде этого.
customer year1 total1 year2 total2
VALLERO 2014 0.00 2015 0.00
Спасибо! Это меня очень близко к тому, что мне нужно отображать. Один вопрос, хотя я пытался установить его так, чтобы только один год мог находиться в столбце, таком как «год1», будет удерживаться «2014», а «year2» будет содержать «2015», тогда, если у человека не было данных для этого в конкретном году у них будет «нуль» за этот год. – mfoehrer