Query editor
with raw as (selectblock_date, count(distinct casewhen destination = upper('0:59b357b68790b09b143198024b18da843dc43d894dc10838f4352cdbc138866b')then sourceelsedestinationend) as unique_users, sum(value / 1e9) as "Daily Deposit Vol"from ton.messageswhere block_date > cast('2025-01-01' as timestamp)and direction = 'in'and (destination = upper('0:59b357b68790b09b143198024b18da843dc43d894dc10838f4352cdbc138866b')or source = upper('0:59b357b68790b09b143198024b18da843dc43d894dc10838f4352cdbc138866b'))and source is not nulland destination is not nulland (destination != upper('0:59b357b68790b09b143198024b18da843dc43d894dc10838f4352cdbc138866b')or source != upper('0:59b357b68790b09b143198024b18da843dc43d894dc10838f4352cdbc138866b'))group by1)select*from rawwhere block_date >= date_trunc('day', NOW() - interval '90' day)