MoDeFiGPC - tokens trades
    Updated 2025-03-14
    with tokens_data as (
    select *
    from $query('75f58bb3-b2cd-4208-85e9-e3d75d901a1c')
    ),

    tokens_supply as (
    select *
    from $query('d113b02b-ad6c-4fc4-8bfb-df28c696d7da')
    ),

    polygon_txs as (
    select BLOCK_TIMESTAMP, TX_HASH, ORIGIN_FUNCTION_SIGNATURE, ORIGIN_FROM_ADDRESS, ORIGIN_TO_ADDRESS, CONTRACT_ADDRESS , FROM_ADDRESS, TO_ADDRESS,
    RAW_AMOUNT_PRECISE, AMOUNT, AMOUNT_USD, b.*
    from polygon.core.ez_token_transfers a
    left join tokens_data b
    on contract=CONTRACT_ADDRESS
    where BLOCK_TIMESTAMP::date>='2025-01-27'
    union all
    select BLOCK_TIMESTAMP, TX_HASH, ORIGIN_FUNCTION_SIGNATURE, ORIGIN_FROM_ADDRESS, ORIGIN_TO_ADDRESS, '' as CONTRACT_ADDRESS , FROM_ADDRESS, TO_ADDRESS,
    AMOUNT_PRECISE_RAW, AMOUNT, AMOUNT_USD, '', 'POL', 0, '', ''
    from polygon.core.ez_native_transfers
    where BLOCK_TIMESTAMP::date>='2025-01-27'),

    polygon_undetected_swaps_raw as
    (select a.BLOCK_TIMESTAMP, a.TX_HASH, a.ORIGIN_FUNCTION_SIGNATURE, a.ORIGIN_FROM_ADDRESS, a.ORIGIN_TO_ADDRESS,
    b.RAW_AMOUNT_PRECISE as AMOUNT_IN_UNADJ, b.AMOUNT as AMOUNT_IN, b.AMOUNT_USD as AMOUNT_IN_USD,
    a.RAW_AMOUNT_PRECISE as AMOUNT_OUT_UNADJ, a.AMOUNT as AMOUNT_OUT, a.AMOUNT_USD as AMOUNT_OUT_USD, 'Other' as PLATFORM,
    b.CONTRACT_ADDRESS as TOKEN_IN, a.CONTRACT_ADDRESS as TOKEN_OUT, b.SYMBOL as SYMBOL_IN, a.SYMBOL as SYMBOL_OUT
    from polygon_txs a
    join polygon_txs b
    on a.TX_HASH=b.TX_HASH and a.ORIGIN_FROM_ADDRESS=a.FROM_ADDRESS and a.ORIGIN_FROM_ADDRESS=b.TO_ADDRESS
    where TOKEN_OUT!=TOKEN_IN
    and (TOKEN_IN in (select contract from tokens_data) or TOKEN_OUT in (select contract from tokens_data))
    and a.tx_hash not in (select tx_hash from polygon.defi.ez_dex_swaps)),

    polygon_dexs_swaps as (
    Last run: 19 days agoAuto-refreshes every 1 hour
    SYMBOL
    TXS
    TRADERS
    VOLUME_USD
    SUPPLY
    HOLDERS
    MC
    TOKEN_ADDRESS
    SWAPS_7D
    SWAPS_24H
    VOLUME_7D
    VOLUME_24H
    TRADERS_7D
    1
    OGC2074747429404.76666281710000000010752512.8780427380xccf37622e6b72352e7b410481dd4913563038b7c874225616885.613430737591.356677355331
    2
    DDD1741769540675.06323970710000000083362215.0773892330x4bf82cf0d6b2afc87367052b793097153c859d381383841337389.2506383951097.134049151628
    3
    DHG1154849616644.92171675810000000014227601.2688786780x75c0a194cd8b4f01d5ed58be5b7c5b61a9c69d0a52373189791.789589781919.786387825394
    4
    LGP991040111098.6599521361000000009218053.2765853880xddc330761761751e005333208889bfe36c6e676063421188107.85498414221.905394026326
    5
    BTN990733011087.215998521100000000260240883.9109841070xd7c584d40216576f1d8651eab8bef9de6949766658731197246.266497191172.435098312256
    6
    EGP809237114390.73051272810000000081925076.8594220020x64f6f111e9fdb753877f17f399b759de97379170636137113007.1125814251096.968669444352
    7
    PKT746929710458.6450685710000000011546618.9594168360x8a088dceecbcf457762eb7c66f78fff27dc0c04a45681287818.46397614355.997512427250
    8
    IGS67442539692.7902661810000000020337905.851387420xe302672798d12e7f68c783db2c2d5e6b48ccf3ce2720704247.4462998397.114635363170
    9
    LANTERN52012173289.087948393657234895.6374551610x8e87497ec9fd80fc102b33837035f76cf17c302024711451911.637109118355.302378547182
    10
    PEAR367144735294.285511041100000000062951281.9071302930xc760a77356563560260c9e571af6dbbab396be383234106731560.28488796712702.012577317399
    11
    SOLAR23241811633.00588522610000000016861232.2129100660x1772a283501b108c0f0016224518ff38db72de2f7511991109.22580975708.826327101136
    12
    STONEY167137713880.50173688410000000002035177.2859266960x1917f5c4d5ed06383b43e47f1e59ed1f3cb570741179657543.171001.74364
    13
    GONE127436515730.5314076586933916941022890157916.7199035360x162539172b53e9a93b7d98fb6c41682de558a320742829528.975672918810.33133043258
    14
    EARTH1051116487.1666475233046.2941750x9f9f149a02cddc9a8251207cefd3ff774daf56f637715201.8105558853.27806536939
    15
    KC1006864453.700720268982056253.867026582958639.8116199060x784665471bb8b945b57a76a9200b109ee214e789630841561.388090893120.83269798858
    16
    NEUS495793762.8114731771000000000731936.5272431650x1d9ccbe51cc6b4deeeca686d409561cf9f801fbc412123852.25486.4172
    17
    VOCATE405723637.73049121000000000817081.8860022980x560d5b84d081b3a91e1cea3a9713473303124730275513444.421518.9564
    18
    WORDS396702645.4201858410000000006310934.4734065730xa76164b3d0a2f35b140ec57f1552f7d6987e06db287912658.9210369
    19
    KIRANA37759991.0503432841000000000723934.2218554790xfec68cbf04f7c069628cf9e9c609abc95f9a476b18520900.6363.6155
    20
    NOMAD282571151.0348358571000000000653484.5934706180xd7b0c417365b63f098c1c4ad2ced35982d648876156331136.58794.8855
    39
    5KB
    190s