2022-03-27 18:27:43 +08:00
|
|
|
{
|
|
|
|
"data": {
|
|
|
|
"question": {
|
|
|
|
"questionId": "1712",
|
|
|
|
"questionFrontendId": "1565",
|
|
|
|
"boundTopicId": null,
|
|
|
|
"title": "Unique Orders and Customers Per Month",
|
|
|
|
"titleSlug": "unique-orders-and-customers-per-month",
|
|
|
|
"content": null,
|
|
|
|
"translatedTitle": null,
|
|
|
|
"translatedContent": null,
|
|
|
|
"isPaidOnly": true,
|
|
|
|
"difficulty": "Easy",
|
2023-12-09 18:42:21 +08:00
|
|
|
"likes": 75,
|
|
|
|
"dislikes": 43,
|
2022-03-27 18:27:43 +08:00
|
|
|
"isLiked": null,
|
|
|
|
"similarQuestions": "[]",
|
|
|
|
"exampleTestcases": "{\"headers\":{\"Orders\":[\"order_id\",\"order_date\",\"customer_id\",\"invoice\"]},\"rows\":{\"Orders\":[[1,\"2020-09-15\",1,30],[2,\"2020-09-17\",2,90],[3,\"2020-10-06\",3,20],[4,\"2020-10-20\",3,21],[5,\"2020-11-10\",1,10],[6,\"2020-11-21\",2,15],[7,\"2020-12-01\",4,55],[8,\"2020-12-03\",4,77],[9,\"2021-01-07\",3,31],[10,\"2021-01-15\",2,20]]}}",
|
|
|
|
"categoryTitle": "Database",
|
|
|
|
"contributors": [],
|
|
|
|
"topicTags": [
|
|
|
|
{
|
|
|
|
"name": "Database",
|
|
|
|
"slug": "database",
|
|
|
|
"translatedName": null,
|
|
|
|
"__typename": "TopicTagNode"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"companyTagStats": null,
|
|
|
|
"codeSnippets": null,
|
2023-12-09 19:57:46 +08:00
|
|
|
"stats": "{\"totalAccepted\": \"20.3K\", \"totalSubmission\": \"24.7K\", \"totalAcceptedRaw\": 20296, \"totalSubmissionRaw\": 24697, \"acRate\": \"82.2%\"}",
|
2022-03-27 18:27:43 +08:00
|
|
|
"hints": [],
|
|
|
|
"solution": null,
|
|
|
|
"status": null,
|
|
|
|
"sampleTestCase": "{\"headers\":{\"Orders\":[\"order_id\",\"order_date\",\"customer_id\",\"invoice\"]},\"rows\":{\"Orders\":[[1,\"2020-09-15\",1,30],[2,\"2020-09-17\",2,90],[3,\"2020-10-06\",3,20],[4,\"2020-10-20\",3,21],[5,\"2020-11-10\",1,10],[6,\"2020-11-21\",2,15],[7,\"2020-12-01\",4,55],[8,\"2020-12-03\",4,77],[9,\"2021-01-07\",3,31],[10,\"2021-01-15\",2,20]]}}",
|
2023-12-09 18:42:21 +08:00
|
|
|
"metaData": "{\"mysql\": [\"Create table If Not Exists Orders (order_id int, order_date date, customer_id int, invoice int)\"], \"mssql\": [\"Create table Orders (order_id int, order_date date, customer_id int, invoice int)\"], \"oraclesql\": [\"Create table Orders (order_id int, order_date date, customer_id int, invoice int)\", \"ALTER SESSION SET nls_date_format='YYYY-MM-DD'\"], \"database\": true, \"name\": \"unique_orders_and_customers\", \"pythondata\": [\"Orders = pd.DataFrame([], columns=['order_id', 'order_date', 'customer_id', 'invoice']).astype({'order_id':'Int64', 'order_date':'datetime64[ns]', 'customer_id':'Int64', 'invoice':'Int64'})\"], \"postgresql\": [\"Create table If Not Exists Orders (order_id int, order_date date, customer_id int, invoice int)\"], \"database_schema\": {\"Orders\": {\"order_id\": \"INT\", \"order_date\": \"DATE\", \"customer_id\": \"INT\", \"invoice\": \"INT\"}}}",
|
2022-03-27 18:27:43 +08:00
|
|
|
"judgerAvailable": true,
|
|
|
|
"judgeType": "large",
|
|
|
|
"mysqlSchemas": [
|
|
|
|
"Create table If Not Exists Orders (order_id int, order_date date, customer_id int, invoice int)",
|
|
|
|
"Truncate table Orders",
|
|
|
|
"insert into Orders (order_id, order_date, customer_id, invoice) values ('1', '2020-09-15', '1', '30')",
|
|
|
|
"insert into Orders (order_id, order_date, customer_id, invoice) values ('2', '2020-09-17', '2', '90')",
|
|
|
|
"insert into Orders (order_id, order_date, customer_id, invoice) values ('3', '2020-10-06', '3', '20')",
|
|
|
|
"insert into Orders (order_id, order_date, customer_id, invoice) values ('4', '2020-10-20', '3', '21')",
|
|
|
|
"insert into Orders (order_id, order_date, customer_id, invoice) values ('5', '2020-11-10', '1', '10')",
|
|
|
|
"insert into Orders (order_id, order_date, customer_id, invoice) values ('6', '2020-11-21', '2', '15')",
|
|
|
|
"insert into Orders (order_id, order_date, customer_id, invoice) values ('7', '2020-12-01', '4', '55')",
|
|
|
|
"insert into Orders (order_id, order_date, customer_id, invoice) values ('8', '2020-12-03', '4', '77')",
|
|
|
|
"insert into Orders (order_id, order_date, customer_id, invoice) values ('9', '2021-01-07', '3', '31')",
|
|
|
|
"insert into Orders (order_id, order_date, customer_id, invoice) values ('10', '2021-01-15', '2', '20')"
|
|
|
|
],
|
|
|
|
"enableRunCode": true,
|
|
|
|
"enableTestMode": false,
|
|
|
|
"enableDebugger": false,
|
2023-12-09 18:42:21 +08:00
|
|
|
"envInfo": "{\"mysql\": [\"MySQL\", \"<p><code>MySQL 8.0</code>.</p>\"], \"mssql\": [\"MS SQL Server\", \"<p><code>mssql server 2019</code>.</p>\"], \"oraclesql\": [\"Oracle\", \"<p><code>Oracle Sql 11.2</code>.</p>\"], \"pythondata\": [\"Pandas\", \"<p>Python 3.10 with Pandas 2.0.2 and NumPy 1.25.0</p>\"], \"postgresql\": [\"PostgreSQL\", \"<p>PostgreSQL 16</p>\"]}",
|
2022-03-27 18:27:43 +08:00
|
|
|
"libraryUrl": null,
|
|
|
|
"adminUrl": null,
|
|
|
|
"challengeQuestion": null,
|
|
|
|
"__typename": "QuestionNode"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|