472,131 Members | 1,374 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,131 software developers and data experts.

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 1039
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
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.