試卷名稱:113年 - 113 學士後醫學系招生考試試題:計算機概論與程式設計#119574
年份:113年
科目:研究所、轉學考(插大)、學士後-計算機概論
11. Given a database table named “animal” with four columns, please find out a CORRECT SQL command that can obtain the desired output as below.
(A) SELECT category, count(animalid) as countaid FROM animal WHERE born > '2023-02- 14' AND count(animalid)>=2 GROUP BY category ORDER BY count(animalid) DESC, category ASC
(B) SELECT category, count(animalid) as countaid FROM animal WHERE born > '2023-02- 14' GROUP BY category HAVING count(animalid)>=2 ORDER BY count(animalid) DESC, category ASC
(C) SELECT category, count(animalid) as countaid FROM animal GROUP BY category HAVING count(animalid)>=2 AND born > '2023-02-14' ORDER BY count(animalid), category DESC
(D) SELECT category, count(animalid) as countaid FROM animal WHERE count(animalid)>=2 GROUP BY category HAVING born > '2023-02-14' ORDER BY count(animalid) DESC, category ASC
(E) SELECT category, count(animalid) as countaid FROM animal WHERE born > '2023-02- 14' GROUP BY category ORDER BY count(animalid) DESC, category ASC