I am not an expert on SQL, so I am asking here some help about the following case :
I have 2 tables; 1 table “task” (ID,TITLE,CREATEDAT) and 1 table “activity” (ID,TASK_ID,TITLE,CREATEDAT) where CREATEDAT are a DATETIME column.
I would like to list the tasks ordering by last CREATEDAT column, in task and activity! I mean, have the most recent task (CREATEDAT AND which have the most recent activity, such an union of task & activity table…) but I have really no idea of how to process?
Thanks you for your help!
To order tasks by most recent activity or creation date if there is no activity on the task: