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