• 2022-12-01窗口函数综训
    1.累加力扣534:关键点:sum(games_played)over(partitionbyplayer_idorderbyevent_date)--滑动累加求和,指向性明显,用sum()...over()...窗口函数。注:orderby后
  • 2022-10-03join 三表连接综训
    有时我们会对三个表做连接。力扣180:selectdistinctl1.NumasConsecutiveNumsfromLogsl1,Logsl2,Logsl3wherel1.Num=l2.Numandl1.Num=l3.Numandl1.Id
  • 2022-10-01join 新表连接综训
    对于较复杂的题,按需求处理产生新表,再连接。力扣1126:selectbusiness_idfromEventsjoin(selectevent_type,avg(occurences)asavg_occurencesfromEvents