V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  pupilGradeSix  ›  全部回复第 1 页 / 共 1 页
回复总数  1
2019-02-18 00:28:51 +08:00
回复了 qwa123 创建的主题 程序员 小白求大佬帮我看下这条 sql 怎么写
可能对于专业的来说太简单了,但我作为一个前端,你这个 sql 着实让我感兴趣了啊。研究了好一会
```
SELECT batchId,
group_concat( CASE WHEN type = 1 THEN
bizId ELSE null END) as "uid",
group_concat( CASE WHEN type = 2 THEN
bizId ELSE null END) as "typeid"
FROM test
GROUP BY batchId;

```
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   5878 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 12ms · UTC 06:39 · PVG 14:39 · LAX 23:39 · JFK 02:39
Developed with CodeLauncher
♥ Do have faith in what you're doing.