SalehTerra_4_heat
    Updated 2023-12-28
    select
    case
    when extract(dow from block_timestamp) = 0 then '7. Sunday'
    when extract(dow from block_timestamp) = 1 then '1. Monday'
    when extract(dow from block_timestamp) = 2 then '2. Tuesday'
    when extract(dow from block_timestamp) = 3 then '3. Wednesday'
    when extract(dow from block_timestamp) = 4 then '4. Thursday'
    when extract(dow from block_timestamp) = 5 then '5. Friday'
    when extract(dow from block_timestamp) = 6 then '6. Saturday'
    end as "Day"
    ,date_part(hour, block_timestamp) as "Hour"
    ,count(DISTINCT tx_id) as TXs
    from terra.core.fact_transactions
    where year(block_timestamp) ='2023'
    and TX_SUCCEEDED=true
    group by 1,2
    order by 2,1










    QueryRunArchived: QueryRun has been archived