dbrgBS-SC-Weekly copy
    Updated 2023-05-04
    -- forked from 688e2b4d-0716-4a74-b15d-458391fa197e

    -- forked from 66b30001-d005-47ea-a834-184677d2878e
    with
    contract_creation_tx as (
    select
    tx_hash,
    block_timestamp,
    from_address as deployer,
    tx_json:receipt:contractAddress as contract,
    -- tx_json,
    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
    -- and tx_json::string like '%Upgrade%'
    ),
    trace_tx as (
    select
    tx_hash,
    block_timestamp,
    from_address as deployer,
    to_address as contract
    -- tx_fee
    from
    base.goerli.fact_traces
    where
    -- tx_hash = '0x6a72a83e75dced926dbb011245c3110ffef71ce2804347063734ec7a7f6fd9c1'
    Run a query to Download Data