在SQL语句中USE pubs SELECT DISTINCT title FROM title WHERE price>(SELECT MIN(price)FROM titleGROUP BY typeHAVING type='trad_cook')本人是初学者,请大家帮我解释每句的意思,讲解一下这种语句的语法结构,

来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/18 01:25:21
在SQL语句中USEpubsSELECTDISTINCTtitleFROMtitleWHEREprice>(SELECTMIN(price)FROMtitleGROUPBYtypeHAVINGtype

在SQL语句中USE pubs SELECT DISTINCT title FROM title WHERE price>(SELECT MIN(price)FROM titleGROUP BY typeHAVING type='trad_cook')本人是初学者,请大家帮我解释每句的意思,讲解一下这种语句的语法结构,
在SQL语句中USE pubs SELECT DISTINCT title FROM title WHERE price>
(
SELECT MIN(price)
FROM title
GROUP BY type
HAVING type='trad_cook'
)本人是初学者,请大家帮我解释每句的意思,讲解一下这种语句的语法结构,

在SQL语句中USE pubs SELECT DISTINCT title FROM title WHERE price>(SELECT MIN(price)FROM titleGROUP BY typeHAVING type='trad_cook')本人是初学者,请大家帮我解释每句的意思,讲解一下这种语句的语法结构,
(
SELECT MIN(price)//查询最小price
FROM title//从表title中查
GROUP BY type//按type分组
HAVING type='trad_cook'//当type='trad_cook'时
)
就是从表title中按type分组,查询type='trad_cook'的组中最小price