470,833 Members | 1,516 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,833 developers. It's quick & easy.

how to count two one to many relationships in one querry?

let's say i have table a which has a one to many relationship with table b and with table c
how can i make a querry to me for each element of table a both the count of elements that correspond to b and c?

for example:

table a has 3 corresponing elements in table b and 4 in table c. the result would be

a_id 3 4

I have tried 2 left joins and to group it by a_id but it returns a_id 12 12
3 Weeks Ago #1
0 8181

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

reply views Thread by Jason James | last post: by
5 posts views Thread by Robert | last post: by
6 posts views Thread by Tazzy via AccessMonster.com | last post: by
reply views Thread by mihailmihai484 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.