I have a mySql database and I have a question about counting several values with the same "Provider_id". Let me explain it as simple as possible. I have 3 rows: Provider_id (No unique values at end of text), click_count(How many clicks on their site, int value) and logo_id(This one is the same as Provider_id so they could be connected). "Provider_id" and "click_count" are in the same table and logo_id is from a different table. I want to match "Provider_id" and "Logo_id" and want to count click_count with the matching Provider_id.
For example:
(table 1)
Provider_id = 102 click_count = 10
Provider_id = 102 click_count = 22
(table 2)
logo_id = 102
-- What I want to get --
Provider_id = 102 click_count = 32
Could anyone help me with this?
Explained Provider_id:
There are unique website id's in the table with Provider_id so the Provider_id doens't have to be unique.