1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-01-10 18:48:13 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee

add leetcode problem-cn part3

This commit is contained in:
程序员小墨 2022-03-27 20:46:41 +08:00
parent 6dafca13c5
commit dfacb20d31
1385 changed files with 115239 additions and 3 deletions

View File

@ -2,16 +2,21 @@
使用 Python 脚本分批将力扣(国外版 `leetcode.com` 和 国内版 `leetcode-cn.com`)上面的题目下载下来,方便没有网的时候进行学习。 使用 Python 脚本分批将力扣(国外版 `leetcode.com` 和 国内版 `leetcode-cn.com`)上面的题目下载下来,方便没有网的时候进行学习。
目前已经下载部分 ### 目前已经下载部分
- [x] 国外版力扣题库,在仓库 `算法题(国外版)` 文件夹下(其中的 html 文件)。 - [x] 国外版力扣题库,在仓库 `算法题(国外版)` 文件夹下(其中的 html 文件)。
- [ ] 国内版力扣题库(部分),在仓库 `算法题(国内版)/problem (Chinese)` 文件夹下,对于同时有英文版的题目来说,英文版在仓库 `算法题(国内版)/problem (English)` 文件夹下。 - [ ] 国内版力扣题库(部分),在仓库 `算法题(国内版)/problem (Chinese)` 文件夹下,对于同时有英文版的题目来说,英文版在仓库 `算法题(国内版)/problem (English)` 文件夹下。
仅包含可以在网页上直接打开的公开题目,不包含 VIP 题目。 ### 一些说明
- 仅包含可以在网页上直接打开的公开题目,不包含 VIP 题目。
- 当前仓库的最后更新日期为 `2022.03.27`,仓库会每隔较长的一段时间从官方网站进行题目同步,同步后本仓库将更新。
> **注意!所有版权都为 LeetCode (及力扣中国)官方所有,此处仅供学习使用,感谢 LeetCode 平台为我们提供大量的算法题目进行练习、提升。也请大家不要滥用,不要侵犯力扣平台的合法权益。** > **注意!**
>
> **所有版权都为 LeetCode (及力扣中国) 官方所有,此处仅供学习使用,感谢 LeetCode 平台为我们提供大量的算法题目进行练习、提升。也请大家不要滥用,不要侵犯力扣平台的合法权益。**
--- ---

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,67 @@
{
"data": {
"question": {
"questionId": "615",
"questionFrontendId": "615",
"categoryTitle": "Database",
"boundTopicId": 2632,
"title": "Average Salary: Departments VS Company",
"titleSlug": "average-salary-departments-vs-company",
"content": null,
"translatedTitle": "平均工资:部门与公司比较",
"translatedContent": null,
"isPaidOnly": true,
"difficulty": "Hard",
"likes": 41,
"dislikes": 0,
"isLiked": null,
"similarQuestions": "[]",
"contributors": [],
"langToValidPlayground": null,
"topicTags": [
{
"name": "Database",
"slug": "database",
"translatedName": "数据库",
"__typename": "TopicTagNode"
}
],
"companyTagStats": null,
"codeSnippets": null,
"stats": "{\"totalAccepted\": \"7K\", \"totalSubmission\": \"16.5K\", \"totalAcceptedRaw\": 7050, \"totalSubmissionRaw\": 16527, \"acRate\": \"42.7%\"}",
"hints": [],
"solution": null,
"status": null,
"sampleTestCase": "{\"headers\":{\"Salary\":[\"id\",\"employee_id\",\"amount\",\"pay_date\"],\"Employee\":[\"employee_id\",\"department_id\"]},\"rows\":{\"Salary\":[[1,1,9000,\"2017/03/31\"],[2,2,6000,\"2017/03/31\"],[3,3,10000,\"2017/03/31\"],[4,1,7000,\"2017/02/28\"],[5,2,6000,\"2017/02/28\"],[6,3,8000,\"2017/02/28\"]],\"Employee\":[[1,1],[2,2],[3,2]]}}",
"metaData": "{\n \"mysql\": [\n \"Create table If Not Exists Salary (id int, employee_id int, amount int, pay_date date)\",\n \"Create table If Not Exists Employee (employee_id int, department_id int)\"\n ],\n \"mssql\": [\n \"Create table Salary (id int, employee_id int, amount int, pay_date date)\",\n \"Create table Employee (employee_id int, department_id int)\"\n ],\n \"oraclesql\": [\n \"Create table Salary (id int, employee_id int, amount int, pay_date date)\",\n \"Create table Employee (employee_id int, department_id int)\",\n \"alter SESSION set NLS_DATE_FORMAT = 'YYYY/MM/DD'\"\n ],\n \"database\": true\n}",
"judgerAvailable": true,
"judgeType": "large",
"mysqlSchemas": [
"Create table If Not Exists Salary (id int, employee_id int, amount int, pay_date date)",
"Create table If Not Exists Employee (employee_id int, department_id int)",
"Truncate table Salary",
"insert into Salary (id, employee_id, amount, pay_date) values ('1', '1', '9000', '2017/03/31')",
"insert into Salary (id, employee_id, amount, pay_date) values ('2', '2', '6000', '2017/03/31')",
"insert into Salary (id, employee_id, amount, pay_date) values ('3', '3', '10000', '2017/03/31')",
"insert into Salary (id, employee_id, amount, pay_date) values ('4', '1', '7000', '2017/02/28')",
"insert into Salary (id, employee_id, amount, pay_date) values ('5', '2', '6000', '2017/02/28')",
"insert into Salary (id, employee_id, amount, pay_date) values ('6', '3', '8000', '2017/02/28')",
"Truncate table Employee",
"insert into Employee (employee_id, department_id) values ('1', '1')",
"insert into Employee (employee_id, department_id) values ('2', '2')",
"insert into Employee (employee_id, department_id) values ('3', '2')"
],
"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>\"]}",
"book": null,
"isSubscribed": false,
"isDailyQuestion": false,
"dailyRecordStatus": null,
"editorType": "CKEDITOR",
"ugcQuestionId": null,
"style": "LEETCODE",
"exampleTestcases": "{\"headers\":{\"Salary\":[\"id\",\"employee_id\",\"amount\",\"pay_date\"],\"Employee\":[\"employee_id\",\"department_id\"]},\"rows\":{\"Salary\":[[1,1,9000,\"2017/03/31\"],[2,2,6000,\"2017/03/31\"],[3,3,10000,\"2017/03/31\"],[4,1,7000,\"2017/02/28\"],[5,2,6000,\"2017/02/28\"],[6,3,8000,\"2017/02/28\"]],\"Employee\":[[1,1],[2,2],[3,2]]}}",
"__typename": "QuestionNode"
}
}
}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,64 @@
{
"data": {
"question": {
"questionId": "619",
"questionFrontendId": "619",
"categoryTitle": "Database",
"boundTopicId": 2630,
"title": "Biggest Single Number",
"titleSlug": "biggest-single-number",
"content": null,
"translatedTitle": "只出现一次的最大数字",
"translatedContent": null,
"isPaidOnly": true,
"difficulty": "Easy",
"likes": 35,
"dislikes": 0,
"isLiked": null,
"similarQuestions": "[]",
"contributors": [],
"langToValidPlayground": null,
"topicTags": [
{
"name": "Database",
"slug": "database",
"translatedName": "数据库",
"__typename": "TopicTagNode"
}
],
"companyTagStats": null,
"codeSnippets": null,
"stats": "{\"totalAccepted\": \"15K\", \"totalSubmission\": \"32.3K\", \"totalAcceptedRaw\": 14979, \"totalSubmissionRaw\": 32278, \"acRate\": \"46.4%\"}",
"hints": [],
"solution": null,
"status": null,
"sampleTestCase": "{\"headers\": {\"MyNumbers\": [\"num\"]}, \"rows\": {\"MyNumbers\": [[8],[8],[3],[3],[1],[4],[5],[6]]}}",
"metaData": "{\n \"mysql\": [\n \"Create table If Not Exists MyNumbers (num int)\"\n ],\n \"mssql\": [\n \"Create table MyNumbers (num int)\"\n ],\n \"oraclesql\": [\n \"Create table MyNumbers (num int)\"\n ],\n \"database\": true\n}",
"judgerAvailable": true,
"judgeType": "large",
"mysqlSchemas": [
"Create table If Not Exists MyNumbers (num int)",
"Truncate table MyNumbers",
"insert into MyNumbers (num) values ('8')",
"insert into MyNumbers (num) values ('8')",
"insert into MyNumbers (num) values ('3')",
"insert into MyNumbers (num) values ('3')",
"insert into MyNumbers (num) values ('1')",
"insert into MyNumbers (num) values ('4')",
"insert into MyNumbers (num) values ('5')",
"insert into MyNumbers (num) values ('6')"
],
"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>\"]}",
"book": null,
"isSubscribed": false,
"isDailyQuestion": false,
"dailyRecordStatus": null,
"editorType": "CKEDITOR",
"ugcQuestionId": null,
"style": "LEETCODE",
"exampleTestcases": "{\"headers\": {\"MyNumbers\": [\"num\"]}, \"rows\": {\"MyNumbers\": [[8],[8],[3],[3],[1],[4],[5],[6]]}}\n{\"headers\": {\"MyNumbers\": [\"num\"]}, \"rows\": {\"MyNumbers\": [[8],[8],[7],[7],[3],[3],[3]]}}",
"__typename": "QuestionNode"
}
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,61 @@
{
"data": {
"question": {
"questionId": "603",
"questionFrontendId": "603",
"categoryTitle": "Database",
"boundTopicId": 2639,
"title": "Consecutive Available Seats",
"titleSlug": "consecutive-available-seats",
"content": null,
"translatedTitle": "连续空余座位",
"translatedContent": null,
"isPaidOnly": true,
"difficulty": "Easy",
"likes": 91,
"dislikes": 0,
"isLiked": null,
"similarQuestions": "[]",
"contributors": [],
"langToValidPlayground": null,
"topicTags": [
{
"name": "Database",
"slug": "database",
"translatedName": "数据库",
"__typename": "TopicTagNode"
}
],
"companyTagStats": null,
"codeSnippets": null,
"stats": "{\"totalAccepted\": \"16.9K\", \"totalSubmission\": \"25.7K\", \"totalAcceptedRaw\": 16950, \"totalSubmissionRaw\": 25680, \"acRate\": \"66.0%\"}",
"hints": [],
"solution": null,
"status": null,
"sampleTestCase": "{\"headers\":{\"Cinema\":[\"seat_id\",\"free\"]},\"rows\":{\"Cinema\":[[1,1],[2,0],[3,1],[4,1],[5,1]]}}",
"metaData": "{\n \"mysql\": [\n \"Create table If Not Exists Cinema (seat_id int primary key auto_increment, free bool)\"\n ],\n \"mssql\": [\n \"Create table Cinema (seat_id int primary key, free BIT)\"\n ],\n \"oraclesql\": [\n \"Create table Cinema (seat_id int primary key, free NUMBER(1))\"\n ],\n \"database\": true\n}",
"judgerAvailable": true,
"judgeType": "large",
"mysqlSchemas": [
"Create table If Not Exists Cinema (seat_id int primary key auto_increment, free bool)",
"Truncate table Cinema",
"insert into Cinema (seat_id, free) values ('1', '1')",
"insert into Cinema (seat_id, free) values ('2', '0')",
"insert into Cinema (seat_id, free) values ('3', '1')",
"insert into Cinema (seat_id, free) values ('4', '1')",
"insert into Cinema (seat_id, free) values ('5', '1')"
],
"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>\"]}",
"book": null,
"isSubscribed": false,
"isDailyQuestion": false,
"dailyRecordStatus": null,
"editorType": "CKEDITOR",
"ugcQuestionId": null,
"style": "LEETCODE",
"exampleTestcases": "{\"headers\":{\"Cinema\":[\"seat_id\",\"free\"]},\"rows\":{\"Cinema\":[[1,1],[2,0],[3,1],[4,1],[5,1]]}}",
"__typename": "QuestionNode"
}
}
}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,67 @@
{
"data": {
"question": {
"questionId": "580",
"questionFrontendId": "580",
"categoryTitle": "Database",
"boundTopicId": 2646,
"title": "Count Student Number in Departments",
"titleSlug": "count-student-number-in-departments",
"content": null,
"translatedTitle": "统计各专业学生人数",
"translatedContent": null,
"isPaidOnly": true,
"difficulty": "Medium",
"likes": 42,
"dislikes": 0,
"isLiked": null,
"similarQuestions": "[]",
"contributors": [],
"langToValidPlayground": null,
"topicTags": [
{
"name": "Database",
"slug": "database",
"translatedName": "数据库",
"__typename": "TopicTagNode"
}
],
"companyTagStats": null,
"codeSnippets": null,
"stats": "{\"totalAccepted\": \"14K\", \"totalSubmission\": \"26.6K\", \"totalAcceptedRaw\": 14019, \"totalSubmissionRaw\": 26627, \"acRate\": \"52.6%\"}",
"hints": [
"Still remember the difference between 'INNER JOIN' and 'OUTTER JOIN' in SQL?",
"Do you know other expressions using the 'COUNT' function besides 'COUNT(*)'?"
],
"solution": null,
"status": null,
"sampleTestCase": "{\"headers\":{\"Student\":[\"student_id\",\"student_name\",\"gender\",\"dept_id\"],\"Department\":[\"dept_id\",\"dept_name\"]},\"rows\":{\"Student\":[[1,\"Jack\",\"M\",1],[2,\"Jane\",\"F\",1],[3,\"Mark\",\"M\",2]],\"Department\":[[1,\"Engineering\"],[2,\"Science\"],[3,\"Law\"]]}}",
"metaData": "{\n \"mysql\": [\n \"Create table If Not Exists Student (student_id int,student_name varchar(45), gender varchar(6), dept_id int)\",\n \"Create table If Not Exists Department (dept_id int, dept_name varchar(255))\"\n ],\n \"mssql\": [\n \"Create table Student (student_id int,student_name varchar(45), gender varchar(6), dept_id int)\",\n \"Create table Department (dept_id int, dept_name varchar(255))\"\n ],\n \"oraclesql\": [\n \"Create table Student (student_id int,student_name varchar(45), gender varchar(6), dept_id int)\",\n \"Create table Department (dept_id int, dept_name varchar(255))\"\n ],\n \"database\": true\n}",
"judgerAvailable": true,
"judgeType": "large",
"mysqlSchemas": [
"Create table If Not Exists Student (student_id int,student_name varchar(45), gender varchar(6), dept_id int)",
"Create table If Not Exists Department (dept_id int, dept_name varchar(255))",
"Truncate table Student",
"insert into Student (student_id, student_name, gender, dept_id) values ('1', 'Jack', 'M', '1')",
"insert into Student (student_id, student_name, gender, dept_id) values ('2', 'Jane', 'F', '1')",
"insert into Student (student_id, student_name, gender, dept_id) values ('3', 'Mark', 'M', '2')",
"Truncate table Department",
"insert into Department (dept_id, dept_name) values ('1', 'Engineering')",
"insert into Department (dept_id, dept_name) values ('2', 'Science')",
"insert into Department (dept_id, dept_name) values ('3', 'Law')"
],
"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>\"]}",
"book": null,
"isSubscribed": false,
"isDailyQuestion": false,
"dailyRecordStatus": null,
"editorType": "CKEDITOR",
"ugcQuestionId": null,
"style": "LEETCODE",
"exampleTestcases": "{\"headers\":{\"Student\":[\"student_id\",\"student_name\",\"gender\",\"dept_id\"],\"Department\":[\"dept_id\",\"dept_name\"]},\"rows\":{\"Student\":[[1,\"Jack\",\"M\",1],[2,\"Jane\",\"F\",1],[3,\"Mark\",\"M\",2]],\"Department\":[[1,\"Engineering\"],[2,\"Science\"],[3,\"Law\"]]}}",
"__typename": "QuestionNode"
}
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,67 @@
{
"data": {
"question": {
"questionId": "577",
"questionFrontendId": "577",
"categoryTitle": "Database",
"boundTopicId": 1998,
"title": "Employee Bonus",
"titleSlug": "employee-bonus",
"content": null,
"translatedTitle": "员工奖金",
"translatedContent": null,
"isPaidOnly": true,
"difficulty": "Easy",
"likes": 28,
"dislikes": 0,
"isLiked": null,
"similarQuestions": "[{\"title\": \"Combine Two Tables\", \"titleSlug\": \"combine-two-tables\", \"difficulty\": \"Easy\", \"translatedTitle\": \"\\u7ec4\\u5408\\u4e24\\u4e2a\\u8868\"}]",
"contributors": [],
"langToValidPlayground": null,
"topicTags": [
{
"name": "Database",
"slug": "database",
"translatedName": "数据库",
"__typename": "TopicTagNode"
}
],
"companyTagStats": null,
"codeSnippets": null,
"stats": "{\"totalAccepted\": \"20.9K\", \"totalSubmission\": \"30.1K\", \"totalAcceptedRaw\": 20897, \"totalSubmissionRaw\": 30081, \"acRate\": \"69.5%\"}",
"hints": [
"If the EmpId in table Employee has no match in table Bonus, we consider that the corresponding bonus is null and null is smaller than 1000.",
"Inner join is the default join, we can solve the mismatching problem by using outer join."
],
"solution": null,
"status": null,
"sampleTestCase": "{\"headers\":{\"Employee\":[\"empId\",\"name\",\"supervisor\",\"salary\"],\"Bonus\":[\"empId\",\"bonus\"]},\"rows\":{\"Employee\":[[3,\"Brad\",null,4000],[1,\"John\",3,1000],[2,\"Dan\",3,2000],[4,\"Thomas\",3,4000]],\"Bonus\":[[2,500],[4,2000]]}}",
"metaData": "{\n \"mysql\": [\n \"Create table If Not Exists Employee (empId int, name varchar(255), supervisor int, salary int)\",\n \"Create table If Not Exists Bonus (empId int, bonus int)\"\n ],\n \"mssql\": [\n \"Create table Employee (empId int, name varchar(255), supervisor int, salary int)\",\n \"Create table Bonus (empId int, bonus int)\"\n ],\n \"oraclesql\": [\n \"Create table Employee (empId int, name varchar(255), supervisor int, salary int)\",\n \"Create table Bonus (empId int, bonus int)\"\n ],\n \"database\": true\n}",
"judgerAvailable": true,
"judgeType": "large",
"mysqlSchemas": [
"Create table If Not Exists Employee (empId int, name varchar(255), supervisor int, salary int)",
"Create table If Not Exists Bonus (empId int, bonus int)",
"Truncate table Employee",
"insert into Employee (empId, name, supervisor, salary) values ('3', 'Brad', 'None', '4000')",
"insert into Employee (empId, name, supervisor, salary) values ('1', 'John', '3', '1000')",
"insert into Employee (empId, name, supervisor, salary) values ('2', 'Dan', '3', '2000')",
"insert into Employee (empId, name, supervisor, salary) values ('4', 'Thomas', '3', '4000')",
"Truncate table Bonus",
"insert into Bonus (empId, bonus) values ('2', '500')",
"insert into Bonus (empId, bonus) values ('4', '2000')"
],
"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>\"]}",
"book": null,
"isSubscribed": false,
"isDailyQuestion": false,
"dailyRecordStatus": null,
"editorType": "CKEDITOR",
"ugcQuestionId": null,
"style": "LEETCODE",
"exampleTestcases": "{\"headers\":{\"Employee\":[\"empId\",\"name\",\"supervisor\",\"salary\"],\"Bonus\":[\"empId\",\"bonus\"]},\"rows\":{\"Employee\":[[3,\"Brad\",null,4000],[1,\"John\",3,1000],[2,\"Dan\",3,2000],[4,\"Thomas\",3,4000]],\"Bonus\":[[2,500],[4,2000]]}}",
"__typename": "QuestionNode"
}
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,71 @@
{
"data": {
"question": {
"questionId": "579",
"questionFrontendId": "579",
"categoryTitle": "Database",
"boundTopicId": 2647,
"title": "Find Cumulative Salary of an Employee",
"titleSlug": "find-cumulative-salary-of-an-employee",
"content": null,
"translatedTitle": "查询员工的累计薪水",
"translatedContent": null,
"isPaidOnly": true,
"difficulty": "Hard",
"likes": 75,
"dislikes": 0,
"isLiked": null,
"similarQuestions": "[]",
"contributors": [],
"langToValidPlayground": null,
"topicTags": [
{
"name": "Database",
"slug": "database",
"translatedName": "数据库",
"__typename": "TopicTagNode"
}
],
"companyTagStats": null,
"codeSnippets": null,
"stats": "{\"totalAccepted\": \"10K\", \"totalSubmission\": \"24.1K\", \"totalAcceptedRaw\": 10049, \"totalSubmissionRaw\": 24089, \"acRate\": \"41.7%\"}",
"hints": [
"Seem hard at first glance? Try to divide this problem into some sub-problems. \r\nThink about how to calculate the cumulative sum of one employee, how to get the cumulative sum for many employees, and how to except the most recent month of the result.",
"Use the technique of self-join if you have only one table but to write a complex query.",
"Still remember how to use the function `sum` and `max`?"
],
"solution": null,
"status": null,
"sampleTestCase": "{\"headers\":{\"Employee\":[\"id\",\"month\",\"salary\"]},\"rows\":{\"Employee\":[[1,1,20],[2,1,20],[1,2,30],[2,2,30],[3,2,40],[1,3,40],[3,3,60],[1,4,60],[3,4,70],[1,7,90],[1,8,90]]}}",
"metaData": "{\n \"mysql\": [\n \"Create table If Not Exists Employee (id int, month int, salary int)\"\n ],\n \"mssql\": [\n \"Create table Employee (id int, month int, salary int)\"\n ],\n \"oraclesql\": [\n \"Create table Employee (id int, month int, salary int)\"\n ],\n \"database\": true\n}",
"judgerAvailable": true,
"judgeType": "large",
"mysqlSchemas": [
"Create table If Not Exists Employee (id int, month int, salary int)",
"Truncate table Employee",
"insert into Employee (id, month, salary) values ('1', '1', '20')",
"insert into Employee (id, month, salary) values ('2', '1', '20')",
"insert into Employee (id, month, salary) values ('1', '2', '30')",
"insert into Employee (id, month, salary) values ('2', '2', '30')",
"insert into Employee (id, month, salary) values ('3', '2', '40')",
"insert into Employee (id, month, salary) values ('1', '3', '40')",
"insert into Employee (id, month, salary) values ('3', '3', '60')",
"insert into Employee (id, month, salary) values ('1', '4', '60')",
"insert into Employee (id, month, salary) values ('3', '4', '70')",
"insert into Employee (id, month, salary) values ('1', '7', '90')",
"insert into Employee (id, month, salary) values ('1', '8', '90')"
],
"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>\"]}",
"book": null,
"isSubscribed": false,
"isDailyQuestion": false,
"dailyRecordStatus": null,
"editorType": "CKEDITOR",
"ugcQuestionId": null,
"style": "LEETCODE",
"exampleTestcases": "{\"headers\":{\"Employee\":[\"id\",\"month\",\"salary\"]},\"rows\":{\"Employee\":[[1,1,20],[2,1,20],[1,2,30],[2,2,30],[3,2,40],[1,3,40],[3,3,60],[1,4,60],[3,4,70],[1,7,90],[1,8,90]]}}",
"__typename": "QuestionNode"
}
}
}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,60 @@
{
"data": {
"question": {
"questionId": "571",
"questionFrontendId": "571",
"categoryTitle": "Database",
"boundTopicId": 2651,
"title": "Find Median Given Frequency of Numbers",
"titleSlug": "find-median-given-frequency-of-numbers",
"content": null,
"translatedTitle": "给定数字的频率查询中位数",
"translatedContent": null,
"isPaidOnly": true,
"difficulty": "Hard",
"likes": 72,
"dislikes": 0,
"isLiked": null,
"similarQuestions": "[{\"title\": \"Median Employee Salary\", \"titleSlug\": \"median-employee-salary\", \"difficulty\": \"Hard\", \"translatedTitle\": \"\\u5458\\u5de5\\u85aa\\u6c34\\u4e2d\\u4f4d\\u6570\"}]",
"contributors": [],
"langToValidPlayground": null,
"topicTags": [
{
"name": "Database",
"slug": "database",
"translatedName": "数据库",
"__typename": "TopicTagNode"
}
],
"companyTagStats": null,
"codeSnippets": null,
"stats": "{\"totalAccepted\": \"8.8K\", \"totalSubmission\": \"18.5K\", \"totalAcceptedRaw\": 8814, \"totalSubmissionRaw\": 18489, \"acRate\": \"47.7%\"}",
"hints": [],
"solution": null,
"status": null,
"sampleTestCase": "{\"headers\": {\"Numbers\": [\"num\", \"frequency\"]}, \"rows\": {\"Numbers\": [[0, 7], [1, 1], [2, 3], [3, 1]]}}",
"metaData": "{\n \"mysql\": [\n \"Create table If Not Exists Numbers (num int, frequency int)\"\n ],\n \"mssql\": [\n \"Create table Numbers (num int, frequency int)\"\n ],\n \"oraclesql\": [\n \"Create table Numbers (num int, frequency int)\"\n ],\n \"database\": true\n}",
"judgerAvailable": true,
"judgeType": "large",
"mysqlSchemas": [
"Create table If Not Exists Numbers (num int, frequency int)",
"Truncate table Numbers",
"insert into Numbers (num, frequency) values ('0', '7')",
"insert into Numbers (num, frequency) values ('1', '1')",
"insert into Numbers (num, frequency) values ('2', '3')",
"insert into Numbers (num, frequency) values ('3', '1')"
],
"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>\"]}",
"book": null,
"isSubscribed": false,
"isDailyQuestion": false,
"dailyRecordStatus": null,
"editorType": "CKEDITOR",
"ugcQuestionId": null,
"style": "LEETCODE",
"exampleTestcases": "{\"headers\": {\"Numbers\": [\"num\", \"frequency\"]}, \"rows\": {\"Numbers\": [[0, 7], [1, 1], [2, 3], [3, 1]]}}",
"__typename": "QuestionNode"
}
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,71 @@
{
"data": {
"question": {
"questionId": "597",
"questionFrontendId": "597",
"categoryTitle": "Database",
"boundTopicId": 2641,
"title": "Friend Requests I: Overall Acceptance Rate",
"titleSlug": "friend-requests-i-overall-acceptance-rate",
"content": null,
"translatedTitle": "好友申请 I总体通过率",
"translatedContent": null,
"isPaidOnly": true,
"difficulty": "Easy",
"likes": 70,
"dislikes": 0,
"isLiked": null,
"similarQuestions": "[]",
"contributors": [],
"langToValidPlayground": null,
"topicTags": [
{
"name": "Database",
"slug": "database",
"translatedName": "数据库",
"__typename": "TopicTagNode"
}
],
"companyTagStats": null,
"codeSnippets": null,
"stats": "{\"totalAccepted\": \"13.5K\", \"totalSubmission\": \"30.5K\", \"totalAcceptedRaw\": 13504, \"totalSubmissionRaw\": 30486, \"acRate\": \"44.3%\"}",
"hints": [
"Still remember how to count the number of rows in a table?",
"What is the keyword to filter the duplicated records in a table?"
],
"solution": null,
"status": null,
"sampleTestCase": "{\"headers\":{\"FriendRequest\":[\"sender_id\",\"send_to_id\",\"request_date\"],\"RequestAccepted\":[\"requester_id\",\"accepter_id\",\"accept_date\"]},\"rows\":{\"FriendRequest\":[[1,2,\"2016/06/01\"],[1,3,\"2016/06/01\"],[1,4,\"2016/06/01\"],[2,3,\"2016/06/02\"],[3,4,\"2016/06/09\"]],\"RequestAccepted\":[[1,2,\"2016/06/03\"],[1,3,\"2016/06/08\"],[2,3,\"2016/06/08\"],[3,4,\"2016/06/09\"],[3,4,\"2016/06/10\"]]}}",
"metaData": "{\n \"mysql\": [\n \"Create table If Not Exists FriendRequest (sender_id int, send_to_id int, request_date date)\",\n \"Create table If Not Exists RequestAccepted (requester_id int, accepter_id int, accept_date date)\"\n ],\n \"mssql\": [\n \"Create table FriendRequest (sender_id int, send_to_id int, request_date date)\",\n \"Create table RequestAccepted (requester_id int, accepter_id int, accept_date date)\"\n ],\n \"oraclesql\": [\n \"Create table FriendRequest (sender_id int, send_to_id int, request_date date)\",\n \"Create table RequestAccepted (requester_id int, accepter_id int, accept_date date)\",\n \"Alter SESSION set NLS_DATE_FORMAT = 'YYYY/MM/DD'\"\n ],\n \"database\": true\n}",
"judgerAvailable": true,
"judgeType": "large",
"mysqlSchemas": [
"Create table If Not Exists FriendRequest (sender_id int, send_to_id int, request_date date)",
"Create table If Not Exists RequestAccepted (requester_id int, accepter_id int, accept_date date)",
"Truncate table FriendRequest",
"insert into FriendRequest (sender_id, send_to_id, request_date) values ('1', '2', '2016/06/01')",
"insert into FriendRequest (sender_id, send_to_id, request_date) values ('1', '3', '2016/06/01')",
"insert into FriendRequest (sender_id, send_to_id, request_date) values ('1', '4', '2016/06/01')",
"insert into FriendRequest (sender_id, send_to_id, request_date) values ('2', '3', '2016/06/02')",
"insert into FriendRequest (sender_id, send_to_id, request_date) values ('3', '4', '2016/06/09')",
"Truncate table RequestAccepted",
"insert into RequestAccepted (requester_id, accepter_id, accept_date) values ('1', '2', '2016/06/03')",
"insert into RequestAccepted (requester_id, accepter_id, accept_date) values ('1', '3', '2016/06/08')",
"insert into RequestAccepted (requester_id, accepter_id, accept_date) values ('2', '3', '2016/06/08')",
"insert into RequestAccepted (requester_id, accepter_id, accept_date) values ('3', '4', '2016/06/09')",
"insert into RequestAccepted (requester_id, accepter_id, accept_date) values ('3', '4', '2016/06/10')"
],
"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>\"]}",
"book": null,
"isSubscribed": false,
"isDailyQuestion": false,
"dailyRecordStatus": null,
"editorType": "CKEDITOR",
"ugcQuestionId": null,
"style": "LEETCODE",
"exampleTestcases": "{\"headers\":{\"FriendRequest\":[\"sender_id\",\"send_to_id\",\"request_date\"],\"RequestAccepted\":[\"requester_id\",\"accepter_id\",\"accept_date\"]},\"rows\":{\"FriendRequest\":[[1,2,\"2016/06/01\"],[1,3,\"2016/06/01\"],[1,4,\"2016/06/01\"],[2,3,\"2016/06/02\"],[3,4,\"2016/06/09\"]],\"RequestAccepted\":[[1,2,\"2016/06/03\"],[1,3,\"2016/06/08\"],[2,3,\"2016/06/08\"],[3,4,\"2016/06/09\"],[3,4,\"2016/06/10\"]]}}",
"__typename": "QuestionNode"
}
}
}

View File

@ -0,0 +1,62 @@
{
"data": {
"question": {
"questionId": "602",
"questionFrontendId": "602",
"categoryTitle": "Database",
"boundTopicId": 2640,
"title": "Friend Requests II: Who Has the Most Friends",
"titleSlug": "friend-requests-ii-who-has-the-most-friends",
"content": null,
"translatedTitle": "好友申请 II :谁有最多的好友",
"translatedContent": null,
"isPaidOnly": true,
"difficulty": "Medium",
"likes": 50,
"dislikes": 0,
"isLiked": null,
"similarQuestions": "[]",
"contributors": [],
"langToValidPlayground": null,
"topicTags": [
{
"name": "Database",
"slug": "database",
"translatedName": "数据库",
"__typename": "TopicTagNode"
}
],
"companyTagStats": null,
"codeSnippets": null,
"stats": "{\"totalAccepted\": \"10.8K\", \"totalSubmission\": \"17.4K\", \"totalAcceptedRaw\": 10763, \"totalSubmissionRaw\": 17357, \"acRate\": \"62.0%\"}",
"hints": [
"Being friends is bidirectional. If you accept someone's adding friend request, both you and the other person will have one more friend."
],
"solution": null,
"status": null,
"sampleTestCase": "{\"headers\":{\"RequestAccepted\":[\"requester_id\",\"accepter_id\",\"accept_date\"]},\"rows\":{\"RequestAccepted\":[[1,2,\"2016/06/03\"],[1,3,\"2016/06/08\"],[2,3,\"2016/06/08\"],[3,4,\"2016/06/09\"]]}}",
"metaData": "{\n \"mysql\": [\n \"Create table If Not Exists RequestAccepted (requester_id int not null, accepter_id int null, accept_date date null)\"\n ],\n \"mssql\": [\n \"Create table RequestAccepted (requester_id int not null, accepter_id int null, accept_date date null)\"\n ],\n \"oraclesql\": [\n \"Create table RequestAccepted (requester_id int not null, accepter_id int null, accept_date date null)\",\n \"Alter SESSION set NLS_DATE_FORMAT = 'YYYY/MM/DD'\"\n ],\n \"database\": true\n}",
"judgerAvailable": true,
"judgeType": "large",
"mysqlSchemas": [
"Create table If Not Exists RequestAccepted (requester_id int not null, accepter_id int null, accept_date date null)",
"Truncate table RequestAccepted",
"insert into RequestAccepted (requester_id, accepter_id, accept_date) values ('1', '2', '2016/06/03')",
"insert into RequestAccepted (requester_id, accepter_id, accept_date) values ('1', '3', '2016/06/08')",
"insert into RequestAccepted (requester_id, accepter_id, accept_date) values ('2', '3', '2016/06/08')",
"insert into RequestAccepted (requester_id, accepter_id, accept_date) values ('3', '4', '2016/06/09')"
],
"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>\"]}",
"book": null,
"isSubscribed": false,
"isDailyQuestion": false,
"dailyRecordStatus": null,
"editorType": "CKEDITOR",
"ugcQuestionId": null,
"style": "LEETCODE",
"exampleTestcases": "{\"headers\":{\"RequestAccepted\":[\"requester_id\",\"accepter_id\",\"accept_date\"]},\"rows\":{\"RequestAccepted\":[[1,2,\"2016/06/03\"],[1,3,\"2016/06/08\"],[2,3,\"2016/06/08\"],[3,4,\"2016/06/09\"]]}}",
"__typename": "QuestionNode"
}
}
}

View File

@ -0,0 +1,64 @@
{
"data": {
"question": {
"questionId": "578",
"questionFrontendId": "578",
"categoryTitle": "Database",
"boundTopicId": 2648,
"title": "Get Highest Answer Rate Question",
"titleSlug": "get-highest-answer-rate-question",
"content": null,
"translatedTitle": "查询回答率最高的问题",
"translatedContent": null,
"isPaidOnly": true,
"difficulty": "Medium",
"likes": 24,
"dislikes": 0,
"isLiked": null,
"similarQuestions": "[]",
"contributors": [],
"langToValidPlayground": null,
"topicTags": [
{
"name": "Database",
"slug": "database",
"translatedName": "数据库",
"__typename": "TopicTagNode"
}
],
"companyTagStats": null,
"codeSnippets": null,
"stats": "{\"totalAccepted\": \"13.4K\", \"totalSubmission\": \"27.9K\", \"totalAcceptedRaw\": 13430, \"totalSubmissionRaw\": 27889, \"acRate\": \"48.2%\"}",
"hints": [
"Try to find all question ids by group",
"Try to find each group answer number and show number.",
"Rank all the rates (answer/(answer+show)) and return the max one"
],
"solution": null,
"status": null,
"sampleTestCase": "{\"headers\": {\"SurveyLog\": [\"id\", \"action\", \"question_id\", \"answer_id\", \"q_num\", \"timestamp\"]},\"rows\": {\"SurveyLog\": [[5, \"show\", 285, null, 1, 123], [5, \"answer\", 285, 124124, 1, 124], [5, \"show\", 369, null, 2, 125], [5, \"skip\", 369, null, 2, 126]]}}",
"metaData": "{\n \"mysql\": [\n \"Create table If Not Exists SurveyLog (id int, action varchar(255), question_id int, answer_id int, q_num int, timestamp int)\"\n ],\n \"mssql\": [\n \"Create table SurveyLog (id int, action varchar(255), question_id int, answer_id int, q_num int, timestamp int)\"\n ],\n \"oraclesql\": [\n \"Create table SurveyLog (id int, action varchar(255), question_id int, answer_id int, q_num int, timestamp int)\"\n ],\n \"database\": true\n}",
"judgerAvailable": true,
"judgeType": "large",
"mysqlSchemas": [
"Create table If Not Exists SurveyLog (id int, action varchar(255), question_id int, answer_id int, q_num int, timestamp int)",
"Truncate table SurveyLog",
"insert into SurveyLog (id, action, question_id, answer_id, q_num, timestamp) values ('5', 'show', '285', 'None', '1', '123')",
"insert into SurveyLog (id, action, question_id, answer_id, q_num, timestamp) values ('5', 'answer', '285', '124124', '1', '124')",
"insert into SurveyLog (id, action, question_id, answer_id, q_num, timestamp) values ('5', 'show', '369', 'None', '2', '125')",
"insert into SurveyLog (id, action, question_id, answer_id, q_num, timestamp) values ('5', 'skip', '369', 'None', '2', '126')"
],
"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>\"]}",
"book": null,
"isSubscribed": false,
"isDailyQuestion": false,
"dailyRecordStatus": null,
"editorType": "CKEDITOR",
"ugcQuestionId": null,
"style": "LEETCODE",
"exampleTestcases": "{\"headers\": {\"SurveyLog\": [\"id\", \"action\", \"question_id\", \"answer_id\", \"q_num\", \"timestamp\"]},\"rows\": {\"SurveyLog\": [[5, \"show\", 285, null, 1, 123], [5, \"answer\", 285, 124124, 1, 124], [5, \"show\", 369, null, 2, 125], [5, \"skip\", 369, null, 2, 126]]}}",
"__typename": "QuestionNode"
}
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,62 @@
{
"data": {
"question": {
"questionId": "585",
"questionFrontendId": "585",
"categoryTitle": "Database",
"boundTopicId": 2643,
"title": "Investments in 2016",
"titleSlug": "investments-in-2016",
"content": null,
"translatedTitle": "2016年的投资",
"translatedContent": null,
"isPaidOnly": true,
"difficulty": "Medium",
"likes": 51,
"dislikes": 0,
"isLiked": null,
"similarQuestions": "[]",
"contributors": [],
"langToValidPlayground": null,
"topicTags": [
{
"name": "Database",
"slug": "database",
"translatedName": "数据库",
"__typename": "TopicTagNode"
}
],
"companyTagStats": null,
"codeSnippets": null,
"stats": "{\"totalAccepted\": \"11.1K\", \"totalSubmission\": \"20.3K\", \"totalAcceptedRaw\": 11100, \"totalSubmissionRaw\": 20335, \"acRate\": \"54.6%\"}",
"hints": [
"Make the (LAT, LON) a pair to represent the location information"
],
"solution": null,
"status": null,
"sampleTestCase": "{\"headers\":{\"Insurance\":[\"pid\",\"tiv_2015\",\"tiv_2016\",\"lat\",\"lon\"]},\"rows\":{\"Insurance\":[[1,10,5,10,10],[2,20,20,20,20],[3,10,30,20,20],[4,10,40,40,40]]}}",
"metaData": "{\n \"mysql\": [\n \"Create Table If Not Exists Insurance (pid int, tiv_2015 float, tiv_2016 float, lat float, lon float)\"\n ],\n \"mssql\": [\n \"Create Table Insurance (pid int, tiv_2015 float, tiv_2016 float, lat float, lon float)\"\n ],\n \"oraclesql\": [\n \"Create Table Insurance (pid int, tiv_2015 float, tiv_2016 float, lat float, lon float)\"\n ],\n \"database\": true\n}",
"judgerAvailable": true,
"judgeType": "large",
"mysqlSchemas": [
"Create Table If Not Exists Insurance (pid int, tiv_2015 float, tiv_2016 float, lat float, lon float)",
"Truncate table Insurance",
"insert into Insurance (pid, tiv_2015, tiv_2016, lat, lon) values ('1', '10', '5', '10', '10')",
"insert into Insurance (pid, tiv_2015, tiv_2016, lat, lon) values ('2', '20', '20', '20', '20')",
"insert into Insurance (pid, tiv_2015, tiv_2016, lat, lon) values ('3', '10', '30', '20', '20')",
"insert into Insurance (pid, tiv_2015, tiv_2016, lat, lon) values ('4', '10', '40', '40', '40')"
],
"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>\"]}",
"book": null,
"isSubscribed": false,
"isDailyQuestion": false,
"dailyRecordStatus": null,
"editorType": "CKEDITOR",
"ugcQuestionId": null,
"style": "LEETCODE",
"exampleTestcases": "{\"headers\":{\"Insurance\":[\"pid\",\"tiv_2015\",\"tiv_2016\",\"lat\",\"lon\"]},\"rows\":{\"Insurance\":[[1,10,5,10,10],[2,20,20,20,20],[3,10,30,20,20],[4,10,40,40,40]]}}",
"__typename": "QuestionNode"
}
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,67 @@
{
"data": {
"question": {
"questionId": "570",
"questionFrontendId": "570",
"categoryTitle": "Database",
"boundTopicId": 2652,
"title": "Managers with at Least 5 Direct Reports",
"titleSlug": "managers-with-at-least-5-direct-reports",
"content": null,
"translatedTitle": "至少有5名直接下属的经理",
"translatedContent": null,
"isPaidOnly": true,
"difficulty": "Medium",
"likes": 33,
"dislikes": 0,
"isLiked": null,
"similarQuestions": "[]",
"contributors": [],
"langToValidPlayground": null,
"topicTags": [
{
"name": "Database",
"slug": "database",
"translatedName": "数据库",
"__typename": "TopicTagNode"
}
],
"companyTagStats": null,
"codeSnippets": null,
"stats": "{\"totalAccepted\": \"17.5K\", \"totalSubmission\": \"26.7K\", \"totalAcceptedRaw\": 17472, \"totalSubmissionRaw\": 26696, \"acRate\": \"65.4%\"}",
"hints": [
"Try to get all the mangerIDs that have count bigger than 5",
"Use the last hint's result as a table and do join with origin table at id equals to managerId",
"This is a very good example to show the performance of SQL code. Try to work out other solutions and you may be surprised by running time difference.",
"If your solution uses 'IN' function and runs more than 5 seconds, try to optimize it by using 'JOIN' instead."
],
"solution": null,
"status": null,
"sampleTestCase": "{\"headers\": {\"Employee\": [\"id\", \"name\", \"department\", \"managerId\"]}, \"rows\": {\"Employee\": [[101, \"John\", \"A\", null],[102, \"Dan\", \"A\", 101], [103, \"James\", \"A\", 101], [104, \"Amy\", \"A\", 101], [105, \"Anne\", \"A\", 101], [106, \"Ron\", \"B\", 101]]}}",
"metaData": "{\n \"mysql\": [\n \"Create table If Not Exists Employee (id int, name varchar(255), department varchar(255), managerId int)\"\n ],\n \"mssql\": [\n \"Create table Employee (id int, name varchar(255), department varchar(255), managerId int)\"\n ],\n \"oraclesql\": [\n \"Create table Employee (id int, name varchar(255), department varchar(255), managerId int)\"\n ],\n \"database\": true\n}",
"judgerAvailable": true,
"judgeType": "large",
"mysqlSchemas": [
"Create table If Not Exists Employee (id int, name varchar(255), department varchar(255), managerId int)",
"Truncate table Employee",
"insert into Employee (id, name, department, managerId) values ('101', 'John', 'A', 'None')",
"insert into Employee (id, name, department, managerId) values ('102', 'Dan', 'A', '101')",
"insert into Employee (id, name, department, managerId) values ('103', 'James', 'A', '101')",
"insert into Employee (id, name, department, managerId) values ('104', 'Amy', 'A', '101')",
"insert into Employee (id, name, department, managerId) values ('105', 'Anne', 'A', '101')",
"insert into Employee (id, name, department, managerId) values ('106', 'Ron', 'B', '101')"
],
"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>\"]}",
"book": null,
"isSubscribed": false,
"isDailyQuestion": false,
"dailyRecordStatus": null,
"editorType": "CKEDITOR",
"ugcQuestionId": null,
"style": "LEETCODE",
"exampleTestcases": "{\"headers\": {\"Employee\": [\"id\", \"name\", \"department\", \"managerId\"]}, \"rows\": {\"Employee\": [[101, \"John\", \"A\", null],[102, \"Dan\", \"A\", 101], [103, \"James\", \"A\", 101], [104, \"Amy\", \"A\", 101], [105, \"Anne\", \"A\", 101], [106, \"Ron\", \"B\", 101]]}}",
"__typename": "QuestionNode"
}
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,77 @@
{
"data": {
"question": {
"questionId": "569",
"questionFrontendId": "569",
"categoryTitle": "Database",
"boundTopicId": 2653,
"title": "Median Employee Salary",
"titleSlug": "median-employee-salary",
"content": null,
"translatedTitle": "员工薪水中位数",
"translatedContent": null,
"isPaidOnly": true,
"difficulty": "Hard",
"likes": 88,
"dislikes": 0,
"isLiked": null,
"similarQuestions": "[{\"title\": \"Find Median Given Frequency of Numbers\", \"titleSlug\": \"find-median-given-frequency-of-numbers\", \"difficulty\": \"Hard\", \"translatedTitle\": \"\\u7ed9\\u5b9a\\u6570\\u5b57\\u7684\\u9891\\u7387\\u67e5\\u8be2\\u4e2d\\u4f4d\\u6570\"}]",
"contributors": [],
"langToValidPlayground": null,
"topicTags": [
{
"name": "Database",
"slug": "database",
"translatedName": "数据库",
"__typename": "TopicTagNode"
}
],
"companyTagStats": null,
"codeSnippets": null,
"stats": "{\"totalAccepted\": \"13.1K\", \"totalSubmission\": \"23.2K\", \"totalAcceptedRaw\": 13112, \"totalSubmissionRaw\": 23159, \"acRate\": \"56.6%\"}",
"hints": [
"Still remember how to select the sum which group by one column?",
"Try to think about how to get the median from a sorted list.",
"How to get the median one item for odd number list while how to get the median two items for even number list, try to unify them."
],
"solution": null,
"status": null,
"sampleTestCase": "{\"headers\": {\"Employee\": [\"id\", \"company\", \"salary\"]}, \"rows\": {\"Employee\": [[1, \"A\", 2341],[2, \"A\", 341],[3, \"A\", 15],[4, \"A\", 15314],[5, \"A\", 451],[6, \"A\", 513],[7, \"B\", 15],[8, \"B\", 13],[9, \"B\", 1154],[10, \"B\", 1345],[11, \"B\", 1221],[12, \"B\", 234],[13, \"C\", 2345],[14, \"C\", 2645],[15, \"C\", 2645],[16, \"C\", 2652],[17, \"C\", 65]]}}",
"metaData": "{\n \"mysql\": [\n \"Create table If Not Exists Employee (id int, company varchar(255), salary int)\"\n ],\n \"mssql\": [\n \"Create table Employee (id int, company varchar(255), salary int)\"\n ],\n \"oraclesql\": [\n \"Create table Employee (id int, company varchar(255), salary int)\"\n ],\n \"database\": true\n}",
"judgerAvailable": true,
"judgeType": "large",
"mysqlSchemas": [
"Create table If Not Exists Employee (id int, company varchar(255), salary int)",
"Truncate table Employee",
"insert into Employee (id, company, salary) values ('1', 'A', '2341')",
"insert into Employee (id, company, salary) values ('2', 'A', '341')",
"insert into Employee (id, company, salary) values ('3', 'A', '15')",
"insert into Employee (id, company, salary) values ('4', 'A', '15314')",
"insert into Employee (id, company, salary) values ('5', 'A', '451')",
"insert into Employee (id, company, salary) values ('6', 'A', '513')",
"insert into Employee (id, company, salary) values ('7', 'B', '15')",
"insert into Employee (id, company, salary) values ('8', 'B', '13')",
"insert into Employee (id, company, salary) values ('9', 'B', '1154')",
"insert into Employee (id, company, salary) values ('10', 'B', '1345')",
"insert into Employee (id, company, salary) values ('11', 'B', '1221')",
"insert into Employee (id, company, salary) values ('12', 'B', '234')",
"insert into Employee (id, company, salary) values ('13', 'C', '2345')",
"insert into Employee (id, company, salary) values ('14', 'C', '2645')",
"insert into Employee (id, company, salary) values ('15', 'C', '2645')",
"insert into Employee (id, company, salary) values ('16', 'C', '2652')",
"insert into Employee (id, company, salary) values ('17', 'C', '65')"
],
"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>\"]}",
"book": null,
"isSubscribed": false,
"isDailyQuestion": false,
"dailyRecordStatus": null,
"editorType": "CKEDITOR",
"ugcQuestionId": null,
"style": "LEETCODE",
"exampleTestcases": "{\"headers\": {\"Employee\": [\"id\", \"company\", \"salary\"]}, \"rows\": {\"Employee\": [[1, \"A\", 2341],[2, \"A\", 341],[3, \"A\", 15],[4, \"A\", 15314],[5, \"A\", 451],[6, \"A\", 513],[7, \"B\", 15],[8, \"B\", 13],[9, \"B\", 1154],[10, \"B\", 1345],[11, \"B\", 1221],[12, \"B\", 234],[13, \"C\", 2345],[14, \"C\", 2645],[15, \"C\", 2645],[16, \"C\", 2652],[17, \"C\", 65]]}}",
"__typename": "QuestionNode"
}
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,60 @@
{
"data": {
"question": {
"questionId": "614",
"questionFrontendId": "614",
"categoryTitle": "Database",
"boundTopicId": 2633,
"title": "Second Degree Follower",
"titleSlug": "second-degree-follower",
"content": null,
"translatedTitle": "二级关注者",
"translatedContent": null,
"isPaidOnly": true,
"difficulty": "Medium",
"likes": 30,
"dislikes": 0,
"isLiked": null,
"similarQuestions": "[]",
"contributors": [],
"langToValidPlayground": null,
"topicTags": [
{
"name": "Database",
"slug": "database",
"translatedName": "数据库",
"__typename": "TopicTagNode"
}
],
"companyTagStats": null,
"codeSnippets": null,
"stats": "{\"totalAccepted\": \"11K\", \"totalSubmission\": \"30.6K\", \"totalAcceptedRaw\": 10999, \"totalSubmissionRaw\": 30577, \"acRate\": \"36.0%\"}",
"hints": [],
"solution": null,
"status": null,
"sampleTestCase": "{\"headers\":{\"Follow\":[\"followee\",\"follower\"]},\"rows\":{\"Follow\":[[\"Alice\", \"Bob\"], [\"Bob\", \"Cena\"], [\"Bob\", \"Donald\"], [\"Donald\", \"Edward\"]]}}",
"metaData": "{\n \"mysql\": [\n \"Create table If Not Exists Follow (followee varchar(255), follower varchar(255))\"\n ],\n \"mssql\": [\n \"Create table Follow (followee varchar(255), follower varchar(255))\"\n ],\n \"oraclesql\": [\n \"Create table Follow (followee varchar(255), follower varchar(255))\"\n ],\n \"database\": true\n}",
"judgerAvailable": true,
"judgeType": "large",
"mysqlSchemas": [
"Create table If Not Exists Follow (followee varchar(255), follower varchar(255))",
"Truncate table Follow",
"insert into Follow (followee, follower) values ('Alice', 'Bob')",
"insert into Follow (followee, follower) values ('Bob', 'Cena')",
"insert into Follow (followee, follower) values ('Bob', 'Donald')",
"insert into Follow (followee, follower) values ('Donald', 'Edward')"
],
"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>\"]}",
"book": null,
"isSubscribed": false,
"isDailyQuestion": false,
"dailyRecordStatus": null,
"editorType": "CKEDITOR",
"ugcQuestionId": null,
"style": "LEETCODE",
"exampleTestcases": "{\"headers\":{\"Follow\":[\"followee\",\"follower\"]},\"rows\":{\"Follow\":[[\"Alice\", \"Bob\"], [\"Bob\", \"Cena\"], [\"Bob\", \"Donald\"], [\"Donald\", \"Edward\"]]}}",
"__typename": "QuestionNode"
}
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,59 @@
{
"data": {
"question": {
"questionId": "613",
"questionFrontendId": "613",
"categoryTitle": "Database",
"boundTopicId": 2634,
"title": "Shortest Distance in a Line",
"titleSlug": "shortest-distance-in-a-line",
"content": null,
"translatedTitle": "直线上的最近距离",
"translatedContent": null,
"isPaidOnly": true,
"difficulty": "Easy",
"likes": 44,
"dislikes": 0,
"isLiked": null,
"similarQuestions": "[]",
"contributors": [],
"langToValidPlayground": null,
"topicTags": [
{
"name": "Database",
"slug": "database",
"translatedName": "数据库",
"__typename": "TopicTagNode"
}
],
"companyTagStats": null,
"codeSnippets": null,
"stats": "{\"totalAccepted\": \"14.8K\", \"totalSubmission\": \"18.2K\", \"totalAcceptedRaw\": 14817, \"totalSubmissionRaw\": 18206, \"acRate\": \"81.4%\"}",
"hints": [],
"solution": null,
"status": null,
"sampleTestCase": "{\"headers\":{\"Point\":[\"x\"]},\"rows\":{\"Point\":[[-1],[0],[2]]}}",
"metaData": "{\n \"mysql\": [\n \"Create Table If Not Exists Point (x int not null)\"\n ],\n \"mssql\": [\n \"Create Table Point (x int not null)\"\n ],\n \"oraclesql\": [\n \"Create Table Point (x int not null)\"\n ],\n \"database\": true\n}",
"judgerAvailable": true,
"judgeType": "large",
"mysqlSchemas": [
"Create Table If Not Exists Point (x int not null)",
"Truncate table Point",
"insert into Point (x) values ('-1')",
"insert into Point (x) values ('0')",
"insert into Point (x) values ('2')"
],
"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>\"]}",
"book": null,
"isSubscribed": false,
"isDailyQuestion": false,
"dailyRecordStatus": null,
"editorType": "CKEDITOR",
"ugcQuestionId": null,
"style": "LEETCODE",
"exampleTestcases": "{\"headers\":{\"Point\":[\"x\"]},\"rows\":{\"Point\":[[-1],[0],[2]]}}",
"__typename": "QuestionNode"
}
}
}

View File

@ -0,0 +1,59 @@
{
"data": {
"question": {
"questionId": "612",
"questionFrontendId": "612",
"categoryTitle": "Database",
"boundTopicId": 2635,
"title": "Shortest Distance in a Plane",
"titleSlug": "shortest-distance-in-a-plane",
"content": null,
"translatedTitle": "平面上的最近距离",
"translatedContent": null,
"isPaidOnly": true,
"difficulty": "Medium",
"likes": 32,
"dislikes": 0,
"isLiked": null,
"similarQuestions": "[]",
"contributors": [],
"langToValidPlayground": null,
"topicTags": [
{
"name": "Database",
"slug": "database",
"translatedName": "数据库",
"__typename": "TopicTagNode"
}
],
"companyTagStats": null,
"codeSnippets": null,
"stats": "{\"totalAccepted\": \"9.8K\", \"totalSubmission\": \"14.8K\", \"totalAcceptedRaw\": 9834, \"totalSubmissionRaw\": 14833, \"acRate\": \"66.3%\"}",
"hints": [],
"solution": null,
"status": null,
"sampleTestCase": "{\"headers\":{\"Point2D\":[\"x\",\"y\"]},\"rows\":{\"Point2D\":[[-1,-1],[0,0],[-1,-2]]}}",
"metaData": "{\n \"mysql\": [\n \"Create Table If Not Exists Point2D (x int not null, y int not null)\"\n ],\n \"mssql\": [\n \"Create Table Point2D (x int not null, y int not null)\"\n ],\n \"oraclesql\": [\n \"Create Table Point2D (x int not null, y int not null)\"\n ],\n \"database\": true\n}",
"judgerAvailable": true,
"judgeType": "large",
"mysqlSchemas": [
"Create Table If Not Exists Point2D (x int not null, y int not null)",
"Truncate table Point2D",
"insert into Point2D (x, y) values ('-1', '-1')",
"insert into Point2D (x, y) values ('0', '0')",
"insert into Point2D (x, y) values ('-1', '-2')"
],
"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>\"]}",
"book": null,
"isSubscribed": false,
"isDailyQuestion": false,
"dailyRecordStatus": null,
"editorType": "CKEDITOR",
"ugcQuestionId": null,
"style": "LEETCODE",
"exampleTestcases": "{\"headers\":{\"Point2D\":[\"x\",\"y\"]},\"rows\":{\"Point2D\":[[-1,-1],[0,0],[-1,-2]]}}",
"__typename": "QuestionNode"
}
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,60 @@
{
"data": {
"question": {
"questionId": "618",
"questionFrontendId": "618",
"categoryTitle": "Database",
"boundTopicId": 2631,
"title": "Students Report By Geography",
"titleSlug": "students-report-by-geography",
"content": null,
"translatedTitle": "学生地理信息报告",
"translatedContent": null,
"isPaidOnly": true,
"difficulty": "Hard",
"likes": 63,
"dislikes": 0,
"isLiked": null,
"similarQuestions": "[]",
"contributors": [],
"langToValidPlayground": null,
"topicTags": [
{
"name": "Database",
"slug": "database",
"translatedName": "数据库",
"__typename": "TopicTagNode"
}
],
"companyTagStats": null,
"codeSnippets": null,
"stats": "{\"totalAccepted\": \"6K\", \"totalSubmission\": \"9.7K\", \"totalAcceptedRaw\": 6009, \"totalSubmissionRaw\": 9743, \"acRate\": \"61.7%\"}",
"hints": [],
"solution": null,
"status": null,
"sampleTestCase": "{\"headers\":{\"Student\":[\"name\",\"continent\"]},\"rows\":{\"Student\":[[\"Jane\",\"America\"],[\"Pascal\",\"Europe\"],[\"Xi\",\"Asia\"],[\"Jack\",\"America\"]]}}",
"metaData": "{\n \"mysql\": [\n \"Create table If Not Exists Student (name varchar(50), continent varchar(7))\"\n ],\n \"mssql\": [\n \"Create table Student (name varchar(50), continent varchar(7))\"\n ],\n \"oraclesql\": [\n \"Create table Student (name varchar(50), continent varchar(7))\"\n ],\n \"database\": true\n}",
"judgerAvailable": true,
"judgeType": "large",
"mysqlSchemas": [
"Create table If Not Exists Student (name varchar(50), continent varchar(7))",
"Truncate table Student",
"insert into Student (name, continent) values ('Jane', 'America')",
"insert into Student (name, continent) values ('Pascal', 'Europe')",
"insert into Student (name, continent) values ('Xi', 'Asia')",
"insert into Student (name, continent) values ('Jack', 'America')"
],
"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>\"]}",
"book": null,
"isSubscribed": false,
"isDailyQuestion": false,
"dailyRecordStatus": null,
"editorType": "CKEDITOR",
"ugcQuestionId": null,
"style": "LEETCODE",
"exampleTestcases": "{\"headers\":{\"Student\":[\"name\",\"continent\"]},\"rows\":{\"Student\":[[\"Jane\",\"America\"],[\"Pascal\",\"Europe\"],[\"Xi\",\"Asia\"],[\"Jack\",\"America\"]]}}",
"__typename": "QuestionNode"
}
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,58 @@
{
"data": {
"question": {
"questionId": "610",
"questionFrontendId": "610",
"categoryTitle": "Database",
"boundTopicId": 2636,
"title": "Triangle Judgement",
"titleSlug": "triangle-judgement",
"content": null,
"translatedTitle": "判断三角形",
"translatedContent": null,
"isPaidOnly": true,
"difficulty": "Easy",
"likes": 30,
"dislikes": 0,
"isLiked": null,
"similarQuestions": "[]",
"contributors": [],
"langToValidPlayground": null,
"topicTags": [
{
"name": "Database",
"slug": "database",
"translatedName": "数据库",
"__typename": "TopicTagNode"
}
],
"companyTagStats": null,
"codeSnippets": null,
"stats": "{\"totalAccepted\": \"13.6K\", \"totalSubmission\": \"20.7K\", \"totalAcceptedRaw\": 13633, \"totalSubmissionRaw\": 20734, \"acRate\": \"65.8%\"}",
"hints": [],
"solution": null,
"status": null,
"sampleTestCase": "{\"headers\":{\"Triangle\":[\"x\",\"y\",\"z\"]},\"rows\":{\"Triangle\":[[13,15,30],[10,20,15]]}}",
"metaData": "{\n \"mysql\": [\n \"Create table If Not Exists Triangle (x int, y int, z int)\"\n ],\n \"mssql\": [\n \"Create table Triangle (x int, y int, z int)\"\n ],\n \"oraclesql\": [\n \"Create table Triangle (x int, y int, z int)\"\n ],\n \"database\": true\n}",
"judgerAvailable": true,
"judgeType": "large",
"mysqlSchemas": [
"Create table If Not Exists Triangle (x int, y int, z int)",
"Truncate table Triangle",
"insert into Triangle (x, y, z) values ('13', '15', '30')",
"insert into Triangle (x, y, z) values ('10', '20', '15')"
],
"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>\"]}",
"book": null,
"isSubscribed": false,
"isDailyQuestion": false,
"dailyRecordStatus": null,
"editorType": "CKEDITOR",
"ugcQuestionId": null,
"style": "LEETCODE",
"exampleTestcases": "{\"headers\":{\"Triangle\":[\"x\",\"y\",\"z\"]},\"rows\":{\"Triangle\":[[13,15,30],[10,20,15]]}}",
"__typename": "QuestionNode"
}
}
}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,68 @@
{
"data": {
"question": {
"questionId": "574",
"questionFrontendId": "574",
"categoryTitle": "Database",
"boundTopicId": 2649,
"title": "Winning Candidate",
"titleSlug": "winning-candidate",
"content": null,
"translatedTitle": "当选者",
"translatedContent": null,
"isPaidOnly": true,
"difficulty": "Medium",
"likes": 30,
"dislikes": 0,
"isLiked": null,
"similarQuestions": "[]",
"contributors": [],
"langToValidPlayground": null,
"topicTags": [
{
"name": "Database",
"slug": "database",
"translatedName": "数据库",
"__typename": "TopicTagNode"
}
],
"companyTagStats": null,
"codeSnippets": null,
"stats": "{\"totalAccepted\": \"16.7K\", \"totalSubmission\": \"25.4K\", \"totalAcceptedRaw\": 16655, \"totalSubmissionRaw\": 25350, \"acRate\": \"65.7%\"}",
"hints": [],
"solution": null,
"status": null,
"sampleTestCase": "{\"headers\":{\"Candidate\":[\"id\",\"name\"],\"Vote\":[\"id\",\"candidateId\"]},\"rows\":{\"Candidate\":[[1,\"A\"],[2,\"B\"],[3,\"C\"],[4,\"D\"],[5,\"E\"]],\"Vote\":[[1,2],[2,4],[3,3],[4,2],[5,5]]}}",
"metaData": "{\n \"mysql\": [\n \"Create table If Not Exists Candidate (id int, name varchar(255))\",\n \"Create table If Not Exists Vote (id int, candidateId int)\"\n ],\n \"mssql\": [\n \"Create table Candidate (id int, name varchar(255))\",\n \"Create table Vote (id int, candidateId int)\"\n ],\n \"oraclesql\": [\n \"Create table Candidate (id int, name varchar(255))\",\n \"Create table Vote (id int, candidateId int)\"\n ],\n \"database\": true\n}",
"judgerAvailable": true,
"judgeType": "large",
"mysqlSchemas": [
"Create table If Not Exists Candidate (id int, name varchar(255))",
"Create table If Not Exists Vote (id int, candidateId int)",
"Truncate table Candidate",
"insert into Candidate (id, name) values ('1', 'A')",
"insert into Candidate (id, name) values ('2', 'B')",
"insert into Candidate (id, name) values ('3', 'C')",
"insert into Candidate (id, name) values ('4', 'D')",
"insert into Candidate (id, name) values ('5', 'E')",
"Truncate table Vote",
"insert into Vote (id, candidateId) values ('1', '2')",
"insert into Vote (id, candidateId) values ('2', '4')",
"insert into Vote (id, candidateId) values ('3', '3')",
"insert into Vote (id, candidateId) values ('4', '2')",
"insert into Vote (id, candidateId) values ('5', '5')"
],
"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>\"]}",
"book": null,
"isSubscribed": false,
"isDailyQuestion": false,
"dailyRecordStatus": null,
"editorType": "CKEDITOR",
"ugcQuestionId": null,
"style": "LEETCODE",
"exampleTestcases": "{\"headers\":{\"Candidate\":[\"id\",\"name\"],\"Vote\":[\"id\",\"candidateId\"]},\"rows\":{\"Candidate\":[[1,\"A\"],[2,\"B\"],[3,\"C\"],[4,\"D\"],[5,\"E\"]],\"Vote\":[[1,2],[2,4],[3,3],[4,2],[5,5]]}}",
"__typename": "QuestionNode"
}
}
}

File diff suppressed because one or more lines are too long

Some files were not shown because too many files have changed in this diff Show More