dbrgBS-SC-Hourly Analysis
    Updated 2023-03-22
    -- forked from 2c87f061-198f-4dc7-8ea0-2e4aca20026f

    -- forked from 66b30001-d005-47ea-a834-184677d2878e

    with
    contract_creation_tx as (
    select
    tx_hash,
    block_timestamp,
    hour(block_timestamp) as "Hour",
    dayofweek(block_timestamp) as "Day of Week",
    from_address as deployer,
    tx_json:receipt:contractAddress as contract,
    tx_fee
    from
    base.goerli.fact_transactions
    where
    to_address is null
    and block_timestamp >= to_date('{{start_date}}')
    and block_timestamp <= add_months(
    to_date('{{start_date}}'),
    {{duration_in_months}}
    )
    and status = 'SUCCESS'
    -- limit 1
    ),
    trace_tx as (
    select
    tx_hash,
    block_timestamp,
    from_address as deployer,
    to_address as contract
    -- tx_fee
    from
    base.goerli.fact_traces
    where
    Run a query to Download Data