keshanDoes Time of Day Affect Price? - top 10
    Updated 2022-05-09
    /*
    Crypto does not follow a 9-5 schedule, but some traders may take advantage of different time zones. Using the Prices Swap table is there an hour (or hours) of the day that more frequently exceeds or falls short of the average of the day.

    Find the top 10 assets that are swapped to, then use the prices swap table to see if the hour of the day has an affect on the price
    Create a visualization that shows the impact on price based on hour of the day
    */


    select * from (select swap_to_asset_id, asset_name, sum(swap_from_amount) as amount, sum(price_usd * swap_from_amount) as usd
    from algorand.swaps
    left join algorand.prices_swap on swap_to_asset_id = asset_id and date_trunc('hour', block_timestamp) = date_trunc('hour', block_hour)
    --where swap_from_asset_id = 0
    group by swap_to_asset_id, asset_name)
    where usd is not null
    order by usd desc
    limit 10

    Run a query to Download Data