biffbusterterritorial-amethyst
    Updated 2025-02-18
    -- with eth as (
    -- SELECT
    -- date_trunc('day',day) as day,
    -- COUNT(DISTINCT tx) as unique_txs,
    -- SUM(amount) as amount
    -- FROM (
    -- SELECT
    -- block_timestamp AS day,
    -- tx_hash AS tx,
    -- amount AS amount --- Mint
    -- FROM ethereum.core.ez_token_transfers
    -- WHERE contract_address = '0x1fecf3d9d4fee7f2c02917a66028a48c6706c179'
    -- AND from_address = '0x0000000000000000000000000000000000000000'
    -- UNION ALL
    -- SELECT
    -- block_timestamp as day,
    -- tx_hash as tx,
    -- -amount as amount -- Burn
    -- FROM ethereum.core.ez_token_transfers
    -- WHERE contract_address = '0x1fecf3d9d4fee7f2c02917a66028a48c6706c179'
    -- AND to_address = '0x0000000000000000000000000000000000000000'
    -- )
    -- GROUP BY 1
    -- ORDER BY 1 DESC
    -- ),

    -- stellar as (
    SELECT
    COUNT(DISTINCT a.account_id) AS funded_trustlines
    FROM stellar.core.fact_accounts a
    WHERE
    a.account_id IN (
    SELECT DISTINCT o.op_source_account
    FROM stellar.core.ez_operations o
    WHERE
    o.asset_code = 'WTGX'
    Last run: about 1 month ago
    FUNDED_TRUSTLINES
    1
    27034
    1
    9B
    12s