当前位置:网站首页>SqlServer行转列PIVOT
SqlServer行转列PIVOT
2022-07-03 02:39:00 【鏗木鏘林】
现有原始数据表:SELECT * FROM FIX_0528_ADD

需要将FMONTH字段行转成列,汇总FADD数量:
SELECT FNAME,[2022-01],[2022-02],[2022-03],[2022-04]
FROM FIX_0528_ADD
PIVOT(SUM(FADD) FOR FMONTH IN ([2022-01],[2022-02],[2022-03],[2022-04])) T执行后结果:

边栏推荐
- GBase 8c系统表-pg_amproc
- 【教程】chrome关闭跨域策略cors、samesite,跨域带上cookie
- The Linux server needs to install the agent software EPS (agent) database
- GBase 8c系统表-pg_amop
- [fluent] futurebuilder asynchronous programming (futurebuilder construction method | asyncsnapshot asynchronous calculation)
- UDP receive queue and multiple initialization test
- SPI mechanism
- Gbase 8C system table PG_ authid
- Gbase 8C system table PG_ cast
- Gbase 8C system table PG_ aggregate
猜你喜欢

The data in servlet is transferred to JSP page, and the problem cannot be displayed using El expression ${}

UDP receive queue and multiple initialization test

Producer consumer model based on thread pool (including blocking queue)

Basic operation of binary tree (C language version)

Create + register sub apps_ Define routes, global routes and sub routes
[advanced ROS] Lesson 6 recording and playback in ROS (rosbag)

HTB-Devel

Detailed analysis of micro service component sentinel (hystrix)

HTB-Devel

SQL statement
随机推荐
Codeforces Round #418 (Div. 2) D. An overnight dance in discotheque
Gbase 8C system table PG_ conversion
《MATLAB 神经网络43个案例分析》:第43章 神经网络高效编程技巧——基于MATLAB R2012b新版本特性的探讨
cvpr2022去雨去雾
Gbase 8C system table PG_ aggregate
定了,就选它
[shutter] bottom navigation bar page frame (bottomnavigationbar bottom navigation bar | pageview sliding page | bottom navigation and sliding page associated operation)
Current situation and future of Web3 in various countries
Linear rectification function relu and its variants in deep learning activation function
怎么将yolov5中的PANet层改为BiFPN
[codeforces] cf1338a - Powered addition [binary]
GBase 8c系统表-pg_amproc
How to change the panet layer in yolov5 to bifpn
Can netstat still play like this?
Restcloud ETL cross database data aggregation operation
Awk from getting started to being buried (2) understand the built-in variables and the use of variables in awk
Memory pool (understand the process of new developing space from the perspective of kernel)
xiaodi-笔记
Build a private cloud disk cloudrev
leetcode540