Query editor
-- Liquidity Actions: GM Deposits / Withdrawals / Shifts-- One row per GM deposit, withdrawal or shift request (created event), with its execution or cancellation.-- Depends on: query_9092319 (raw ui_fee_receiver / src_chain_id / ShiftCancelled)-- Prices: token USD = hourly mid price from query 9092298 (section D prices table) at the hour of execution;-- GM token USD = daily GM mid price from query 6154239 (dune."gmx-io".result_squid_api_request_optimized).WITHraw_fields AS (SELECTblockchain, tx_hash, index, event_name, key, block_time, ui_fee_receiver, ui_fee_factor, src_chain_id, reason, reason_bytesFROM query_9092319), markets AS (SELECTblockchain, market, market_name, long_token, short_token, long_token_decimals, short_token_decimalsFROM gmx_v2.markets_data), token_decimals AS (SELECTblockchain, contract_address, MAX(decimals) AS decimalsFROM gmx_v2.erc20GROUP BY 1, 2)-- Shifts and GLV actions execute GM deposits / withdrawals internally and emit their own-- DepositCreated / WithdrawalCreated / ShiftCreated events inside the execution tx.-- Those legs belong to the parent action (shift row here, GLV rows in dataset 7), so they are excluded., composite_exec_tx AS (SELECT DISTINCT blockchain, tx_hash FROM gmx_v2.shift_executedUNIONSELECT DISTINCT blockchain, tx_hash FROM gmx_v2.glv_deposit_executedUNIONSELECT DISTINCT blockchain, tx_hash FROM gmx_v2.glv_withdrawal_executedUNIONSELECT DISTINCT blockchain, tx_hash FROM gmx_v2.glv_shift_executed), created_all AS (SELECTdc.blockchain, 'deposit' AS action_type, 'DepositCreated' AS created_event, dc.key, dc.account