with airdrop as (
select receiver,
block_timestamp,
transfer_type,
sender,
amount / pow(10,decimal) as amount,
currency,
'OSMO' as asset
from osmosis.core.fact_airdrop
where receiver like 'osmo%'
and tx_succeeded = TRUE
and currency = 'uosmo'
and amount is not NULL
),
osmosis_transfer as (
select ft.receiver,
ft.block_timestamp,
ft.transfer_type,
ft.sender,
ft.amount / pow(10, dt.decimal) as amount,
ft.currency,
coalesce(dt.project_name, 'UNLABELLED') as asset
from osmosis.core.fact_transfers ft
left join osmosis.core.dim_tokens dt
on ft.currency = dt.address
where ft.block_timestamp < '2023-01-02'
and ft.receiver like 'osmo%'
and ft.tx_succeeded = TRUE
and ft.transfer_type = 'OSMOSIS'
and ft.amount is not NULL
and dt.decimal is not NULL
),
external_transfer as (
select ft.receiver,