Counting records across tables
The example in this query counts the number of events associated with each calendar.
It returns the calendar table's rows, along with a count of event table's rows associated with it.
The Code Download
- COUNT(e.id) AS cnt
- calendar c,
- events e
- GROUP BY
Added by JC on 14th November 2007
There are no comments about this snippet.
Post Comment Github Markdown Supported
You must be logged in to post a comment.
Login here to post a comment