CirquedeSQLeil (3/9/2010)
The answers are: SELECT COUNT_BIG(*) and SELECT COUNT_BIG(column_2).
This sentence does not match the correct answers. It seems somewhat confusing and could create a bit of a stir.
This is wiered...I answered II and III, thereby getting both correct?
SELECT COUNT_BIG(column_2)
SELECT COUNT_BIG(ALL column_2)
ALL is the default and hence COUNT_BIG(column 2) is same as COUNT_BIG(ALL column_2). This evaluates expression for each row in a group and returns the number of nonnull values.
Maybe the first paragraph of the explanation was wrong?
The answers are: SELECT COUNT_BIG(*) and SELECT COUNT_BIG(column_2). COUNT_BIG(*) will count all rows from the table (including duplicate & null rows). COUNT_BIG(DISTINCT column_2) will evaluate distinct non-null values.
If the correct answers are different from mine, it's alright for me to have my points deducted. I know I will never be able to verify the answers without wrecking my server's disk space or processing power.