Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Double check about stat query #200

Open
longfin opened this issue Aug 12, 2022 · 1 comment
Open

Double check about stat query #200

longfin opened this issue Aug 12, 2022 · 1 comment
Assignees

Comments

@longfin
Copy link
Member

longfin commented Aug 12, 2022

https://planetariumhq.slack.com/archives/C03P5080KJL/p1660285618583749

# 일별 DAU 및 스테이지 플레이 액션 카운트 조회 쿼리 (Play&Sweep)
select DATE_FORMAT(`Timestamp`, '%Y-%m-%d'), COUNT(DISTINCT AgentAddress), count(*) from 
(select AgentAddress, `Timestamp` FROM HackAndSlashes WHERE `Timestamp` > '2022-05-14 00:00:00'
union
select AgentAddress, `Timestamp`FROM HackAndSlashSweeps WHERE `Timestamp` > '2022-05-14 00:00:00')
as a GROUP by DATE_FORMAT(`Timestamp`, '%Y-%m-%d')

# 일별 아레나 수행 계정 및 횟수 조회 쿼리
select DATE_FORMAT(`Timestamp`, '%Y-%m-%d'), COUNT(DISTINCT AgentAddress), count(*) from BattleArenas where `Timestamp` > '2022-05-14 00:00:00' GROUP by DATE_FORMAT(`Timestamp`, '%Y-%m-%d')  

# 일별 강화 수행 계정 및 횟수 조회 쿼리
select DATE_FORMAT(`Timestamp`, '%Y-%m-%d'), COUNT(DISTINCT AgentAddress), count(*) from ItemEnhancements where `Timestamp` > '2022-05-14 00:00:00' GROUP by DATE_FORMAT(`Timestamp`, '%Y-%m-%d')

#일간 거래량/거래금액/거래인원 집계 쿼리 (품목 통합)
select DATE_FORMAT(`Timestamp`, '%Y-%m-%d') as date, COUNT(OrderId), sum(price), COUNT(DISTINCT SellerAvatarAddress, BuyerAvatarAddress)  from (
(select OrderId , SellerAvatarAddress , BuyerAvatarAddress , Price, Timestamp from ShopHistoryConsumables WHERE `Timestamp` > '2022-05-14 00:00:00')
Union all 
(select OrderId , SellerAvatarAddress , BuyerAvatarAddress , Price, Timestamp  from ShopHistoryCostumes WHERE `Timestamp` > '2022-05-14 00:00:00')
Union all 
(select OrderId , SellerAvatarAddress , BuyerAvatarAddress , Price, Timestamp  from ShopHistoryEquipments WHERE `Timestamp` > '2022-05-14 00:00:00')
Union all 
(select OrderId , SellerAvatarAddress , BuyerAvatarAddress , Price, Timestamp  from ShopHistoryMaterials WHERE `Timestamp` > '2022-05-14 00:00:00')
) as a group by DATE_FORMAT(`Timestamp`, '%Y-%m-%d') ORDER BY DATE

# 일별 아레나 수행 계정 및 횟수 조회 쿼리
select DATE_FORMAT(`Timestamp`, '%Y-%m-%d'), COUNT(DISTINCT AgentAddress), count(*) from CombinationEquipments where `Timestamp` > '2022-05-14 00:00:00' GROUP by DATE_FORMAT(`Timestamp`, '%Y-%m-%d')  

# 일별 강화 수행 계정 및 횟수 조회 쿼리
select DATE_FORMAT(`Timestamp`, '%Y-%m-%d'), COUNT(DISTINCT AgentAddress), count(*) from CombinationConsumables where `Timestamp` > '2022-05-14 00:00:00' GROUP by DATE_FORMAT(`Timestamp`, '%Y-%m-%d')
@longfin
Copy link
Member Author

longfin commented Aug 12, 2022

제가 할 수 있는 차원의 검증은 했고, 용도는 위클리 리포트에 넣어 트렌드 보는 거니 긴급한 이슈는 아닙니다~ [천천히, 시간되실 때] 확인해 주시면 감사하겠습니다~

https://planetariumhq.slack.com/archives/C03P5080KJL/p1660296250252829?thread_ts=1660285618.583749&cid=C03P5080KJL

@area363 area363 added main and removed from-slack labels Aug 15, 2022
@area363 area363 self-assigned this Aug 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants