rezarwzActive User
    Updated 2025-03-07
    with all_Data as (
    SELECT
    CREATED_AT,
    lower(cast(CALL:chain_type as STRING)) as source_chain_type,
    lower(cast(DESTINATION_CHAIN_TYPE as STRING)) as DESTINATION_CHAIN_TYPE,
    CONCAT(
    CAST(CALL:chain AS STRING),
    ' -> ',
    CAST(CALL:returnValues:destinationChain AS STRING)
    ) AS path,
    CONCAT(
    CAST(source_chain_type AS STRING),
    ' -> ',
    CAST(destination_chain_type AS STRING)
    ) as type,
    COALESCE(CAST(data:value AS FLOAT), 0) AS volume,
    CAST(id AS STRING) AS id,
    lower(
    COALESCE(
    CAST(CALL:receipt:from AS STRING),
    CAST(call:transaction:from as STRING)
    )
    ) as user_address,
    CAST(TIME_SPENT:total AS FLOAT) AS TIME_SPENT
    FROM
    axelar.axelscan.fact_gmp
    UNION
    ALL
    SELECT
    CREATED_AT AS Date,
    lower(
    cast(data:time_spent:source_chain_type as STRING)
    ) as source_chain_type,
    lower(
    cast(data:time_spent:destination_chain_type as STRING)
    ) as destination_chain_type,
    QueryRunArchived: QueryRun has been archived