sql查詢年齡最大的三個學(xué)生 sql查找各個部門最大年齡和最小年齡的員工信息?
sql查找各個部門最大年齡和最小年齡的員工信息?select max(生日),名字,性別 from 表select min(生日),名字,性別 from 表在sql中查尋年齡最大和最小的女學(xué)生年齡,及
sql查找各個部門最大年齡和最小年齡的員工信息?
select max(生日),名字,性別 from 表
select min(生日),名字,性別 from 表
在sql中查尋年齡最大和最小的女學(xué)生年齡,及其對應(yīng)姓名?
select 姓名,年齡
from 學(xué)生表
where (年齡=(select max(年齡) from 學(xué)生表 where 性別="女")
or 年齡=(select min(年齡) from 學(xué)生表 where 性別="女"))
and 性別="女"
SQL語句,查詢出所有學(xué)生的平均年齡、最大年齡】最小年齡?
SELECT AVG(age), MAX(age),MIN(age) FROM table_name avg是平均年齡,max是最大年齡,min是最小年齡
sql語言查找最大年齡與最小年齡差值咋輸?
用max和min函數(shù)分別查找最大和最小年齡,然后做差
查詢年齡最大,學(xué)號最小的學(xué)生信息,SQL語句怎么寫?
用嵌套查詢寫 分為兩部分 1、主查詢 select * from sturent where id = (這里填子查詢) and age = (這里填子查詢) 2、子查詢就是返回最大或最小值行的記錄,即 select max(age) from sturent 和 select min(id) from sturent 再組合一下就搞定了
sql查找年齡最大和最小的學(xué)生姓名及性別怎么用代碼實(shí)現(xiàn)xsb?
select distinct 學(xué)生姓名,性別,max(年齡),min(年齡) from xsb group by 學(xué)生姓名,性別