I have two tables illustrated below
TABLE A TABLE B ----------------------------------- ------------------------------- |id|age|status|created_at | |id|height|created_at | ----------------------------------- ------------------------------- |1 |24 | 1 |2019-09-20 02:24:09| |2 |81 |2019-09-20 02:20:15| |2 |45 | 1 |2019-09-20 02:02:19| |3 |88 |2019-09-20 02:20:50| |3 |27 | 1 |2019-09-20 02:10:29| |4 |83 |2019-09-20 02:34:00| |4 |31 | 0 |2019-09-20 02:04:59| |5 |85 |2019-09-20 02:04:49|
And wish to join the two tables together to produce a single table sorted by created_at in the ASC order and id not 5
So basically i want something like this
TABLE C ------------------------------------------ |id|age|status|height|created_at | ------------------------------------------ |2 |45 | 1 | |2019-09-20 02:02:19| |4 |31 | 0 | |2019-09-20 02:04:59| |3 |27 | 1 | |2019-09-20 02:10:29| |2 | | |81 |2019-09-20 02:20:15| |3 | | |88 |2019-09-20 02:20:50| |1 |24 | 1 | |2019-09-20 02:24:09| |4 | | |85 |2019-09-20 02:20:50|