Finding stablecoin movement volumes by entities on Tron.
select
date_trunc('month', block_timestamp) as date,
from_project,
token_symbol,
sum(amount) as volume
from
(
select
block_timestamp,
from_address,
sender.project as from_project,
sender.category as from_category,
to_address,
recipient.project as to_project,
recipient.category as to_category,
token_symbol,
amount,
usd_amount
from
tron.assets.trc20_token_transfers
left join tron.identity.entities sender on sender.address = from_address
left join tron.identity.entities recipient on recipient.address = to_address
where
1 = 1
and block_timestamp >= '2021-01-01'
and token_address in (
'TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t', -- Tether USD
'TEkxiTehnzSmSe2XqrBj4w32RUN966rdz8', -- Circle USDC
'TUpMhErZL2fhh4sVNULAbNKLokS4GjC1F4' -- TrueUSD
)
)
group by 1,2,3