- This topic is empty.
Viewing 1 post (of 1 total)
Viewing 1 post (of 1 total)
- You must be logged in to reply to this topic.
Empowering Insights, Unleashing Possibilities
Data Science/Business Analytics for Small Business Applications › Forums › SQL › If this is a valid SQL syntax, what does it do?
Tagged: COUNT clause in SQL
I mistakenly came out with this query:
SELECT DISTINCT COUNT (business_id)
FROM hours
The above did come out with result, which is count of all the business-ids of the table. I understand it should then be a valid syntax. Any explanation will be helpful, especially how it is different from the below query.
My query should have been:
SELECT COUNT (DISTINCT business_id)
FROM hours
Reply