
Explanation:
The correct answer is C (7). Let's trace through the SQL operations: 1) CREATE TABLE test creates a table with columns c1 and c2. 2) INSERT INTO test adds rows: (1,1), (2,1), (3,1), (4,2). 3) UPDATE test SET c2 = c1 updates all c2 values to match c1: rows become (1,1), (2,2), (3,3), (4,4). 4) DELETE FROM test WHERE c1 = 1 removes the first row, leaving (2,2), (3,3), (4,4). 5) SELECT SUM(c2) FROM test sums the remaining c2 values: 2 + 3 + 4 = 7. The community discussion strongly supports this with 100% consensus on answer C and multiple comments confirming the step-by-step calculation. While one comment raises concerns about sequence ordering in general SQL contexts, this specific question doesn't involve sequences and the operations are straightforward.
Ultimate access to all questions.
CREATE TABLE test (c1 NUMBER, c2 NUMBER);
INSERT INTO test (c1, c2) VALUES (1, 1), (2, 1), (3, 1), (4, 2);
UPDATE test SET c2 = c1;
DELETE FROM test WHERE c1 = 1;
SELECT SUM(c2) FROM test;
CREATE TABLE test (c1 NUMBER, c2 NUMBER);
INSERT INTO test (c1, c2) VALUES (1, 1), (2, 1), (3, 1), (4, 2);
UPDATE test SET c2 = c1;
DELETE FROM test WHERE c1 = 1;
SELECT SUM(c2) FROM test;
What is the result of the final SELECT SUM(c2) FROM test; statement?

A
3
B
4
C
7
D
8