DatarunnerCopper Ore
    Updated 2 hours ago
    --Copper Ore
    WITH
    tx_list AS (
    SELECT
    TO_VARCHAR(DATE_TRUNC('HOUR', block_timestamp), 'YYYY-MM-DD HH24:MI') AS date,
    --TO_VARCHAR(DATE_TRUNC('DAY', block_timestamp), 'YYYY-MM-DD HH24:MI:SS') AS date,
    inner_instruction:instructions[0]:parsed:info:tokenAmount:uiAmount AS total_des_frais,
    inner_instruction:instructions[1]:parsed:info:tokenAmount:uiAmount AS total_hf,
    inner_instruction:instructions[2]:parsed:info:tokenAmount:uiAmount AS volume_total,
    total_hf + total_des_frais AS montant_total,
    inner_instruction:instructions[0]:parsed:info:mint::string = 'ATLASXmbPQxBUYbxPsV97usA3fPQYEqzQBUHgiFCUsXx' AS ATLAS,
    inner_instruction:instructions[0]:parsed:info:mint::string = 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v' AS USDC,
    inner_instruction:instructions[2]:parsed:info:mint::string = 'CUore1tNkiubxSwDEtLc3Ybs1xfWLs8uGjyydUYZ25xc' AS Copper_Ore,
    CASE
    WHEN ATLAS THEN (total_hf + total_des_frais) / NULLIF(volume_total, 0)
    END AS prix_unitaire_ATLAS,
    CASE
    WHEN USDC THEN (total_hf + total_des_frais) / NULLIF(volume_total, 0)
    END AS prix_unitaire_USDC,
    CASE
    WHEN ATLAS THEN 'ATLAS'
    WHEN USDC THEN'USDC'
    END AS devise

    FROM
    solana.core.fact_events

    WHERE
    program_id = 'traderDnaR5w6Tcoi3NFm53i48FTDNbGjBSZwWXDRrg'
    AND succeeded = 'true'
    AND block_timestamp >= DATEADD(DAY, -90, CURRENT_TIMESTAMP())
    AND Copper_Ore
    AND devise IN ('USDC', 'ATLAS')
    ),

    final AS (
    Last run: about 2 hours agoAuto-refreshes every 12 hours
    Date
    Volume / Hour
    Copper Ore (ATLAS)
    1
    2025-04-15 04:0016,929,9790.00078111
    2
    2025-04-13 08:0013,025,3240.00078108
    3
    2025-04-11 06:005,364,2020.00081499
    4
    2025-04-09 05:001,000,0000.000815
    5
    2025-04-08 00:002,000,0000.00082855
    6
    2025-04-06 17:0035,830,0460.00075111
    7
    2025-04-06 14:00981,7490.00074108
    8
    2025-04-04 18:001,069,9990.00075111
    9
    2025-04-04 04:009,700,1500.00078999
    10
    2025-04-01 18:0010,000,0000.00082
    11
    2025-03-31 07:00344,9150.0007987
    12
    2025-03-31 06:005,000,0000.00082
    13
    2025-03-30 20:0082,3280.00079
    14
    2025-03-30 04:005,703,1240.00078781
    15
    2025-03-24 21:001,000,0000.00089995
    16
    2025-03-24 18:0015,415,6160.00089997
    17
    2025-03-23 16:001,000,0000.00092899
    18
    2025-03-23 09:002,000,0000.00092899
    19
    2025-03-22 20:001,000,0000.00092899
    20
    2025-03-22 12:0011,000,0000.00084
    ...
    135
    6KB
    36s