node.js - mysql 使用UNION ALL问题
大家讲道理
大家讲道理 2017-04-17 15:06:37
0
0
589

SELECT LEVEL,man,woman FROM(
SELECT LEVEL,COUNT(*) AS 'woman' FROM
(SELECT id,LEVEL,sex FROM player_attributes WHERE sex=1)t1 GROUP BY LEVEL
UNION ALL
SELECT LEVEL,COUNT(*) AS 'man' FROM
(SELECT id,LEVEL,sex FROM player_attributes WHERE sex=0)t2 GROUP BY LEVEL
)t5 GROUP BY LEVEL

运行后报错:Unknown column 'man' in 'field list'

大家讲道理
大家讲道理

光阴似箭催人老,日月如移越少年。

全部回覆(0)
熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板