这是我尝试的但我确定这是错的。
SELECT count(12), genre
, MIN(cost) AS Low
, MAX(cost) AS High
, AVG(cost) AS Average
FROM movies
where YR > '1990'
GROUP BY genre
答案 0 :(得分:0)
这是我对您正在进行的查询的印象
SELECT
COUNT(12),
genre,
MIN(cost) AS Low,
MAX(cost) AS High,
AVG(cost) AS Average
FROM movies
WHERE YR > '1990'
GROUP BY genre
我不确定你在寻找什么。你是不是想要在1990年到现在之间获得超过12部电影的所有类型?
SELECT
COUNT(*) AS c,
genre,
MIN(cost) AS Low,
MAX(cost) AS High,
AVG(cost) AS Average
FROM movies
WHERE YR > '1990'
GROUP BY genre
HAVING c > 12