AephiaFRMWRK_spl_tokens
    Updated 2025-01-03
    WITH txs AS (
    SELECT
    tx_id

    from solana.core.fact_events
    WHERE program_id = 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL'
    --program_id = 'traderDnaR5w6Tcoi3NFm53i48FTDNbGjBSZwWXDRrg'
    AND succeeded = 'true'
    AND instruction:parsed:info:mint = 'FMWKb7YJA5upZHbu5FjVRRoxdDw2FYFAu284VqUGF9C2'
    --AND inner_instruction:instructions[0]:parsed:info:tokenAmount:uiAmount != 0
    --AND inner_instruction:instructions[1]:parsed:info:tokenAmount:uiAmount != 0
    --AND inner_instruction:instructions[2]:parsed:info:tokenAmount:uiAmount != 0
    --AND inner_instruction[0]:instructions[2]:parsed:info:mint::string = 'fueL3hBZjLLLJHiFH9cqZoozTG3XQZ53diwFPwbzNim'
    --AND log_messages::string LIKE '%ProcessExchange%'
    --AND tx_id = '4bT5WLggMqyt9BzFUfg3WZgdQcNPSX7q8zYUodSrwDnHzNPZ6WtEZGZT4Cvtnq4RfgecqJU5UzJNHhp8unnmDEhf'
    --AND inner_instructions[0]:instructions[1]:parsed:info:mint::string = 'ATLASXmbPQxBUYbxPsV97usA3fPQYEqzQBUHgiFCUsXx'
    AND block_timestamp > current_date-14 AND block_timestamp < current_date

    )

    ,accounts AS (
    SELECT
    distinct instruction:accounts[4] as accounts
    --value:parsed:info:amount as

    from solana.core.fact_events
    , lateral flatten(input => inner_instruction:instructions)
    WHERE program_id = 'traderDnaR5w6Tcoi3NFm53i48FTDNbGjBSZwWXDRrg'
    AND succeeded = 'true'
    --AND inner_instruction:instructions[0]:parsed:info:tokenAmount:uiAmount != 0
    --AND inner_instruction:instructions[1]:parsed:info:tokenAmount:uiAmount != 0
    --AND inner_instruction:instructions[2]:parsed:info:tokenAmount:uiAmount != 0
    --AND inner_instruction[0]:instructions[2]:parsed:info:mint::string = 'fueL3hBZjLLLJHiFH9cqZoozTG3XQZ53diwFPwbzNim'
    --AND log_messages::string LIKE '%ProcessExchange%'
    AND tx_id IN (SELECT tx_id FROM txs)
    AND instruction:accounts[3] = 'ATLASXmbPQxBUYbxPsV97usA3fPQYEqzQBUHgiFCUsXx'
    Last run: 3 months ago
    ACCOUNTS
    1
    DAZsjeiqDLw6VNEaNGDpkmSPx5sHCgiiwJFTGuuzo1WP
    2
    CNCyRotz9EEcdjte5vGxwLWLwb6SEDAu1TmUp9cUNC1m
    3
    FMWKb7YJA5upZHbu5FjVRRoxdDw2FYFAu284VqUGF9C2
    4
    42dy2GweYdkBbHJoJ4gwgL4jNDjw4bNb58JxuwWDUgEr
    5
    9CrYqKtMLtbvEf3uaqjzWmU2mFotZcEAnE9CiHZtTBjX
    6
    DkVtg1TNoiFrNmTnyuT1Xs3aoJHcUn2re2ufdLh2DUHQ
    7
    ChB9fhvSj713mazg6yMESgkUGJHt9QUwyA71UDJGd3yz
    8
    3nvUqqTA8nVCgXWWjdo68yH2bcYUGEAvP1CHbEASdZg1
    9
    6Ax2LiMomDBoSxx2qWqGGdcDbhpfLA8Rn5JyYdEVwXFh
    10
    HWLEFHMo25XnngStTjAiwjaxcvQvTmCMWivbCwTL1NbE
    11
    E1zWsXCTQ3LG7YLmkjCS9GJegykvcTD89Do7KvoAyNR7
    12
    8e4aYMCn6ppD1Y12E5egdciDf3KnnyEDE7oWoJz4Gazr
    13
    wMQTzgVjFMxWrQYidzxcUwyKZExFsyHND8m2MDv6PyJ
    14
    Huag5wh1jMmz15AcdBcb7LRwf372hfMYL2Z8YdANaQ1o
    15
    68hYNjjn3QT7iRrvYkGqu48x3bC7pEvwrtd6xfx3fRP5
    16
    CJ8sNuKh4xhEhze7MMRfq9Vj6XzeXrwyuWLihm172BBL
    17
    CB6G26VE462EpThBwnZydXPMyaWFHnepxnkn5y9zHkC9
    18
    HEL4ZFMAKUaUJpaFM3G7bjsi9AdQtFb7jptC1wHu9qiJ
    19
    A6iPMiC1e9wmpsnBzdMEsrUsBET4XF3FRpXJvz3UZm98
    20
    9765LrBXS1wGTLgJhFC3Gq9weD6JbMxXhg4daF2qLtxa
    34
    2KB
    10s