pine_samiWeekly assets swapped to
    Updated 2023-04-22

    with top10 as (
    SELECT SWAP_TO_MINT as address,
    count (distinct TX_ID) as swaps
    from solana.core.fact_swaps
    where BLOCK_TIMESTAMP >= current_date-180
    and SUCCEEDED='true'
    group by 1
    ORDER by 2 DESC
    limit 12
    ),
    label as (
    SELECT a.swaps as tx, b.LABEL as asset, b.ADDRESS as addresss
    from top10 a join solana.core.dim_labels b on a.address=b.ADDRESS
    order by 1 DESC
    )
    SELECT date_trunc('week', BLOCK_TIMESTAMP) as date, b.asset as assets,
    count (distinct TX_ID) as swaps
    from solana.core.fact_swaps a join label b on a.SWAP_FROM_MINT=b.addresss
    where a.BLOCK_TIMESTAMP >= current_date-180
    group by 1,2

    Run a query to Download Data