⌘K
Flycodx

Find Days With Higher Temperature Than Previous Day

Find Days With Higher Temperature Than Previous Day

EasySQL0% accepted

Given a Weather table with Id, RecordDate, and Temperature, find all dates where temperature is higher than the previous day.

Approach

Find dates with higher temperature than previous day using date comparison.

Input

Dates with temps: Jan1=10, Jan2=25, Jan3=20, Jan4=30

Output

Jan2 (25>10), Jan4 (30>20)

Scenarios & Expected Answers

Sign in to continue

Create a free account to view answers and mark progress.

  • Free forever — no credit card
  • Theory Q&A with detailed answers
  • Points, streaks & leaderboards
Auto Save On