question

DataScience avatar image
DataScience asked

Subquery question with how to count

SELECT COUNT(*),city FROM accidents GROUP BY city HAVING COUNT(*)<40 ORDER BY COUNT(*) DESC;

It shows me the cities which are shown under 40 times. But I want to count how many cities there are. So how can I do this with subquery? Please Help me.

mysqlcountsubquery
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

0 Answers

· Write an Answer

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.