MySQL Forums
Forum List  »  Newbie

Query to fetch counts from 3 tables
Posted by: mandar kallol
Date: June 07, 2019 07:18AM

I have 3 tables :
table1
id hw-id name
1 22 aaa
2 34 bbb


table2
id hw-id name
1 24 fff
2 34 ggg

table3
id hw-name
22 abcd
33 efgh
24 xxx
34 yyy

Please help me building query which prints following
hw-name table1-count table2-count
abcd 1 0
xxx 0 1
yyy 1 1

Basically I need count of hwtype from each table.

Options: ReplyQuote


Subject
Written By
Posted
Query to fetch counts from 3 tables
June 07, 2019 07:18AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.