Set value in column "Current status" as result of selection from statuses log

Hello.

I have table when log values for estate object statuses are stored (table “EstateObjectStatuses”).

There are two statuses: “on sale” and “not on sale”. Each row in “EstateObjectStatuses” has timestamp (column “timestamp”).

Estate objects are stored in table “EstateObjects”. There is column “current_status”.

So, I need somehow keep value in “current_status” as a selection of last status by timestamp for each object.

0 6 179
6 REPLIES 6
Top Labels in this Space