Categories
Database Development

Select max date that corresponds with other tables

I have 2 tables. They look like this: table a: id datetime value —- ——————- —– 1 2020-05-20 07:34:46 1 2 2020-05-20 07:34:46 2 3 2020-05-20 07:34:46 3 4 2020-05-20 07:34:46 4 5 2020-05-20 07:34:46 5 6 2020-05-23 07:35:46 5 table b: id value2 —- —— 1 a 2 a 3 b 4 c 5 […]