この部分的なクエリを調べます。
SELECT ch.channel_type、t.month、co.country_code、SUM(s.amount_sold)SALES
FROM sales s、times t、channels ch、countries co
WHERE s.time_ id = t.time id
AND s.country_ id = co。国ID
ANDs。チャネルID = ch.channel ID
AND ch.channel type IN(' Direct Sales'、' Internet')
AND t.month IN(' 2000-09'、' 2000-10')
AND co.country code IN(' GB'、' US')
この出力を調べます。

クエリが表示された結果を返すように、どのGROUP BY句を追加する必要がありますか?
正解:A
A . True. The GROUP BY clause needs to include all non-aggregated columns from the SELECT list to provide the correct grouping for the output. The output shown in the image indicates that the data is grouped by channel_type, month, and country_code.
B, C, and D are incorrect because:
B includes a ROLLUP which would introduce subtotals that are not reflected in the output shown.
C specifies a CUBE, which would produce all possible combinations of groupings including the grand total, which is not shown in the output.
D specifies a ROLLUP on country_code only, which would not correctly group by channel_type and month.