PrepAway - Latest Free Exam Questions & Answers

Which of the following result data sets will be produced?

Given the following data:
TAB1
C1 C2
— —
200 abc
250 abc
150 def
300 ghi
175 def
If the following query is executed:
WITH subset (col1, col2) AS
(SELECT c1, c2 FROM tab1 WHERE c1 > 150)
SELECT col2, SUM(col1) AS col1_sum
FROM subset
GROUP BY col2
ORDER BY col2
Which of the following result data sets will be produced?

PrepAway - Latest Free Exam Questions & Answers

A.
COL2 COL1_SUM
—- ——–
abc 200
abc 250
def 175
ghi 300
4 record(s) selected.

B.
COL2 COL1_SUM
—- ——–
abc 450
def 175
ghi 300
3 record(s) selected.

C.
COL2 COL1_SUM
—- ——–
abc 450
def 325
ghi 300
3 record(s) selected.

D.
COL2 COL1_SUM
—- ——–
abc 450
abc 450
def 175
def 175
ghi 300
5 record(s) selected.

3 Comments on “Which of the following result data sets will be produced?


Leave a Reply