Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.
Possible Wrong Answer?
What is the result you should expect from the following query?
SELECT COUNT(platform) FROM games;
Hi, Isn't the answer to this question 4? I've chosen 4 and it said I'm wrong. If it isn't could you tell me why?
Jennifer NordellTreehouse Teacher
Hi there, jaesonshin! No, it's not incorrect. Remember, that you're counting the number of platforms listed in that table. And there are only two platforms listed. There is only "NULL" and "Xbox One". Thus, the answer should be two. If you were counting the names of the games then it would be 4.
Hope this helps!
Oh.. yes. COUNT() does not count NULL.
Thank you, Jennifer!!