SQL语言 服务器: 消息 170,级别 15,状态 1,行 7 第 7 行: ')' 附近有语法错误。
SELECTAVG(it)FROM(SELECTMAX(2012-birth)asitWHEREsex=1UNIONALLSELECTMIN(2012-birth)asi...
SELECT AVG(it)
FROM
(
SELECT MAX( 2012 - birth ) as it WHERE sex = 1
UNION ALL
SELECT MIN( 2012 - birth ) as it WHERE sex = 0
)
请问哪里有问题 展开
FROM
(
SELECT MAX( 2012 - birth ) as it WHERE sex = 1
UNION ALL
SELECT MIN( 2012 - birth ) as it WHERE sex = 0
)
请问哪里有问题 展开
2个回答
展开全部
SELECT MAX( 2012 - birth ) as it WHERE sex = 1
from 呢
from 呢
追问
谢谢
追答
SELECT AVG(it)
FROM
(
SELECT MAX( 2012 - birth ) as it from student WHERE sex = 1
UNION ALL
SELECT MIN( 2012 - birth ) as it from student WHERE sex = 0
)t
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询