469,167 Members | 2,044 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

JOINing tables with count details

hi,

am not able to write a query for the below.. i would appreciate if someone can help me out....

pK Make Model
--- ------- -------
1 Honda CBZ
2 Yamah R6
3 Honda CBZ
4 Honda CBR


assuming the above table, i want a query to display the below result..

Make Total_Make_Count Model_type_count
-------- ------------------------- --------------------------
Honda 3 2 ---> for model CBZ
Honda 3 1 -----> for model CBR
Yamaha 1 1


Thanks.........
Oct 23 '07 #1
2 1009
r035198x
13,262 8TB
hi,

am not able to write a query for the below.. i would appreciate if someone can help me out....

pK Make Model
--- ------- -------
1 Honda CBZ
2 Yamah R6
3 Honda CBZ
4 Honda CBR


assuming the above table, i want a query to display the below result..

Make Total_Make_Count Model_type_count
-------- ------------------------- --------------------------
Honda 3 2 ---> for model CBZ
Honda 3 1 -----> for model CBR
Yamaha 1 1


Thanks.........
Have you tried reading about how to use count and group by?
Oct 24 '07 #2
Have you tried reading about how to use count and group by?
Yes, i have tried. but not successfu.
Oct 28 '07 #3

Post your reply

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

Similar topics

5 posts views Thread by Ciar?n | last post: by
1 post views Thread by | last post: by
reply views Thread by David Perez Essenwanger | last post: by
2 posts views Thread by =?Utf-8?B?QVZM?= | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.