Hi all, I have two columns in table that first column is personal id and second column is product which they buy to our company. it's sample of the table :
personal id ...... product
....10 .................... A
....10 .................... B
....20 .................... B
....35 .................... A
....10 .................... A
....35 .................... C
....10 .................... A
....20 .................... B
....35 .................... C
....20 .................... B
And I want to create query by same as below :
Personal id ..... Count of A ..... Count of B .... count of C
..... 10 ................ 3 ................. 1 ................. 0
..... 20 ................ 0 ................. 3 ................. 0
..... 35 ................ 1 ................. 0 ................. 2
Can someone give me a way for do this??
Thanks in advanced.
personal id ...... product
....10 .................... A
....10 .................... B
....20 .................... B
....35 .................... A
....10 .................... A
....35 .................... C
....10 .................... A
....20 .................... B
....35 .................... C
....20 .................... B
And I want to create query by same as below :
Personal id ..... Count of A ..... Count of B .... count of C
..... 10 ................ 3 ................. 1 ................. 0
..... 20 ................ 0 ................. 3 ................. 0
..... 35 ................ 1 ................. 0 ................. 2
Can someone give me a way for do this??
Thanks in advanced.