gpt4 book ai didi

sql-server - 我在哪里可以找到有关如何编写数据透视 SQL 查询的指南或示例?

转载 作者:搜寻专家 更新时间:2023-10-30 20:36:34 24 4
gpt4 key购买 nike

<分区>

我在哪里可以找到有关如何编写数据透视 SQL 查询的指南或示例?

我正在使用这个临时表作为练习。

表格脚本:

CREATE TABLE #PVT (Vendor varchar(20), ConsultantID smallint, Billrate money);

INSERT #PVT VALUES
('Volt Consulting',1,100), ('Volt Consulting',2,180),
('Volt Consulting',3,200), ('Volt Consulting',4,120),
('Volt Consulting',5,240), ('TekSystem Consulting',1,110),
('TekSystem Consulting',2,120), ('TekSystem Consulting',3,130),
('TekSystem Consulting',4,220), ('TekSystem Consulting',5,230),
('Bridge Consulting',1,95), ('Bridge Consulting',2,90),
('Bridge Consulting',3,104), ('Bridge Consulting',4,103),
('Bridge Consulting',5,100), ('ChinaSoft Consulting',1,108),
('ChinaSoft Consulting',2,115), ('ChinaSoft Consulting',3,125),
('ChinaSoft Consulting',4,130), ('ChinaSoft Consulting',5,120),
('Excell Data',1,140), ('Excell Data',2,143),
('Excell Data',3,140), ('Excell Data',4,145),
('Excell Data',5,200);

SELECT *
FROM #PVT;
GO

提前谢谢你:)

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com