SQL: Rising Temperature

Medium
SQL — Self Join SQL Self Join DATE
Find dates where temperature was higher than the day before.

Constraints

Write standard SQL (MySQL 8.0 compatible).

Examples

Example 1:
Input: date temp 2024-01-01 10 2024-01-02 15 2024-01-03 12
Output:
Example 2:
Input: date temp 2024-01-01 10 2024-01-02 15 2024-01-03 12
Output:

Hints

Self-join on consecutive dates.
▲ Console

Install Talent Arabia

Get instant access to jobs and career tools on your device.