i have two tables,
Table 1
---------------------------
Col1 Col2
--------------------------
A1 D
A2 D
A1 W
A3 D
A4 W
A2 W
A5 D
A1 D
A2 W
A3 W
Table 2
------------------------
Col1 Col2
-------------------------
A1 Name1
A2 Name2
A3 Name3
A4 Name4
A5 Name5
I want to get the count of all rows with D and W values in the following format..
-------------------------------------------------------
Name Count_D Count_W
-------------------------------------------------------
Name1 2 1
Name2 1 2
Name3 1 1
Name4 0 1
Name5 1 0
----------------------------------------------------------------
Is it possible to achieve this through query..Please help to write query for this
Table 1
---------------------------
Col1 Col2
--------------------------
A1 D
A2 D
A1 W
A3 D
A4 W
A2 W
A5 D
A1 D
A2 W
A3 W
Table 2
------------------------
Col1 Col2
-------------------------
A1 Name1
A2 Name2
A3 Name3
A4 Name4
A5 Name5
I want to get the count of all rows with D and W values in the following format..
-------------------------------------------------------
Name Count_D Count_W
-------------------------------------------------------
Name1 2 1
Name2 1 2
Name3 1 1
Name4 0 1
Name5 1 0
----------------------------------------------------------------
Is it possible to achieve this through query..Please help to write query for this
Comment