Number of questions 1,751
Number of tests completed 252,581
Number of questions answered 3,766,821
Number of registered users 19,177
Sign In | Register
Skip Navigation Links
Question: ProdID Country Price ----------- -------------------- --------------------- 1 South Africa 12.34 2 South Africa 12.34 3 NULL 12.35 4 NULL 12.99 5 Brazil 13.43 6 China 14.21 7 United States 12.00 8 United States 23.20 9 England 12.34 select count(distinct country) from products? Answer has been verified
Answer1: 6
Answer2: 7
Answer3: 9
Answer4: 5
Answer5:
Answer: 5

Explaination: COUNT (ALL ColumnName) is the same as COUNT(ColumnName). The reality is that the “ALL” is actually the default option and it needs not to be specified. The ALL keyword includes all the non-NULL values. SELECT COUNT(DISTINCT column1) will count the number of UNIQUE non-null column1 values. It does not count NULL.
Link: External Explaination

Correctly answered: 2039
Incorrectly answered: 2482
Terms of Use
contact@quiznetonline.com Ver. 2.0.6783.38332