Query editor
with rabbithole_claim_history as(select*from query_2767496),rabbithole_claim_res as(selectevt_block_time,questAddress,questId,recipient,rewardAmount,rewardToken,symbol,a.blockchain as blockchain,evt_tx_hash,reward_type,table_name,a.stat_date as stat_date,pricefrom(selectevt_block_time,questAddress,questId,recipient,rewardAmount,rewardToken,symbol,blockchain,evt_tx_hash,reward_type,table_name,date_trunc('day',evt_block_time) as stat_datefrom rabbithole_claim_history) aleft join(selectdate_trunc('day',minute) as stat_date,blockchain,contract_address,avg(price) as pricefrom prices.usdwhere minute>timestamp '2023-01-01'group by 1,2,3)bon (a.blockchain=b.blockchain and a.rewardToken=b.contract_address and a.stat_date=b.stat_date))selectcasewhen total_quest_completions=1 then '1'when total_quest_completions>1 and total_quest_completions <=5 then '2~5'when total_quest_completions>5 and total_quest_completions <=10 then '6~10'