samedi 25 avril 2015

SQL - count relation instances


I have this SQL diagram:

enter image description here

I want to get all the subscribers that likes exactly 0 reports.

started by: SELECT * FROM subscriber HAVING count(...)

How do I count how many reporters a subscriber likes?

A relationship should get it's own table in an SQL database?


Aucun commentaire:

Enregistrer un commentaire