Number of records in one table of a type from another table.


/ Published in: MySQL
Save to your folder(s)

You have two tables galleries and images, and you need to know how many images each gallery has associated with it. This Query returns the sum of distinct record joined to another table by a common field (gallery_id).

URL: count-of-joined-records

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.