PHP Mysql Query Count Multiply table field?

SW7382

New member
Hi, I am trying to get a query count # of results on TABLE_A and multiply by sum of TABLE_B.col_c. The # of listed results/rows is unknown and the final answer should be something like (9 results)*(9+8+7+...). Thanks in advance!!

note : I did query below but answer is not correct..
select count(*) *TABLE_B.col_c
from TABLE_A, TABLE_B
where col_a = col_d


TABLE A TABLE B
(col_a) (col_b) (col_d)(col_c)
1 10 1 9
2 100 2 8
3 1000 3 7
and more....
---------------------------------------------------------
9 results
 
Back
Top