惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Vercel News
Vercel News
Recorded Future
Recorded Future
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
The GitHub Blog
The GitHub Blog
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Google DeepMind News
Google DeepMind News
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Microsoft Azure Blog
Microsoft Azure Blog
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
M
MIT News - Artificial intelligence
云风的 BLOG
云风的 BLOG
Y
Y Combinator Blog
N
News | PayPal Newsroom
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Help Net Security
Help Net Security
博客园 - Franky
SecWiki News
SecWiki News
Recent Announcements
Recent Announcements
T
Troy Hunt's Blog
The Register - Security
The Register - Security
The Last Watchdog
The Last Watchdog
Webroot Blog
Webroot Blog
S
Security Affairs
博客园 - 司徒正美
S
Schneier on Security
I
InfoQ
博客园_首页
www.infosecurity-magazine.com
www.infosecurity-magazine.com
T
Threat Research - Cisco Blogs
Forbes - Security
Forbes - Security
腾讯CDC
N
Netflix TechBlog - Medium
N
News and Events Feed by Topic
Cloudbric
Cloudbric
T
The Exploit Database - CXSecurity.com
P
Proofpoint News Feed
A
About on SuperTechFans
Engineering at Meta
Engineering at Meta
Recent Commits to openclaw:main
Recent Commits to openclaw:main
B
Blog
V
Vulnerabilities – Threatpost
C
Check Point Blog
Google DeepMind News
Google DeepMind News
Google Online Security Blog
Google Online Security Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
Hacker News - Newest:
Hacker News - Newest: "LLM"
C
Cisco Blogs
Schneier on Security
Schneier on Security
O
OpenAI News
K
Kaspersky official blog

博客园 - gotolovo

导出csv 导出excel 正则学习电话匹配 logmanager des 加密 解密 - gotolovo c# 发送邮件 工作流学习过程-事务 工作流学习过程-状态机 蛋疼的viewstate 工作流学习过程-持久化服务 工作流学习过程-使用关联 工作流学习过程-本地服务之事件处理 工作流学习过程-本地服务之调用方法 工作流学习过程-验证活动 工作流学习过程-自定义活动 工作流学习过程-开篇 基本的几个排序算法 关于sql中时间的格式转换 请编程遍历页面上所有TextBox控件并给它赋值为空
数据行变列
gotolovo · 2010-06-25 · via 博客园 - gotolovo
CREATE TABLE [dbo].[Table_2](
	[rq] [datetime] NOT NULL,
	[shengfu] [nvarchar](4) NOT NULL
) ON [PRIMARY]


--insert into Table_2(rq,shengfu) values('2010-9-1','胜')
--insert into Table_2(rq,shengfu) values('2010-9-1','胜')
--insert into Table_2(rq,shengfu) values('2010-9-1','负')
--insert into Table_2(rq,shengfu) values('2010-9-1','负')
--insert into Table_2(rq,shengfu) values('2010-9-2','负')
--insert into Table_2(rq,shengfu) values('2010-9-2','负')
--insert into Table_2(rq,shengfu) values('2010-9-2','负')
--insert into Table_2(rq,shengfu) values('2010-9-2','胜')

生成格式如下:

rq
2010-09-01 2 3
2010-09-02 1 3

select rq, sum(CASe when shengfu ='胜' then 1 else 0 end) as 胜,
sum( CASe when shengfu ='负' then 1 else 0 end) as 负
from Table_2
group by rq