eulerto/pg_similarity

Comparing timestamps

jacektrocinski opened this issue · 0 comments

Hi,

Is there a good way to compare similarities between timestamps with pg_similarity? E.g.:

Table A

City Arrival Time
Los Angeles 2019-03-05 11:00:00.00000+00
Hong Kong 2019-03-07 17:00:00.00000+00

Table B

City Arrival Time
Los Angeles 2019-03-06 13:00:00.00000+00
Los Angeles 2019-03-01 11:00:00.00000+00

When joining Table A and Table B I would like to return only the rows which are most similar, in this case the rows Los Angeles with arrival dates on 2019-03-05 and 2019-03-06 are the closest matches.