KARTODSending vs Receiving Users on different chains
    Updated 2022-09-05
    SELECT
    DATE(BLOCK_TIMESTAMP) AS "Time",
    'Near' AS chain,
    COUNT(DISTINCT "TX_RECEIVER") AS "# of Receiving addresses (R)",
    COUNT(DISTINCT "TX_SIGNER") AS "# of Sending addresses (S)",
    "# of Sending addresses (S)" + "# of Receiving addresses (R)" AS "# of Total Addresses",
    ROUND(("# of Sending addresses (S)"::decimal/"# of Receiving addresses (R)"::decimal),2) AS "S/R Ratio",
    1 AS "Baseline"
    FROM near.core.fact_transactions
    WHERE BLOCK_TIMESTAMP > CURRENT_DATE() - INTERVAL'180 day'
    GROUP BY 1

    UNION ALL

    SELECT
    DATE(BLOCK_TIMESTAMP) AS "Time",
    'Polygon' AS chain,
    COUNT(DISTINCT "TO_ADDRESS") AS "# of Receiving addresses (R)",
    COUNT(DISTINCT "FROM_ADDRESS") AS "# of Sending addresses (S)",
    "# of Sending addresses (S)" + "# of Receiving addresses (R)" AS "# of Total Addresses",
    ROUND(("# of Sending addresses (S)"::decimal/"# of Receiving addresses (R)"::decimal),2) AS "S/R Ratio",
    1 AS "Baseline"
    FROM polygon.core.fact_transactions
    WHERE BLOCK_TIMESTAMP > CURRENT_DATE() - INTERVAL'180 day'
    GROUP BY 1

    UNION ALL

    SELECT
    DATE(BLOCK_TIMESTAMP) AS "Time",
    'Ethereum' AS chain,
    COUNT(DISTINCT "TO_ADDRESS") AS "# of Receiving addresses (R)",
    COUNT(DISTINCT "FROM_ADDRESS") AS "# of Sending addresses (S)",
    "# of Sending addresses (S)" + "# of Receiving addresses (R)" AS "# of Total Addresses",
    ROUND(("# of Sending addresses (S)"::decimal/"# of Receiving addresses (R)"::decimal),2) AS "S/R Ratio",
    1 AS "Baseline"
    Run a query to Download Data