2023-09-01 19:42:45 +08:00
|
|
|
{
|
|
|
|
"data": {
|
|
|
|
"question": {
|
|
|
|
"questionId": "3097",
|
|
|
|
"questionFrontendId": "2837",
|
|
|
|
"categoryTitle": "Database",
|
|
|
|
"boundTopicId": 2415741,
|
|
|
|
"title": "Total Traveled Distance",
|
|
|
|
"titleSlug": "total-traveled-distance",
|
|
|
|
"content": null,
|
2023-12-09 18:42:21 +08:00
|
|
|
"translatedTitle": "总旅行距离",
|
2023-09-01 19:42:45 +08:00
|
|
|
"translatedContent": null,
|
|
|
|
"isPaidOnly": true,
|
|
|
|
"difficulty": "Easy",
|
|
|
|
"likes": 0,
|
|
|
|
"dislikes": 0,
|
|
|
|
"isLiked": null,
|
|
|
|
"similarQuestions": "[]",
|
|
|
|
"contributors": [],
|
|
|
|
"langToValidPlayground": null,
|
|
|
|
"topicTags": [
|
|
|
|
{
|
|
|
|
"name": "Database",
|
|
|
|
"slug": "database",
|
|
|
|
"translatedName": "数据库",
|
|
|
|
"__typename": "TopicTagNode"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"companyTagStats": null,
|
|
|
|
"codeSnippets": null,
|
2023-12-09 19:57:46 +08:00
|
|
|
"stats": "{\"totalAccepted\": \"280\", \"totalSubmission\": \"394\", \"totalAcceptedRaw\": 280, \"totalSubmissionRaw\": 394, \"acRate\": \"71.1%\"}",
|
2023-09-01 19:42:45 +08:00
|
|
|
"hints": [],
|
|
|
|
"solution": null,
|
|
|
|
"status": null,
|
|
|
|
"sampleTestCase": "{\"headers\":{\"Users\":[\"user_id\",\"name\"],\"Rides\":[\"ride_id\",\"user_id\",\"distance\"]},\"rows\":{\"Users\":[[17,\"Addison\"],[14,\"Ethan\"],[4,\"Michael\"],[2,\"Avery\"],[10,\"Eleanor\"]],\"Rides\":[[72,17,160],[42,14,161],[45,4,59],[32,2,197],[15,4,357],[56,2,196],[10,14,25]]}}",
|
2023-12-09 18:42:21 +08:00
|
|
|
"metaData": "{\"mysql\":[\"Create table if not exists Users(user_id int, name varchar(30))\",\"Create table if not exists Rides(ride_id int,user_id int, distance int)\"],\"mssql\":[\"Create table Users(user_id int, name varchar(30))\",\"Create table Rides(ride_id int,user_id int, distance int)\"],\"oraclesql\":[\"Create table Users(user_id int, name varchar(30))\",\"Create table Rides(ride_id int,user_id int, distance int)\"],\"database\":true,\"name\":\"get_total_distance\",\"pythondata\":[\"Users = pd.DataFrame([], columns=['user_id', 'name']).astype({'user_id':'Int64', 'name':'object'})\",\"Rides = pd.DataFrame([], columns=['ride_id', 'user_id', 'distance']).astype({'ride_id':'Int64', 'user_id':'Int64', 'distance':'Int64'})\"],\"postgresql\":[\"Create table if not exists Users(user_id int, name varchar(30))\",\"Create table if not exists Rides(ride_id int,user_id int, distance int)\"],\"database_schema\":{\"Users\":{\"user_id\":\"INT\",\"name\":\"VARCHAR(30)\"},\"Rides\":{\"ride_id\":\"INT\",\"user_id\":\"INT\",\"distance\":\"INT\"}}}",
|
2023-09-01 19:42:45 +08:00
|
|
|
"judgerAvailable": true,
|
|
|
|
"judgeType": "large",
|
|
|
|
"mysqlSchemas": [
|
|
|
|
"Create table if not exists Users(user_id int, name varchar(30))",
|
|
|
|
"Create table if not exists Rides(ride_id int,user_id int, distance int)",
|
|
|
|
"Truncate table Users",
|
|
|
|
"insert into Users (user_id, name) values ('17', 'Addison')",
|
|
|
|
"insert into Users (user_id, name) values ('14', 'Ethan')",
|
|
|
|
"insert into Users (user_id, name) values ('4', 'Michael')",
|
|
|
|
"insert into Users (user_id, name) values ('2', 'Avery')",
|
|
|
|
"insert into Users (user_id, name) values ('10', 'Eleanor')",
|
|
|
|
"Truncate table Rides",
|
|
|
|
"insert into Rides (ride_id, user_id, distance) values ('72', '17', '160')",
|
|
|
|
"insert into Rides (ride_id, user_id, distance) values ('42', '14', '161')",
|
|
|
|
"insert into Rides (ride_id, user_id, distance) values ('45', '4', '59')",
|
|
|
|
"insert into Rides (ride_id, user_id, distance) values ('32', '2', '197')",
|
|
|
|
"insert into Rides (ride_id, user_id, distance) values ('15', '4', '357')",
|
|
|
|
"insert into Rides (ride_id, user_id, distance) values ('56', '2', '196')",
|
|
|
|
"insert into Rides (ride_id, user_id, distance) values ('10', '14', '25')"
|
|
|
|
],
|
|
|
|
"enableRunCode": true,
|
2023-12-09 18:42:21 +08:00
|
|
|
"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>\"]}",
|
2023-09-01 19:42:45 +08:00
|
|
|
"book": null,
|
|
|
|
"isSubscribed": false,
|
|
|
|
"isDailyQuestion": false,
|
|
|
|
"dailyRecordStatus": null,
|
|
|
|
"editorType": "CKEDITOR",
|
|
|
|
"ugcQuestionId": null,
|
|
|
|
"style": "LEETCODE",
|
|
|
|
"exampleTestcases": "{\"headers\":{\"Users\":[\"user_id\",\"name\"],\"Rides\":[\"ride_id\",\"user_id\",\"distance\"]},\"rows\":{\"Users\":[[17,\"Addison\"],[14,\"Ethan\"],[4,\"Michael\"],[2,\"Avery\"],[10,\"Eleanor\"]],\"Rides\":[[72,17,160],[42,14,161],[45,4,59],[32,2,197],[15,4,357],[56,2,196],[10,14,25]]}}",
|
|
|
|
"__typename": "QuestionNode"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|