Question

What is the result of the following query if the Orders table has NULL values in the discount column for some rows?     SELECT SUM(discount), COUNT(discount), COUNT(*) FROM Orders;

A SUM ignores NULLs; COUNT(discount) also ignores NULLs; COUNT(*) counts all rows including those with NULL discount
B All three functions ignore rows with NULL discount equally
C SUM(discount) throws an error if any NULL exists
D COUNT(discount) and COUNT(*) always return the same value
E NULL values cause the entire query to return NULL
Practice Next

Hey! Ask a query