I need to update an element the row for id=N in table A with derived data from Table B.
Table A has
uid as its primary key, and contains DATE element
Table B has
a_uid as an element, for each of which there are multiple rows for DATE element
Conceptually, what I want to do is
UPDATE A SET foo=MAX(b_foo) WHERE uid = a_uid
uid INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY, foo DATE
b_uid INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY, a_uid INT(10) UNSIGNED, b_foo DATE
I feel like this should be more obvious than I'm finding it to be; maybe it's because it's a COVID Monday? Regardless, many thanks for help!