levanaTop traders, Avg trading size pt2
    Updated 2024-10-09
    -- forked from Top traders, Avg trading size pt1 @ https://flipsidecrypto.xyz/studio/queries/78d2f936-bf96-4459-a92d-f5fa1b5bfbac

    -- forked from Top traders, Avg trading Volume @ https://flipsidecrypto.xyz/studio/queries/03229782-e5f7-4a50-876a-0815660d1f02

    -- forked from Avg Volume,trades per Trader 2 @ https://flipsidecrypto.xyz/studio/queries/b2244898-b25b-4af5-88b2-887ed195e8d1

    -- forked from Avg Volume,trades per Trader copy @ https://flipsidecrypto.xyz/studio/queries/ed2265de-12f9-447d-90af-ab7f38d5a66b

    -- forked from Avg Volume,trades per Trader @ https://flipsidecrypto.xyz/studio/queries/844708fa-1474-43a3-b948-31570d54a1c2

    -- forked from Volume Avg Volume per Trader @ https://flipsidecrypto.xyz/studio/queries/8a4d6e2c-8b58-47c4-b68b-f5e2201844d4

    -- forked from Volume Weekly @ https://flipsidecrypto.xyz/studio/queries/6799195c-34f5-4484-846e-7a07e2f171b9

    with Volume AS (
    SELECT
    Volume.block_timestamp,
    Volume.tx_id,
    Volume.attribute_value AS Volume
    FROM
    osmosis.core.fact_msg_attributes AS Volume
    WHERE
    Volume.attribute_key = 'volume-usd' and Volume.MSG_TYPE='wasm-history-trade-volume'
    and Volume.tx_succeeded=TRUE and Volume.block_timestamp Between '{{START_DATE}}' and '{{END_DATE}}'),
    trader AS (
    SELECT
    direction.block_timestamp,
    direction.tx_id,
    direction.attribute_value AS trader
    FROM
    osmosis.core.fact_msg_attributes AS direction
    WHERE
    direction.attribute_key = 'pos-owner' and direction.MSG_TYPE like 'wasm-position%'
    and direction.tx_succeeded=TRUE and direction.block_timestamp Between '{{START_DATE}}' and '{{END_DATE}}'
    ),
    main AS (
    QueryRunArchived: QueryRun has been archived