sql query question / count
- by scheibenkleister
Hi,
I have houses that belongs to streets. A user can buy several houses. How do I find out, if the user owns an entire street?
street table with columns (id/name)
house table with columns (id/street_id [foreign key]
owner table with columns (id/house_id/user_id) [join table with foreign keys]
So far, I'm using count which returns the result:
…