SELECT DAYofweek(block_timestamp) as hours, --0 =SUN, 1 = MON and 6 = SAT
count(DISTINCT tx_id) as n_swaps
FROM thorchain.core.fact_swaps
WHERE date_trunc('day',block_timestamp) between CURRENT_DATE-366 AND CURRENT_DATE-1
GROUP by hours
ORDER BY hours