mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-01-10 18:48:13 +08:00
60 lines
4.7 KiB
JSON
60 lines
4.7 KiB
JSON
{
|
|
"data": {
|
|
"question": {
|
|
"questionId": "3520",
|
|
"questionFrontendId": "3214",
|
|
"categoryTitle": "Database",
|
|
"boundTopicId": 2834912,
|
|
"title": "Year on Year Growth Rate",
|
|
"titleSlug": "year-on-year-growth-rate",
|
|
"content": null,
|
|
"translatedTitle": "同比增长率",
|
|
"translatedContent": null,
|
|
"isPaidOnly": true,
|
|
"difficulty": "Hard",
|
|
"likes": 0,
|
|
"dislikes": 0,
|
|
"isLiked": null,
|
|
"similarQuestions": "[]",
|
|
"contributors": [],
|
|
"langToValidPlayground": null,
|
|
"topicTags": [
|
|
{
|
|
"name": "Database",
|
|
"slug": "database",
|
|
"translatedName": "数据库",
|
|
"__typename": "TopicTagNode"
|
|
}
|
|
],
|
|
"companyTagStats": null,
|
|
"codeSnippets": null,
|
|
"stats": "{\"totalAccepted\": \"67\", \"totalSubmission\": \"111\", \"totalAcceptedRaw\": 67, \"totalSubmissionRaw\": 111, \"acRate\": \"60.4%\"}",
|
|
"hints": [],
|
|
"solution": null,
|
|
"status": null,
|
|
"sampleTestCase": "{\"headers\":{\"user_transactions\":[\"transaction_id\",\"product_id\",\"spend\",\"transaction_date\"]},\"rows\":{\"user_transactions\":[[1341,123424,1500.60,\"2019-12-31 12:00:00\"],[1423,123424,1000.20,\"2020-12-31 12:00:00\"],[1623,123424,1246.44,\"2021-12-31 12:00:00\"],[1322,123424,2145.32,\"2022-12-31 12:00:00\"]]}}",
|
|
"metaData": "{\"mysql\":[\"Create Table if not exists user_transactions( transaction_id int, product_id int, spend decimal(10,2), \\ntransaction_date datetime)\"],\"mssql\":[\"Create Table user_transactions( transaction_id int, product_id int, spend decimal(10,2), \\ntransaction_date datetime)\"],\"oraclesql\":[\"Create Table user_transactions( transaction_id NUMBER, product_id NUMBER, spend NUMBER(10,2), \\ntransaction_date date)\",\"ALTER SESSION SET nls_date_format='YYYY-MM-DD HH24:MI:SS'\"],\"database\":true,\"name\":\"calculate_yoy_growth\",\"postgresql\":[\"CREATE TABLE IF NOT EXISTS user_transactions (\\n transaction_id INT,\\n product_id INT,\\n spend NUMERIC(10, 2),\\n transaction_date TIMESTAMP\\n);\\n\"],\"pythondata\":[\"user_transactions = pd.DataFrame(columns=['transaction_id', 'product_id', 'spend', 'transaction_date'], dtype={'transaction_id': 'int', 'product_id': 'int', 'spend': 'float', 'transaction_date': 'datetime64[ns]'})\\n\"],\"database_schema\":{\"user_transactions\":{\"transaction_id\":\"INT\",\"product_id\":\"INT\",\"spend\":\"DECIMAL(10, 2)\",\"transaction_date\":\"DATETIME\"}}}",
|
|
"judgerAvailable": true,
|
|
"judgeType": "large",
|
|
"mysqlSchemas": [
|
|
"Create Table if not exists user_transactions( transaction_id int, product_id int, spend decimal(10,2), \ntransaction_date datetime)",
|
|
"Truncate table user_transactions",
|
|
"insert into user_transactions (transaction_id, product_id, spend, transaction_date) values ('1341', '123424', '1500.6', '2019-12-31 12:00:00')",
|
|
"insert into user_transactions (transaction_id, product_id, spend, transaction_date) values ('1423', '123424', '1000.2', '2020-12-31 12:00:00')",
|
|
"insert into user_transactions (transaction_id, product_id, spend, transaction_date) values ('1623', '123424', '1246.44', '2021-12-31 12:00:00')",
|
|
"insert into user_transactions (transaction_id, product_id, spend, transaction_date) values ('1322', '123424', '2145.32', '2022-12-31 12:00:00')"
|
|
],
|
|
"enableRunCode": true,
|
|
"envInfo": "{\"mysql\":[\"MySQL\",\"<p>\\u7248\\u672c\\uff1a<code>MySQL 8.0<\\/code><\\/p>\"],\"mssql\":[\"MS SQL Server\",\"<p>mssql server 2019.<\\/p>\"],\"oraclesql\":[\"Oracle\",\"<p>Oracle Sql 11.2.<\\/p>\"],\"pythondata\":[\"Pandas\",\"<p>Python 3.10 with Pandas 2.0.2 and NumPy 1.25.0<\\/p>\"],\"postgresql\":[\"PostgreSQL\",\"<p>PostgreSQL 16<\\/p>\"]}",
|
|
"book": null,
|
|
"isSubscribed": false,
|
|
"isDailyQuestion": false,
|
|
"dailyRecordStatus": null,
|
|
"editorType": "CKEDITOR",
|
|
"ugcQuestionId": null,
|
|
"style": "LEETCODE",
|
|
"exampleTestcases": "{\"headers\":{\"user_transactions\":[\"transaction_id\",\"product_id\",\"spend\",\"transaction_date\"]},\"rows\":{\"user_transactions\":[[1341,123424,1500.60,\"2019-12-31 12:00:00\"],[1423,123424,1000.20,\"2020-12-31 12:00:00\"],[1623,123424,1246.44,\"2021-12-31 12:00:00\"],[1322,123424,2145.32,\"2022-12-31 12:00:00\"]]}}",
|
|
"__typename": "QuestionNode"
|
|
}
|
|
}
|
|
} |