with
lastMonthSwaps as (
select
*
from
solana.core.fact_swaps swaps
left join solana.core.dim_labels labels on labels.address = swaps.program_id
where
block_timestamp BETWEEN DATEADD('day', -30, CURRENT_DATE()) AND CURRENT_DATE()
)
select
count(*) as number_of_swaps,
label
from
lastMonthSwaps
group by
label
order by
number_of_swaps desc
limit 3;