Files
jesse-trading/utils/candle_info.sql
2021-12-11 21:22:22 +01:00

7 lines
285 B
SQL

select (to_timestamp(min(timestamp)/1000) at time zone 'UTC')::date
as min_date,
(to_timestamp(max(timestamp)/1000) at time zone 'UTC')::date
as max_date,
count(timestamp), symbol, exchange
from candle group by exchange, symbol order by exchange, symbol;