SQL - Pivot on Multiple Columns

SQL - Pivot on Multiple Columns

Siddharth Mishra

4 года назад

10,891 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Vino
Vino - 16.03.2023 13:19

tq so much

Ответить
sơn Đào an
sơn Đào an - 20.06.2022 22:17

it very helpfull

Ответить
krirk luangratchapan
krirk luangratchapan - 13.06.2022 13:52

Thank you sir

Ответить
priya gupta
priya gupta - 10.02.2022 15:26

Thanks a lot, it solved my issue.

Ответить
Gray Meiring
Gray Meiring - 08.02.2022 15:17

Thank you so much, this was so helpful! :)

Ответить
sơn Đào an
sơn Đào an - 15.12.2021 09:57

Nice

Ответить
Jay Ray
Jay Ray - 04.06.2021 23:51

Silent Movie?!!!!

Ответить
omar aissa
omar aissa - 11.10.2020 00:17

using union query and one column
select [Year] ,CameraQt,CameraValue,ComputerQt,ComputerValue from
(
Select [year],product +'Qt' as Product,Qt as Value from PivotTable
union
Select [year],product +'Value' as Product,AMT as Value from PivotTable) as Sub3
Pivot
(
Sum(Value)
for Product
in (CameraQt,CameraValue,ComputerQt,ComputerValue)

) as PV

Ответить
sancar avcioglu
sancar avcioglu - 20.02.2020 00:21

Thanks for bringing an insight on one of the less known feature, pivoting in SQL server

Ответить