Query editor
selectaddress, locked_amount, lock_expiration, casewhen lock_expiration < start_time + interval '90' daythen locked_amount * 0when lock_expiration < (start_time + interval '180' day)then locked_amount * 0.1when lock_expiration < (start_time + interval '270' day)then locked_amount * 0.2elselocked_amount * 0.3end as rewardsfrom (selectevt_tx_from as address, sum(value / 1e18) as locked_amount, max(from_unixtime(lockTime)) as lock_expiration, cast('{{start_timestamp}}' as TIMESTAMP) as start_timefrom jooce_base.votingescrow_evt_depositwhere evt_block_time >= cast('{{start_timestamp}}' as TIMESTAMP) and evt_block_time <= cast('{{end_timestamp}}' as timestamp)group byevt_tx_from) a