how am i able to join the 2 tables (A & B) below so that i can get the resulting table below
Please note that the query should join values that have the same time,
(i.e. 2014-11-29 9:58:23 6054 1
showing below in the result table)
Table A
ID time noise
76676 2014-11-29 09:55:24 6636
76677 2014-11-29 09:55:32 5256
76678 2014-11-29 09:55:42 5066
76679 2014-11-29 09:56:09 11560
76680 2014-11-29 09:56:22 5656
76681 2014-11-29 09:56:50 7031
76682 2014-11-29 09:56:56 5069
76683 2014-11-29 09:57:06 10088
76684 2014-11-29 09:57:23 5589
76685 2014-11-29 09:58:23 6054
Table B
ID time movement
789 2014-11-29 09:57:04 1
790 2014-11-29 09:57:10 1
791 2014-11-29 09:57:30 1
792 2014-11-29 09:57:34 1
793 2014-11-29 09:57:40 1
794 2014-11-29 09:57:43 1
795 2014-11-29 09:57:52 1
796 2014-11-29 09:58:09 1
797 2014-11-29 09:58:23 1
798 2014-11-29 09:58:31 1
Result:
time noise movement
2014-11-29 9:55:24 6636 null
2014-11-29 9:55:32 5256 null
2014-11-29 9:55:42 5066 null
2014-11-29 9:56:09 11560 null
2014-11-29 9:56:22 5656 null
2014-11-29 9:56:50 7031 null
2014-11-29 9:56:56 5069 null
2014-11-29 9:57:04 null 1
2014-11-29 9:57:06 10088 null
2014-11-29 9:57:10 null 1
2014-11-29 9:57:23 5589 null
2014-11-29 9:57:30 null 1
2014-11-29 9:57:34 null 1
2014-11-29 9:57:40 null 1
2014-11-29 9:57:43 null 1
2014-11-29 9:57:52 null 1
2014-11-29 9:58:09 null 1
2014-11-29 9:58:23 6054 1
2014-11-29 9:58:31 null 1