Query editor
SELECTevt_tx_hash,block_time,ENCODE(token_sold, 'hex') AS token_sold,ENCODE(token_bought, 'hex') AS token_bought,token_sold_amount,token_bought_amount,ROUND(token_bought_amount / NULLIF(token_sold_amount, 0), 6) AS price_AUSD_per_token,CASEWHEN LOWER(ENCODE(token_sold, 'hex')) = '00000000efe302beaa2b3e6e1b18d08d69a9012a' THEN 'AUSD_sold'WHEN LOWER(ENCODE(token_bought, 'hex')) = '00000000efe302beaa2b3e6e1b18d08d69a9012a' THEN 'AUSD_bought'END AS side,ENCODE(CAST(SUBSTR(ENCODE(evt_tx_hash, 'hex'), 1, 40) AS VARBINARY), 'hex') as traderFROM kuru_multichain.orderbook_evt_tradeWHERE block_date >= CURRENT_DATE - INTERVAL '7' DAYAND ((LOWER(ENCODE(token_sold, 'hex')) = '00000000efe302beaa2b3e6e1b18d08d69a9012a' AND LOWER(ENCODE(token_bought, 'hex')) IN ('4917a5ec9fcb5e10f47cbb197abe6ab63be81fe8', '336d414754967c6682b5a665c7daf6f1409e63e8'))OR (LOWER(ENCODE(token_bought, 'hex')) = '00000000efe302beaa2b3e6e1b18d08d69a9012a' AND LOWER(ENCODE(token_sold, 'hex')) IN ('4917a5ec9fcb5e10f47cbb197abe6ab63be81fe8', '336d414754967c6682b5a665c7daf6f1409e63e8')))ORDER BY block_time DESCLIMIT 50