摘要:
select distinct b.item_category as Category, ifnull(sum(case when dayofweek(a.order_date) = 2 then a.quantity end),0) Monday, ifnull(sum(case when day 阅读全文
摘要:
题目 数据 结果 解答 1 select *, rank() over(partition by username order by startdate desc) as rn, count(*) over(partition by username) cnt from useractivity 2 阅读全文
摘要:
题目 数据 结果 解答 1.union 合并数据、筛选日期 select 'succeeded' as 'state',success_date as 'dt' from Succeeded where success_date between '2019-01-01' and '2019-12-3 阅读全文
摘要:
题目 数据 结果 解答 1.因为分了两场,所以把两场连接为一场 select first_player player_id,first_score score from matches # union all select second_player player_id,second_score s 阅读全文