CREATE TEMPORARY TABLE ship_ledger(ship TEXT, action TEXT, port TEXT, time TIMESTAMP);

INSERT INTO ship_ledger (ship, action, port, time) VALUES 
('Edh','depart','Los Angeles','2020-07-02T15:54:24.467018Z'),
('Yough','depart','Singapore','2020-10-17T08:52:57.891636Z'),
('Ash','arrive','Port Klang','2020-09-28T11:13:48.191754Z'),
('Thorn','depart','Dubai','2020-05-12T16:23:40.381128Z'),
('Wyn','depart','Shanghai','2020-06-12T02:32:09.274798Z'),
('Edh','arrive','Busan','2020-08-13T00:45:36.398331Z'),
('Yough','depart','Rotterdam','2020-04-27T05:31:35.177964Z'),
('Yough','depart','Shanghai','2020-12-16T11:17:10.588928Z'),
('Ash','arrive','Los Angeles','2020-04-27T21:48:41.523067Z'),
('Ash','arrive','Rotterdam','2021-01-15T03:35:29.845197Z'),
('Edh','depart','Rotterdam','2020-09-15T07:26:09.465583Z'),
('Wyn','arrive','Shanghai','2020-08-20T03:50:06.568233Z'),
('Ash','arrive','Singapore','2020-07-24T09:50:18.257722Z'),
('Thorn','arrive','Dubai','2020-05-11T14:16:58.381128Z'),
('Thorn','depart','Kaohsiung','2020-11-16T09:36:31.678195Z'),
('Thorn','arrive','Port Klang','2020-07-08T16:47:37.986000Z'),
('Wyn','depart','Kaohsiung','2020-01-28T18:33:58Z'),
('Ash','arrive','Antwerp','2020-04-06T11:16:26.415789Z'),
('Thorn','arrive','Busan','2020-10-10T12:46:49.172694Z'),
('Yough','depart','Busan','2020-02-20T21:25:06.924683Z'),
('Wyn','depart','Kaohsiung','2020-07-26T18:53:58.804107Z'),
('Thorn','arrive','Busan','2020-11-10T16:52:21.036634Z'),
('Edh','arrive','Los Angeles','2020-10-07T06:55:40.105351Z'),
('Wyn','depart','Busan','2020-07-21T21:25:50.162546Z'),
('Yough','depart','Rotterdam','2020-07-20T06:18:47.029972Z'),
('Thorn','arrive','Hamburg','2020-04-28T19:41:11.688938Z'),
('Wyn','arrive','Singapore','2020-02-03T23:11:20.406272Z'),
('Edh','arrive','Dubai','2020-12-10T10:41:57.325785Z'),
('Yough','arrive','Busan','2020-08-28T23:29:19.230238Z'),
('Ethel','depart','Antwerp','2020-09-02T20:22:36.143106Z'),
('Ethel','arrive','Los Angeles','2020-03-04T07:04:14.356545Z'),
('Edh','arrive','Busan','2020-11-18T18:22:01.036664Z'),
('Yough','arrive','Dubai','2020-06-05T22:40:31.644205Z'),
('Yough','arrive','Busan','2020-08-15T21:57:33.097224Z'),
('Wyn','depart','Rotterdam','2020-12-25T10:30:07.150076Z'),
('Yough','arrive','Rotterdam','2020-04-25T05:55:46.177964Z'),
('Yough','depart','Shanghai','2020-08-27T06:17:58.624158Z'),
('Thorn','arrive','Kaohsiung','2020-11-16T02:30:55.678195Z'),
('Yough','depart','Dubai','2020-08-01T04:25:36.886480Z'),
('Yough','depart','Antwerp','2020-03-14T17:25:21.748718Z'),
('Thorn','depart','Rotterdam','2020-01-15T13:40:24Z'),
('Thorn','arrive','Los Angeles','2020-03-12T07:38:36.934974Z'),
('Thorn','arrive','Singapore','2020-10-25T13:02:59.604664Z'),
('Ethel','arrive','Rotterdam','2020-06-28T21:37:13.567309Z'),
('Ash','arrive','Singapore','2020-12-08T09:29:11.125786Z'),
('Thorn','depart','Dubai','2020-04-18T14:30:39.996748Z'),
('Wyn','depart','Port Klang','2020-10-26T09:08:56.991184Z'),
('Ethel','depart','Singapore','2020-08-07T10:04:33.540315Z'),
('Yough','arrive','Hamburg','2020-11-14T01:19:26.477440Z'),
('Ethel','depart','Singapore','2020-02-03T18:47:33.827472Z'),
('Ethel','depart','Los Angeles','2020-03-09T23:41:27.356545Z'),
('Ethel','depart','Shanghai','2020-07-21T09:41:11.248670Z'),
('Yough','arrive','Laem Chabang','2020-06-20T12:03:00.535928Z'),
('Thorn','arrive','Singapore','2020-02-06T13:35:36.405901Z'),
('Yough','arrive','Antwerp','2020-11-20T10:00:10.311773Z'),
('Edh','arrive','Dubai','2020-02-24T10:45:17.782922Z'),
('Yough','depart','Kaohsiung','2020-04-05T00:58:54.051375Z'),
('Yough','arrive','Busan','2020-01-31T04:29:56.641561Z'),
('Yough','depart','Busan','2020-08-31T07:08:22.230238Z'),
('Edh','depart','Rotterdam','2020-04-05T06:23:43.168689Z'),
('Ash','depart','Shanghai','2020-12-27T07:12:25.163836Z'),
('Ethel','arrive','Laem Chabang','2020-06-01T11:16:10.819078Z'),
('Wyn','depart','Shanghai','2020-04-07T18:56:12.673750Z'),
('Wyn','arrive','Los Angeles','2021-01-16T11:56:50.433422Z'),
('Yough','arrive','Busan','2020-05-15T23:10:44.433461Z'),
('Thorn','depart','Port Klang','2020-07-09T06:54:21.986000Z'),
('Edh','arrive','Rotterdam','2020-09-12T12:08:39.465583Z'),
('Edh','arrive','Antwerp','2020-10-27T11:11:34.212629Z'),
('Thorn','arrive','Laem Chabang','2020-11-21T05:08:48.289963Z'),
('Thorn','depart','Laem Chabang','2020-11-23T20:02:07.289963Z'),
('Yough','arrive','Busan','2020-02-14T03:36:02.924683Z'),
('Wyn','arrive','Shanghai','2020-04-01T11:12:28.673750Z'),
('Ash','depart','Antwerp','2020-07-02T09:01:30.654931Z'),
('Wyn','depart','Busan','2020-03-30T18:02:19.067670Z'),
('Ash','arrive','Los Angeles','2020-08-26T02:49:55.786795Z'),
('Edh','depart','Port Klang','2020-05-30T05:28:59.327581Z'),
('Ethel','arrive','Antwerp','2020-08-29T10:45:43.143106Z'),
('Wyn','arrive','Antwerp','2020-05-18T09:47:21.997643Z'),
('Wyn','depart','Los Angeles','2020-09-16T03:39:45.851747Z'),
('Edh','depart','Busan','2020-11-19T09:00:31.036664Z'),
('Edh','arrive','Los Angeles','2020-04-24T00:47:52.922622Z'),
('Ethel','depart','Antwerp','2020-03-31T19:48:59.463823Z'),
('Ethel','arrive','Shanghai','2020-07-19T16:44:57.248670Z'),
('Ash','arrive','Busan','2020-12-18T12:44:35.557756Z'),
('Edh','arrive','Los Angeles','2020-07-01T22:34:23.467018Z'),
('Yough','arrive','Rotterdam','2020-07-13T22:39:26.029972Z'),
('Ash','arrive','Antwerp','2020-06-25T08:16:33.654931Z'),
('Thorn','depart','Singapore','2020-02-11T19:18:46.405901Z'),
('Edh','depart','Singapore','2020-02-12T05:52:11.413606Z'),
('Thorn','depart','Busan','2020-10-15T23:41:38.172694Z'),
('Ethel','arrive','Dubai','2020-11-06T03:41:27.073581Z'),
('Yough','arrive','Busan','2020-10-26T21:32:16.323606Z'),
('Wyn','depart','Singapore','2020-02-10T16:31:32.406272Z'),
('Thorn','arrive','Singapore','2020-08-03T18:26:47.114254Z'),
('Ethel','arrive','Los Angeles','2020-04-19T16:30:17.571101Z'),
('Ash','arrive','Hamburg','2020-02-14T22:05:18.399392Z'),
('Thorn','depart','Singapore','2020-08-10T12:34:25.114254Z'),
('Ash','depart','Los Angeles','2020-05-01T02:04:29.523067Z'),
('Edh','depart','Busan','2020-08-17T21:48:06.398331Z'),
('Yough','arrive','Kaohsiung','2020-02-04T11:57:45.283122Z'),
('Thorn','arrive','Shanghai','2020-11-29T22:04:47.499383Z'),
('Thorn','depart','Los Angeles','2020-03-16T05:35:37.934974Z'),
('Ash','depart','Antwerp','2020-04-09T00:56:32.415789Z'),
('Wyn','arrive','Rotterdam','2020-03-03T16:13:19.812173Z'),
('Edh','depart','Antwerp','2020-07-25T04:46:49.574296Z'),
('Ethel','depart','Laem Chabang','2020-06-07T01:02:39.819078Z'),
('Wyn','depart','Singapore','2020-04-26T08:50:38.394852Z'),
('Wyn','arrive','Port Klang','2020-08-06T16:43:21.051842Z'),
('Edh','depart','Dubai','2020-12-12T07:29:13.325785Z'),
('Ash','depart','Los Angeles','2020-08-29T20:34:13.786795Z'),
('Ethel','depart','Port Klang','2020-01-29T06:56:55Z'),
('Ethel','depart','Los Angeles','2020-04-22T21:28:57.571101Z'),
('Yough','depart','Hamburg','2020-11-19T10:34:48.477440Z'),
('Ethel','arrive','Laem Chabang','2021-01-25T05:40:35.469808Z'),
('Ash','depart','Los Angeles','2020-11-08T20:43:11.596713Z'),
('Wyn','depart','Port Klang','2020-08-11T11:20:16.051842Z'),
('Edh','arrive','Dubai','2020-09-01T15:26:12.609075Z'),
('Wyn','depart','Shanghai','2020-08-23T20:57:13.568233Z'),
('Edh','arrive','Singapore','2020-02-09T23:11:37.413606Z'),
('Ethel','arrive','Hamburg','2020-10-23T06:51:33.381391Z'),
('Edh','arrive','Laem Chabang','2020-03-06T11:39:03.674645Z'),
('Wyn','depart','Los Angeles','2020-12-01T02:09:12.396143Z'),
('Ash','depart','Singapore','2020-12-08T23:19:13.125786Z'),
('Ethel','arrive','Los Angeles','2020-12-21T12:25:15.237478Z'),
('Thorn','arrive','Port Klang','2020-12-12T10:17:27.015774Z'),
('Edh','arrive','Port Klang','2020-05-28T07:20:23.327581Z'),
('Ash','arrive','Shanghai','2020-12-20T22:51:46.163836Z'),
('Wyn','depart','Laem Chabang','2020-08-04T08:12:09.415875Z'),
('Yough','depart','Busan','2020-10-27T04:21:21.323606Z'),
('Ash','arrive','Singapore','2020-05-30T14:11:00.052140Z'),
('Thorn','depart','Port Klang','2020-12-15T02:13:46.015774Z'),
('Thorn','depart','Busan','2020-11-12T16:25:40.036634Z'),
('Wyn','arrive','Dubai','2020-06-25T17:38:12.951802Z'),
('Edh','arrive','Los Angeles','2021-01-09T09:37:30.387559Z'),
('Thorn','depart','Dubai','2020-07-22T13:12:36.744938Z'),
('Wyn','arrive','Kaohsiung','2020-07-25T07:03:58.804107Z'),
('Ethel','depart','Port Klang','2020-10-02T18:47:48.538279Z'),
('Ash','depart','Singapore','2020-06-03T07:40:29.052140Z'),
('Wyn','depart','Port Klang','2020-04-19T19:22:03.567380Z'),
('Yough','arrive','Shanghai','2020-08-26T22:01:16.624158Z'),
('Wyn','arrive','Kaohsiung','2020-08-17T16:10:50.682860Z'),
('Wyn','depart','Kaohsiung','2020-08-18T06:25:27.682860Z'),
('Edh','depart','Kaohsiung','2020-11-26T17:02:46.678225Z'),
('Ethel','depart','Dubai','2020-06-18T01:28:30.710801Z'),
('Thorn','arrive','Antwerp','2021-01-05T10:50:07.723586Z'),
('Yough','depart','Dubai','2020-06-10T03:02:47.644205Z'),
('Ethel','arrive','Rotterdam','2020-09-02T23:51:54.319174Z'),
('Thorn','depart','Singapore','2020-11-01T04:13:57.604664Z'),
('Ash','arrive','Los Angeles','2020-11-01T23:01:51.596713Z'),
('Ethel','arrive','Port Klang','2020-09-28T12:58:09.538279Z'),
('Ethel','depart','Dubai','2020-11-07T08:39:01.073581Z'),
('Yough','depart','Busan','2020-08-18T23:41:01.097224Z'),
('Yough','arrive','Shanghai','2020-12-13T02:15:03.588928Z'),
('Edh','depart','Hamburg','2020-01-19T19:02:31Z'),
('Yough','arrive','Rotterdam','2020-03-14T21:05:44.924786Z'),
('Edh','arrive','Hamburg','2020-09-16T05:15:37.245904Z'),
('Edh','arrive','Rotterdam','2020-03-30T17:08:58.168689Z'),
('Thorn','arrive','Rotterdam','2020-09-01T12:39:28.520155Z'),
('Edh','depart','Los Angeles','2020-10-08T14:09:44.105351Z'),
('Wyn','arrive','Los Angeles','2020-09-14T17:39:46.851747Z'),
('Edh','depart','Antwerp','2020-10-30T22:53:14.212629Z'),
('Thorn','arrive','Kaohsiung','2020-12-01T22:04:29.384756Z'),
('Yough','arrive','Dubai','2020-07-31T02:40:44.886480Z'),
('Yough','depart','Laem Chabang','2020-06-24T12:30:07.535928Z'),
('Yough','depart','Kaohsiung','2020-02-10T17:57:28.283122Z'),
('Ash','depart','Busan','2020-12-19T05:34:06.557756Z'),
('Yough','arrive','Singapore','2020-10-14T15:13:22.891636Z'),
('Wyn','arrive','Busan','2020-07-16T10:53:57.162546Z'),
('Yough','arrive','Kaohsiung','2020-08-22T09:25:51.738785Z'),
('Wyn','depart','Antwerp','2020-05-22T06:29:43.997643Z'),
('Yough','depart','Kaohsiung','2020-08-25T00:17:37.738785Z'),
('Ethel','depart','Port Klang','2020-11-21T21:52:21.832519Z'),
('Yough','depart','Rotterdam','2020-09-22T15:28:44.485735Z'),
('Wyn','arrive','Laem Chabang','2020-07-31T14:35:48.415875Z'),
('Edh','depart','Dubai','2020-09-01T16:18:29.609075Z'),
('Ethel','arrive','Dubai','2020-06-17T10:35:54.710801Z'),
('Yough','arrive','Rotterdam','2020-09-19T00:32:36.485735Z'),
('Thorn','arrive','Rotterdam','2020-06-12T23:48:13.766895Z'),
('Ethel','arrive','Port Klang','2020-11-18T21:27:19.832519Z'),
('Edh','depart','Busan','2020-06-11T18:34:13.215059Z'),
('Wyn','arrive','Shanghai','2020-06-10T05:54:43.274798Z'),
('Yough','arrive','Kaohsiung','2020-04-04T21:43:45.051375Z'),
('Ethel','depart','Los Angeles','2020-12-28T08:22:25.237478Z'),
('Edh','depart','Laem Chabang','2020-03-11T06:55:24.674645Z'),
('Thorn','depart','Hamburg','2020-05-01T09:01:05.688938Z'),
('Ethel','depart','Hamburg','2020-10-26T22:25:30.381391Z'),
('Thorn','arrive','Dubai','2020-07-20T19:50:29.744938Z'),
('Wyn','arrive','Busan','2020-10-06T07:35:25.103706Z'),
('Ash','depart','Port Klang','2020-10-03T08:28:48.191754Z'),
('Wyn','arrive','Port Klang','2020-10-19T15:07:35.991184Z'),
('Wyn','arrive','Antwerp','2020-12-25T14:47:07.326144Z'),
('Yough','depart','Rotterdam','2020-03-15T17:13:50.924786Z'),
('Ash','depart','Singapore','2020-03-15T10:46:57.812998Z'),
('Wyn','arrive','Los Angeles','2020-11-24T23:35:43.396143Z'),
('Edh','depart','Los Angeles','2020-04-28T16:16:50.922622Z'),
('Edh','arrive','Antwerp','2020-07-21T12:31:10.574296Z'),
('Edh','depart','Hamburg','2020-09-18T05:48:06.245904Z'),
('Wyn','arrive','Port Klang','2020-04-15T15:21:28.567380Z'),
('Thorn','depart','Kaohsiung','2020-12-06T04:39:48.384756Z'),
('Thorn','depart','Rotterdam','2020-09-06T07:39:42.520155Z'),
('Wyn','arrive','Rotterdam','2020-12-19T20:20:47.150076Z'),
('Ash','depart','Hamburg','2020-02-21T10:39:26.399392Z'),
('Edh','arrive','Busan','2020-06-08T18:30:35.215059Z'),
('Wyn','depart','Dubai','2020-07-01T17:26:15.951802Z'),
('Thorn','depart','Rotterdam','2020-06-17T08:34:57.766895Z'),
('Thorn','depart','Shanghai','2020-11-29T23:56:27.499383Z'),
('Wyn','depart','Rotterdam','2020-03-06T23:31:16.812173Z'),
('Thorn','arrive','Dubai','2020-04-13T06:53:30.996748Z'),
('Ethel','depart','Rotterdam','2020-06-30T19:23:06.567309Z'),
('Ash','depart','Laem Chabang','2020-01-27T07:46:39Z'),
('Thorn','arrive','Laem Chabang','2020-09-25T17:55:41.014199Z'),
('Edh','arrive','Kaohsiung','2020-11-22T19:14:36.678225Z'),
('Ethel','depart','Rotterdam','2020-05-13T00:46:24.325034Z'),
('Yough','depart','Busan','2020-02-01T02:01:09.641561Z'),
('Ethel','arrive','Kaohsiung','2020-07-23T07:37:12.134043Z'),
('Wyn','depart','Busan','2020-10-10T02:14:39.103706Z'),
('Ash','arrive','Singapore','2020-03-13T15:05:17.812998Z'),
('Thorn','arrive','Laem Chabang','2020-05-23T01:52:38.272851Z'),
('Ethel','arrive','Antwerp','2020-03-28T21:08:10.463823Z'),
('Thorn','depart','Laem Chabang','2020-10-02T17:08:34.014199Z'),
('Edh','depart','Dubai','2020-02-25T02:04:35.782922Z'),
('Wyn','arrive','Busan','2020-03-25T16:43:58.067670Z'),
('Ethel','depart','Kaohsiung','2020-07-29T15:40:36.134043Z'),
('Ethel','arrive','Rotterdam','2020-05-11T16:23:11.325034Z'),
('Wyn','depart','Antwerp','2020-12-28T14:47:34.326144Z'),
('Wyn','arrive','Singapore','2020-04-20T12:42:19.394852Z'),
('Yough','depart','Kaohsiung','2020-01-27T18:38:19Z'),
('Yough','depart','Busan','2020-05-22T05:11:57.433461Z'),
('Ethel','arrive','Singapore','2020-01-29T23:54:13.827472Z'),
('Yough','depart','Antwerp','2020-11-24T02:51:21.311773Z'),
('Ethel','arrive','Singapore','2020-08-04T19:44:06.540315Z'),
('Yough','arrive','Antwerp','2020-03-10T17:29:59.748718Z'),
('Ethel','depart','Rotterdam','2020-09-07T05:04:59.319174Z'),
('Thorn','depart','Laem Chabang','2020-05-24T13:00:25.272851Z'),
('Ash','depart','Singapore','2020-07-27T14:36:08.257722Z'),
('Yough','arrive','Hamburg','2021-01-03T10:57:43.320602Z');
