Query editor
SELECTtime,blockchain,token,contract,quantity,historical_price,historical_value,current_price,current_value,value_percentage_change,donor_address,donor_name,CASEWHEN CAST(donor_address AS VARCHAR) = CAST(donor_name AS VARCHAR) THEN CAST(donor_address AS VARCHAR)ELSE CONCAT(donor_name, ' (', CAST(donor_address AS VARCHAR), ')')END AS donor_full,to,tx_hashFROM (SELECTtime,blockchain,token,contract,quantity,CASEWHEN historical_price = 0 AND contract = 0x10dea67478c5f8c5e2d90e5e9b26dbe60c54d800 THEN 2.43 -- TAIKOWHEN historical_price = 0 AND contract = 0x4F604735c1cF31399C6E711D5962b2B3E0225AD3 THEN 1 -- USDGLOELSE historical_priceEND AS historical_price,CASEWHEN historical_price = 0 AND contract = 0x10dea67478c5f8c5e2d90e5e9b26dbe60c54d800 THEN 2.43 * quantity -- TAIKOWHEN historical_price = 0 AND contract = 0x4F604735c1cF31399C6E711D5962b2B3E0225AD3 THEN 1 * quantity -- USDGLOELSE historical_price * quantityEND AS historical_value,CASEWHEN current_price = 0 AND contract = 0x4F604735c1cF31399C6E711D5962b2B3E0225AD3 THEN 1 -- USDGLOELSE current_priceEND AS current_price,CASEWHEN current_price = 0 AND contract = 0x4F604735c1cF31399C6E711D5962b2B3E0225AD3 THEN 1 * quantity -- USDGLOELSE current_price * quantityEND AS current_value,value_percentage_change,donor_address,CASE-- ALSO UPDATE DONOR TAG IN "VESTING STREAMS" https://dune.com/queries/3841110?sidebar=noneWHEN tx_hash = 0x1ecf5a798e4ba7e2fd10bb79f731a9217b6a29e6081c33085328f834485cb8dd ORtx_hash = 0x5f43742a0206c8a598fbb10eb9c06fba969b61811ecf2bf0482063d4a0e2d4dfTHEN 'Arbitrum Community'WHEN tx_hash = 0xdf50f9a4d88484922a2070acda173a29acf622ac7d30b28289dfd6d2200794f2 ORtx_hash = 0xf34bab8675800d29a9b6ac73811149c292efd7be14fa9b548ad9a018f20ec119 ORtx_hash = 0xe0ff5e8e97136131b0161df69ad7213d6e73f88a07e8443a48efc8e57910705d ORtx_hash = 0xb9aba70191829c04214d4ca33c6f7cb3ef06314333d6525bc9d84d9ad2eed7c6 ORtx_hash = 0x0c875ee73535d03dc7a31666611003a26b092218edb4032c79dea449e35974a1 ORtx_hash = 0xc26d4da710ada5da7864295474ac811ecc5535be51d51743a80e031d6cbe871dTHEN 'Octant / Golem Foundation'WHEN tx_hash = 0xb10c7aa56c587523d86265cafe9241c25251cc8155e91fdd9de2e7c15237d6cd OR