select
distinct (a.player) as player,
sum(price) as price_sum,
avg(price) as price_avg,
count(*) as tx_num
from flow.core.dim_allday_metadata a
inner join flow.core.ez_nft_sales b
using (nft_id)
where player not like 'N/A'
group by player
order by price_sum desc, tx_num desc