SELECT
DATE_TRUNC ('day', block_timestamp) AS date_,
sum(case when CONTRACT_ADDRESS='0x7f5c764cbc14f9669b88837ca1490cca17c31607' then RAW_AMOUNT/1e9
when CONTRACT_ADDRESS='0x8c6f28f2f1a3c87f0f938b96d27520d9751ec8d9' then RAW_AMOUNT/1e9
when CONTRACT_ADDRESS='0x94b008aa00579c1307b0ef2c499ad98a8ce58e58' then RAW_AMOUNT/1e9
when CONTRACT_ADDRESS='0xda10009cbd5d07dd0cecc66161fc93d7c9000da1' then RAW_AMOUNT/1e9 end) as volume,
COUNT(DISTINCT TX_HASH) as TXs,
COUNT( DISTINCT ORIGIN_FROM_ADDRESS) as Users
from optimism.core.fact_token_transfers
where block_timestamp>=CURRENT_DATE-14
and ORIGIN_TO_ADDRESS='0x170a5714112daeff20e798b6e92e25b86ea603c1'
and TO_ADDRESS='0x170a5714112daeff20e798b6e92e25b86ea603c1'
group by 1
order by 1 DESC