with t1 as (select NFT_ID as a,SERIAL_NUMBER,PLAYER,TEAM,PLAY_TYPE
from flow.core.dim_allday_metadata),
t2 as
(select sum(PRICE) AS seals_volume,max(PRICE) as "Maximum seals price" ,count(distinct(NFT_ID)) as "Number of NFT related to this player", PLAYER from t1 a inner join flow.core.ez_nft_sales b
on a.a=b.NFT_ID
where NFT_COLLECTION='A.e4cf4bdc1751c65d.AllDay'
group by 4
order by 1 desc
limit 50),
t3 as
(select PLAY_TYPE,PLAYER,sum(PRICE)
from t1 a inner join flow.core.ez_nft_sales b
on a.a=b.NFT_ID
where NFT_COLLECTION='A.e4cf4bdc1751c65d.AllDay'
and PLAYER in(select player from t2)
group by 1,2)
select count(*) as "number of play type",PLAYER from t3
group by 2
order by 1 desc