{ "data": { "question": { "questionId": "197", "questionFrontendId": "197", "categoryTitle": "Database", "boundTopicId": 1287, "title": "Rising Temperature", "titleSlug": "rising-temperature", "content": "
Table: Weather
\n+---------------+---------+\n| Column Name | Type |\n+---------------+---------+\n| id | int |\n| recordDate | date |\n| temperature | int |\n+---------------+---------+\nid is the column with unique values for this table.\nThis table contains information about the temperature on a certain day.\n\n\n
\n\n
Write a solution to find all dates' Id
with higher temperatures compared to its previous dates (yesterday).
Return the result table in any order.
\n\nThe result format is in the following example.
\n\n\n
Example 1:
\n\n\nInput: \nWeather table:\n+----+------------+-------------+\n| id | recordDate | temperature |\n+----+------------+-------------+\n| 1 | 2015-01-01 | 10 |\n| 2 | 2015-01-02 | 25 |\n| 3 | 2015-01-03 | 20 |\n| 4 | 2015-01-04 | 30 |\n+----+------------+-------------+\nOutput: \n+----+\n| id |\n+----+\n| 2 |\n| 4 |\n+----+\nExplanation: \nIn 2015-01-02, the temperature was higher than the previous day (10 -> 25).\nIn 2015-01-04, the temperature was higher than the previous day (20 -> 30).\n\n", "translatedTitle": "上升的温度", "translatedContent": "
表: Weather
\n+---------------+---------+\n| Column Name | Type |\n+---------------+---------+\n| id | int |\n| recordDate | date |\n| temperature | int |\n+---------------+---------+\nid 是该表具有唯一值的列。\n该表包含特定日期的温度信息\n\n
\n\n
编写解决方案,找出与之前(昨天的)日期相比温度更高的所有日期的 id
。
返回结果 无顺序要求 。
\n\n结果格式如下例子所示。
\n\n\n\n
示例 1:
\n\n\n输入:\nWeather 表:
\n+----+------------+-------------+\n| id | recordDate | Temperature |\n+----+------------+-------------+\n| 1 | 2015-01-01 | 10 |\n| 2 | 2015-01-02 | 25 |\n| 3 | 2015-01-03 | 20 |\n| 4 | 2015-01-04 | 30 |\n+----+------------+-------------+\n输出:\n+----+\n| id |\n+----+\n| 2 |\n| 4 |\n+----+\n解释:\n2015-01-02 的温度比前一天高(10 -> 25)\n2015-01-04 的温度比前一天高(20 -> 30)
\n\\u7248\\u672c\\uff1a mssql server 2019.<\\/p>\"],\"oraclesql\":[\"Oracle\",\" Oracle Sql 11.2.<\\/p>\"],\"pythondata\":[\"Pandas\",\" Python 3.10 with Pandas 2.0.2 and NumPy 1.25.0<\\/p>\"],\"postgresql\":[\"PostgreSQL\",\" PostgreSQL 16<\\/p>\"]}",
"book": null,
"isSubscribed": false,
"isDailyQuestion": false,
"dailyRecordStatus": null,
"editorType": "CKEDITOR",
"ugcQuestionId": null,
"style": "LEETCODE",
"exampleTestcases": "{\"headers\": {\"Weather\": [\"id\", \"recordDate\", \"temperature\"]}, \"rows\": {\"Weather\": [[1, \"2015-01-01\", 10], [2, \"2015-01-02\", 25], [3, \"2015-01-03\", 20], [4, \"2015-01-04\", 30]]}}",
"__typename": "QuestionNode"
}
}
}MySQL 8.0<\\/code><\\/p>\"],\"mssql\":[\"MS SQL Server\",\"