LeetCode 197. Rising Temperature

版权声明

  • LeetCode 系列笔记来源于 LeetCode 题库1,在个人思考的基础之上博采众长,受益匪浅;故今记此文,感怀于心,更多题解及程序,参见 Github2
  • 该系列笔记不以盈利为目的,仅用于个人学习、课后复习及交流讨论;
  • 如有侵权,请与本人联系([email protected]),经核实后即刻删除;
  • 本文采用 署名-非商业性使用-禁止演绎 4.0 国际 (CC BY-NC-ND 4.0) 协议发布;

1. LeetCode 197

  • 考察点:
    • 内连接;
    • DATEDIFF(date1, date2):返回两个日期相差的天数;
SELECT 
    Weather.Id
FROM
    Weather
        JOIN
    Weather t1 ON DATEDIFF(Weather.RecordDate, t1.RecordDate) = 1
        AND Weather.Temperature > t1.Temperature;

References


  1. https://leetcode-cn.com/u/hqpan/. ↩︎

  2. https://github.com/hqpan/LeetCode. ↩︎

发布了118 篇原创文章 · 获赞 9 · 访问量 9764

猜你喜欢

转载自blog.csdn.net/Maximize1/article/details/103757378