akshaymahajanmbg web shop
    WITH prices AS (
    SELECT
    hour,
    price
    FROM
    ethereum.price.ez_hourly_token_prices prices
    WHERE
    lower(token_address) = lower('0x82aF49447D8a07e3bd95BD0d56f35241523fBab1')
    and date(hour) >= '2022-01-01'
    ),
    latest_price AS (
    SELECT
    price
    FROM
    prices
    ORDER BY
    hour DESC
    LIMIT
    1
    )
    select
    tx.tx_hash,
    tx.block_timestamp,
    tx.block_number,
    tx.tx_hash || decoded.event_index as tx_signature,
    tx.from_address as address,
    'item_shop_purchase' as action,
    tx.to_address as contract_address,
    decoded.event_name,
    to_json(
    object_construct(
    'shopItemId', decoded.decoded_log:shopItemId,
    'staticItemId', decoded.decoded_log:staticItemId,
    'quantity', decoded.decoded_log:boughtSupply,
    'currency_id', transfers.contract_address,
    'currency_symbol', case when transfers.symbol is not null then transfers.symbol else 'ETH' end,
    Run a query to Download Data