I have another MySQL question for those of you more advanced than I am. I've been working on this for a couple hours now, but can't seem to get it to work properly:
Ok, let's say I have 4 different tables - rankings, asset_1, asset_2, and asset_3.
each of the three asset tables have 2 primary keys: user_id, and hour_1, and the rankings table has the primary key user_id, and another column called "value"
What I need to do is gather all the values from each of the "hour_1" columns in each of the three asset tables, and set the "value" column in the rankings table equal to the sum of those values specific to each user_id.
so, if the "hour_1" columns had the three values (2,3,4) for user_1, and (5,6,7) for user_2., I want the values 9 and 18 inserted into the "values" column for user_1 and user_2 in the rankings table.
How can I do this in one query for all the users???