Query editor
select dt,sum(amount_usd) as predict_amount_usd,sum(amount_usd)*0.03 as fee_usd,count(distinct "sender") as usersfrom(select date_trunc('week', date_trunc('week', evt_block_time::date + 3)::date - 3) as dt,"sender","Bet Type",amount*price/(10^18) as amount_usdfrom(select evt_block_time,"sender",amount, 'Bet Up' as "Bet Type"from bhavish_prediction."BhavishPredictionBitcoin_evt_PredictUp"where evt_block_time > now() - interval '90 days'UNION ALLselect evt_block_time,"sender",amount, 'Bet Down' as "Bet Type"from bhavish_prediction."BhavishPredictionBitcoin_evt_PredictDown"where evt_block_time > now() - interval '90 days'UNION ALLselect evt_block_time,"sender",amount, 'Bet Up' as "Bet Type"from bhavish_prediction."BhavishPredictionEthereum_evt_PredictUp"where evt_block_time > now() - interval '90 days'UNION ALLselect evt_block_time,"sender",amount, 'Bet Down' as "Bet Type"from bhavish_prediction."BhavishPredictionEthereum_evt_PredictDown"where evt_block_time > now() - interval '90 days'UNION ALLselect evt_block_time,"sender",amount, 'Bet Up' as "Bet Type"from bhavish_prediction."BhavishPredictionMatic_evt_PredictUp"where evt_block_time > now() - interval '90 days'UNION ALLselect evt_block_time,"sender",amount, 'Bet Down' as "Bet Type"from bhavish_prediction."BhavishPredictionMatic_evt_PredictDown"where evt_block_time > now() - interval '90 days'UNION ALLselect evt_block_time,"sender",amount, 'Bet Up' as "Bet Type"from bhavish_prediction."BhavishPredictionBNB_evt_PredictUp"where evt_block_time > now() - interval '90 days'UNION ALLselect evt_block_time,"sender",amount, 'Bet Down' as "Bet Type"from bhavish_prediction."BhavishPredictionBNB_evt_PredictDown"where evt_block_time > now() - interval '90 days'UNION ALLselect evt_block_time,"sender",amount, 'Bet Up' as "Bet Type"