I have two table.
Table Name : Field Name
table A : ID, product_ID
table B : product_ID, product_type,product_num
the data are like this
Table A
+++++++++++
id + product_id
+++++++++++
1 + apple
2 + orange
+++++++++++
Table B
+++++++++++++++++++++++++++++++
product_id + product_type + product_num
+++++++++++++++++++++++++++++++
apple + red + 10
apple + blue + 20
orange + red + 5
orange + blue + 15
+++++++++++++
Can I get the result like
++++++++++++++++++++++++++++++++++++++++++
product_id + red_num + blue_num
++++++++++++++++++++++++++++++++++++++++++
apple + 10 + 20
++++++++++++++++++++++++++++++++++++++++++
orange + 5 + 15