ML65opnear
    Updated 2023-05-09

    with kucoin_to_NEAR_data as (select count(distinct TX_HASH) as transfer_count
    ,count(distinct TX_SIGNER) as users
    , sum(deposit/pow(10,24)) as volume
    from near.core.fact_transfers inner join near.core.dim_address_labels
    on TX_SIGNER=address and project_name='kucoin')

    , NEAR_to_kucoin_data as (select count(distinct TX_HASH) as transfer_count
    ,count(distinct TX_RECEIVER) as users, sum(deposit/pow(10,24)) as volume
    from near.core.fact_transfers inner join near.core.dim_address_labels
    on TX_RECEIVER=address and project_name='kucoin'
    )
    ,kucoin_to_NEAR_chart as (select count(distinct TX_HASH) as transfer_count
    ,count(distinct TX_SIGNER) as users
    , sum(deposit/pow(10,24)) as volume
    , trunc(block_timestamp, 'week')
    from near.core.fact_transfers inner join near.core.dim_address_labels
    on TX_SIGNER=address and project_name='kucoin'
    group by 4)

    , NEAR_to_kucoin_chart as (select count(distinct TX_HASH) as transfer_count
    ,count(distinct TX_RECEIVER) as users
    , sum(deposit/pow(10,24)) as volume
    , trunc(block_timestamp, 'week')
    from near.core.fact_transfers inner join near.core.dim_address_labels
    on TX_RECEIVER=address and project_name='kucoin'
    group by 4
    )

    ,kucoin_to_NEAR_top5users_bytransfercount as (select count(distinct TX_HASH) as transfer_count
    , TX_SIGNER
    from near.core.fact_transfers inner join near.core.dim_address_labels
    on TX_SIGNER=address and project_name='kucoin'
    Run a query to Download Data