1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-09-13 11:21:42 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee

15 Commits

Author SHA1 Message Date
2aacdf2f93 update 2024-12-20 00:35:26 +08:00
00a21292d6 update 2024-11-29 17:51:10 +08:00
988e8e3971 update 2024-11-29 17:49:27 +08:00
721407d9be update 2024-11-07 00:20:26 +08:00
921e076c8e update 2024-10-10 00:43:17 +08:00
zhangbk1
76e35939b6 update 2024-09-23 14:31:00 +08:00
zhangbk1
fc8e794743 update 2024-09-19 09:27:23 +08:00
1bb2fbd76e update 2024-08-27 23:06:51 +08:00
zhangbk1
91ca37c7ef update 2024-08-06 08:46:50 +08:00
zhangbk1
43a450d3d7 update 2024-07-16 16:03:30 +08:00
zhangbk1
847e599aec 忽略https警告;国外版力扣题库拉取失败问题修复;其他小问题修复 2024-07-16 16:02:46 +08:00
zhangbk1
b1fc2c627d update 2024-06-25 09:35:00 +08:00
b545ef1222 update 2024-06-25 01:21:44 +08:00
zhangbk1
f55b93a706 update 2024-06-05 08:53:56 +08:00
zhangbk1
4b8628b444 update 2024-06-05 08:50:06 +08:00
1039 changed files with 137684 additions and 17418 deletions

100
README.md
View File

@@ -1,46 +1,54 @@
# 力扣题库(完整版)
> 最后更新日期: **2024.05.16**
>
> 使用脚本前请务必仔细完整阅读本 `README.md` 文件
### 仓库介绍
使用 Python 脚本分批将力扣(`leetcode.com``leetcode-cn.com`)上面的题目保存下来,方便没有网的时候进行学习。(仅包含可以在网页上直接打开的公开题目,不包含 VIP 题目)
### 仓库目录结构
国外版力扣题库,在仓库 `leetcode/problem` 文件夹下;国内版力扣题库,在仓库 `leetcode-cn/problem (Chinese)``leetcode-cn/problem (English)` 文件夹下。(部分题目只有中文版,无对应英文版)。
### 特别注意!
#### 版权相关
**所有版权都为 LeetCode (及力扣中国) 官方所有,此处仅供学习使用,不要他用。也请大家不要滥用,不要侵犯力扣平台的合法权益。**
**感谢 LeetCode 平台为我们提供大量的算法题目进行练习与提升。如果大家经济条件允许,请大家多多支持力扣,例如冲冲会员等。**
力扣题库的权益归属力扣,使用力扣题库,需要遵循力扣使用条例,若您不同意此条例,请立即关闭当前网页,不要继续使用本题库。
力扣LeetCode• 使用条例: https://leetcode-cn.com/terms-c/
LeetCode Terms of Service https://leetcode.com/terms/
#### 脚本原作者
Python脚本是在网上教程的基础上进行二改得到的原版地址https://blog.csdn.net/weixin_37267014/article/details/81429057
#### 其他
由于脚本运行时会向力扣网站发出大量请求,所以请大家不要随便尝试此脚本,以免影响力扣网站正常运行。
因为使用此脚本所造成的一系列问题,责任由您自己承担,作者不承担相应责任。
# 力扣题库(完整版)
> 最后更新日期: **2024.12.20**
>
> 使用脚本前请务必仔细完整阅读本 `README.md` 文件
### 仓库介绍
使用 Python 脚本分批将力扣(`leetcode.com``leetcode-cn.com`)上面的题目保存下来,方便没有网的时候进行学习。(仅包含可以在网页上直接打开的公开题目,不包含 VIP 题目)
### 仓库目录结构
国外版力扣题库,在仓库 `leetcode/problem` 文件夹下;国内版力扣题库,在仓库 `leetcode-cn/problem (Chinese)``leetcode-cn/problem (English)` 文件夹下。(部分题目只有中文版,无对应英文版)。
### 安装依赖
```bash
pip install -r requirements.txt
```
### 特别注意!
#### 版权相关
**所有版权都为 LeetCode (及力扣中国) 官方所有,此处仅供学习使用,不要他用。也请大家不要滥用,不要侵犯力扣平台的合法权益。**
**感谢 LeetCode 平台为我们提供大量的算法题目进行练习与提升。如果大家经济条件允许,请大家多多支持力扣,例如充充会员等。**
力扣题库的权益归属力扣,使用力扣题库,需要遵循力扣使用条例,若您不同意此条例,请立即关闭当前网页,不要继续使用本题库。
力扣LeetCode• 使用条例: https://leetcode-cn.com/terms-c/
LeetCode Terms of Service https://leetcode.com/terms/
#### 脚本原作者
Python脚本是在网上教程的基础上进行二改得到的原版地址https://blog.csdn.net/weixin_37267014/article/details/81429057
#### 其他
由于脚本运行时会向力扣网站发出大量请求,所以请大家不要随便尝试此脚本,以免影响力扣网站正常运行。
因为使用此脚本所造成的一系列问题,责任由您自己承担,作者不承担相应责任。

View File

@@ -8,9 +8,15 @@ import requests
from requests.exceptions import RequestException
from bs4 import BeautifulSoup
import urllib3
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
def get_proble_set(url):
try:
response = requests.get(url)
# response = requests.get(url)
response = requests.get(url, headers = {
'User-Agent': "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36"
}, verify=False)
if response.status_code == 200:
return response.text
return None
@@ -34,9 +40,9 @@ def parse_proble_set(problemSet):
continue
def construct_url(problemTitle):
url = "https://leetcode.cn/problems/"+ problemTitle + "/"
url = "https://leetcode.cn/problems/" + problemTitle + "/"
# print(url)
get_proble_content(url,problemTitle)
get_proble_content(url, problemTitle)
def save_problem(title,content, editorType = ""):
#content = bytes(content,encoding = 'utf8')
@@ -118,7 +124,11 @@ def saveJSON(data, filename):
def main():
url = "https://leetcode.cn/api/problems/all/"
html = json.loads(get_proble_set(url))
jsonContent = get_proble_set(url)
if jsonContent == None:
print('列表请求失败!')
return
html = json.loads(jsonContent)
saveJSON(html, "origin-data.json")
# html = json.load(open("origin-data.json", 'r', encoding='utf-8'))

File diff suppressed because it is too large Load Diff

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": "3512",
"questionFrontendId": "3204",
"categoryTitle": "Database",
"boundTopicId": 2827445,
"title": "Bitwise User Permissions Analysis",
"titleSlug": "bitwise-user-permissions-analysis",
"content": null,
"translatedTitle": "按位用户权限分析",
"translatedContent": null,
"isPaidOnly": true,
"difficulty": "Medium",
"likes": 0,
"dislikes": 0,
"isLiked": null,
"similarQuestions": "[]",
"contributors": [],
"langToValidPlayground": null,
"topicTags": [
{
"name": "Database",
"slug": "database",
"translatedName": "数据库",
"__typename": "TopicTagNode"
}
],
"companyTagStats": null,
"codeSnippets": null,
"stats": "{\"totalAccepted\": \"63\", \"totalSubmission\": \"66\", \"totalAcceptedRaw\": 63, \"totalSubmissionRaw\": 66, \"acRate\": \"95.5%\"}",
"hints": [],
"solution": null,
"status": null,
"sampleTestCase": "{\"headers\":{\"user_permissions\":[\"user_id\",\"permissions\"]},\"rows\":{\"user_permissions\":[[1,5],[2,12],[3,7],[4,3]]}}",
"metaData": "{\"mysql\":[\"Create table if not exists user_permissions(user_id int, permissions int)\"],\"mssql\":[\"Create table user_permissions(user_id int, permissions int)\"],\"oraclesql\":[\"Create table user_permissions(user_id NUMBER, permissions NUMBER)\"],\"database\":true,\"name\":\"analyze_permissions\",\"postgresql\":[\"CREATE TABLE IF NOT EXISTS user_permissions (\\n user_id int,\\n permissions int\\n);\\n\"],\"pythondata\":[\"user_permissions = pd.DataFrame({\\n 'user_id': pd.Series(dtype='int'),\\n 'permissions': pd.Series(dtype='int')\\n})\"],\"database_schema\":{\"user_permissions\":{\"user_id\":\"INT\",\"permissions\":\"INT\"}}}",
"judgerAvailable": true,
"judgeType": "large",
"mysqlSchemas": [
"Create table if not exists user_permissions(user_id int, permissions int)",
"Truncate table user_permissions",
"insert into user_permissions (user_id, permissions) values ('1', '5')",
"insert into user_permissions (user_id, permissions) values ('2', '12')",
"insert into user_permissions (user_id, permissions) values ('3', '7')",
"insert into user_permissions (user_id, permissions) values ('4', '3')"
],
"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_permissions\":[\"user_id\",\"permissions\"]},\"rows\":{\"user_permissions\":[[1,5],[2,12],[3,7],[4,3]]}}",
"__typename": "QuestionNode"
}
}
}

View File

@@ -0,0 +1,62 @@
{
"data": {
"question": {
"questionId": "3695",
"questionFrontendId": "3358",
"categoryTitle": "Database",
"boundTopicId": 2992013,
"title": "Books with NULL Ratings",
"titleSlug": "books-with-null-ratings",
"content": null,
"translatedTitle": "评分为 NULL 的图书",
"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,
"stats": "{\"totalAccepted\": \"85\", \"totalSubmission\": \"89\", \"totalAcceptedRaw\": 85, \"totalSubmissionRaw\": 89, \"acRate\": \"95.5%\"}",
"hints": [],
"solution": null,
"status": null,
"sampleTestCase": "{\"headers\":{\"books\":[\"book_id\",\"title\",\"author\",\"published_year\",\"rating\"]},\"rows\":{\"books\":[[1,\"The Great Gatsby\",\"F. Scott\",1925,4.5],[2,\"To Kill a Mockingbird\",\"Harper Lee\",1960,null],[3,\"Pride and Prejudice\",\"Jane Austen\",1813,4.8],[4,\"The Catcher in the Rye\",\"J.D. Salinger\",1951,null],[5,\"Animal Farm\",\"George Orwell\",1945,4.2],[6,\"Lord of the Flies\",\"William Golding\",1954,null]]}}",
"metaData": "{\"mysql\":[\"Create table books (\\n book_id int,\\n title varchar(255),\\n author varchar(100),\\n published_year int,\\n rating decimal(3,1)\\n)\"],\"mssql\":[\"Create table books (\\n book_id int,\\n title varchar(255),\\n author varchar(100),\\n published_year int,\\n rating decimal(3,1)\\n)\"],\"oraclesql\":[\"Create table books (\\n book_id number,\\n title varchar2(255),\\n author varchar2(100),\\n published_year number,\\n rating number(3,1)\\n)\"],\"database\":true,\"name\":\"find_unrated_books\",\"postgresql\":[\"CREATE TABLE books (\\n book_id INTEGER,\\n title VARCHAR(255),\\n author VARCHAR(100),\\n published_year INTEGER,\\n rating NUMERIC(3, 1)\\n);\\n\"],\"pythondata\":[\"books = pd.DataFrame({ \\\"book_id\\\": pd.Series(dtype=\\\"int\\\"), \\\"title\\\": pd.Series(dtype=\\\"str\\\"), \\\"author\\\": pd.Series(dtype=\\\"str\\\"), \\\"published_year\\\": pd.Series(dtype=\\\"int\\\"), \\\"rating\\\": pd.Series(dtype=\\\"float\\\") })\\n\"],\"database_schema\":{\"books\":{\"book_id\":\"INT\",\"title\":\"VARCHAR(255)\",\"author\":\"VARCHAR(100)\",\"published_year\":\"INT\",\"rating\":\"DECIMAL(3, 1)\"}}}",
"judgerAvailable": true,
"judgeType": "large",
"mysqlSchemas": [
"Create table books (\n book_id int,\n title varchar(255),\n author varchar(100),\n published_year int,\n rating decimal(3,1)\n)",
"Truncate table books",
"insert into books (book_id, title, author, published_year, rating) values ('1', 'The Great Gatsby', 'F. Scott', '1925', '4.5')",
"insert into books (book_id, title, author, published_year, rating) values ('2', 'To Kill a Mockingbird', 'Harper Lee', '1960', NULL)",
"insert into books (book_id, title, author, published_year, rating) values ('3', 'Pride and Prejudice', 'Jane Austen', '1813', '4.8')",
"insert into books (book_id, title, author, published_year, rating) values ('4', 'The Catcher in the Rye', 'J.D. Salinger', '1951', NULL)",
"insert into books (book_id, title, author, published_year, rating) values ('5', 'Animal Farm', 'George Orwell', '1945', '4.2')",
"insert into books (book_id, title, author, published_year, rating) values ('6', 'Lord of the Flies', 'William Golding', '1954', NULL)"
],
"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.2.2 and NumPy 1.26.4<\\/p>\"],\"postgresql\":[\"PostgreSQL\",\"<p>PostgreSQL 16<\\/p>\"]}",
"book": null,
"isSubscribed": false,
"isDailyQuestion": false,
"dailyRecordStatus": null,
"editorType": "CKEDITOR",
"ugcQuestionId": null,
"style": "LEETCODE",
"exampleTestcases": "{\"headers\":{\"books\":[\"book_id\",\"title\",\"author\",\"published_year\",\"rating\"]},\"rows\":{\"books\":[[1,\"The Great Gatsby\",\"F. Scott\",1925,4.5],[2,\"To Kill a Mockingbird\",\"Harper Lee\",1960,null],[3,\"Pride and Prejudice\",\"Jane Austen\",1813,4.8],[4,\"The Catcher in the Rye\",\"J.D. Salinger\",1951,null],[5,\"Animal Farm\",\"George Orwell\",1945,4.2],[6,\"Lord of the Flies\",\"William Golding\",1954,null]]}}",
"__typename": "QuestionNode"
}
}
}

View File

@@ -0,0 +1,62 @@
{
"data": {
"question": {
"questionId": "3473",
"questionFrontendId": "3166",
"categoryTitle": "Database",
"boundTopicId": 2791590,
"title": "Calculate Parking Fees and Duration",
"titleSlug": "calculate-parking-fees-and-duration",
"content": null,
"translatedTitle": "计算停车费与时长",
"translatedContent": null,
"isPaidOnly": true,
"difficulty": "Medium",
"likes": 0,
"dislikes": 0,
"isLiked": null,
"similarQuestions": "[]",
"contributors": [],
"langToValidPlayground": null,
"topicTags": [
{
"name": "Database",
"slug": "database",
"translatedName": "数据库",
"__typename": "TopicTagNode"
}
],
"companyTagStats": null,
"codeSnippets": null,
"stats": "{\"totalAccepted\": \"45\", \"totalSubmission\": \"69\", \"totalAcceptedRaw\": 45, \"totalSubmissionRaw\": 69, \"acRate\": \"65.2%\"}",
"hints": [],
"solution": null,
"status": null,
"sampleTestCase": "{\"headers\":{\"ParkingTransactions\":[\"lot_id\",\"car_id\",\"entry_time\",\"exit_time\",\"fee_paid\"]},\"rows\":{\"ParkingTransactions\":[[1,1001,\"2023-06-01 08:00:00\",\"2023-06-01 10:30:00\",5.00],[1,1001,\"2023-06-02 11:00:00\",\"2023-06-02 12:45:00\",3.00],[2,1001,\"2023-06-01 10:45:00\",\"2023-06-01 12:00:00\",6.00],[2,1002,\"2023-06-01 09:00:00\",\"2023-06-01 11:30:00\",4.00],[3,1001,\"2023-06-03 07:00:00\",\"2023-06-03 09:00:00\",4.00],[3,1002,\"2023-06-02 12:00:00\",\"2023-06-02 14:00:00\",2.00]]}}",
"metaData": "{\"mysql\":[\"CREATE TABLE If not exists ParkingTransactions (\\n lot_id INT,\\n car_id INT,\\n entry_time DATETIME,\\n exit_time DATETIME,\\n fee_paid DECIMAL(10, 2)\\n)\\n\"],\"mssql\":[\"CREATE TABLE ParkingTransactions (\\n lot_id INT,\\n car_id INT,\\n entry_time DATETIME,\\n exit_time DATETIME,\\n fee_paid DECIMAL(10, 2)\\n);\\n\"],\"oraclesql\":[\"CREATE TABLE ParkingTransactions (\\n lot_id NUMBER,\\n car_id NUMBER,\\n entry_time DATE,\\n exit_time DATE,\\n fee_paid NUMBER(10, 2)\\n)\\n\",\"ALTER SESSION SET nls_date_format='YYYY-MM-DD HH24:MI:SS'\"],\"database\":true,\"name\":\"calculate_fees_and_duration\",\"postgresql\":[\"CREATE TABLE IF NOT EXISTS ParkingTransactions (\\n lot_id INTEGER,\\n car_id INTEGER,\\n entry_time TIMESTAMP,\\n exit_time TIMESTAMP,\\n fee_paid NUMERIC(10, 2)\\n);\"],\"pythondata\":[\"ParkingTransactions = pd.DataFrame([], columns=['lot_id', 'car_id', 'entry_time', 'exit_time', 'fee_paid']).astype({\\n 'lot_id': 'Int64',\\n 'car_id': 'Int64',\\n 'entry_time': 'datetime64[ns]',\\n 'exit_time': 'datetime64[ns]',\\n 'fee_paid': 'float64'\\n})\"],\"database_schema\":{\"ParkingTransactions\":{\"lot_id\":\"INT\",\"car_id\":\"INT\",\"entry_time\":\"DATETIME\",\"exit_time\":\"DATETIME\",\"fee_paid\":\"DECIMAL(10, 2)\"}}}",
"judgerAvailable": true,
"judgeType": "large",
"mysqlSchemas": [
"CREATE TABLE If not exists ParkingTransactions (\n lot_id INT,\n car_id INT,\n entry_time DATETIME,\n exit_time DATETIME,\n fee_paid DECIMAL(10, 2)\n)\n",
"Truncate table ParkingTransactions",
"insert into ParkingTransactions (lot_id, car_id, entry_time, exit_time, fee_paid) values ('1', '1001', '2023-06-01 08:00:00', '2023-06-01 10:30:00', '5.0')",
"insert into ParkingTransactions (lot_id, car_id, entry_time, exit_time, fee_paid) values ('1', '1001', '2023-06-02 11:00:00', '2023-06-02 12:45:00', '3.0')",
"insert into ParkingTransactions (lot_id, car_id, entry_time, exit_time, fee_paid) values ('2', '1001', '2023-06-01 10:45:00', '2023-06-01 12:00:00', '6.0')",
"insert into ParkingTransactions (lot_id, car_id, entry_time, exit_time, fee_paid) values ('2', '1002', '2023-06-01 09:00:00', '2023-06-01 11:30:00', '4.0')",
"insert into ParkingTransactions (lot_id, car_id, entry_time, exit_time, fee_paid) values ('3', '1001', '2023-06-03 07:00:00', '2023-06-03 09:00:00', '4.0')",
"insert into ParkingTransactions (lot_id, car_id, entry_time, exit_time, fee_paid) values ('3', '1002', '2023-06-02 12:00:00', '2023-06-02 14:00:00', '2.0')"
],
"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\":{\"ParkingTransactions\":[\"lot_id\",\"car_id\",\"entry_time\",\"exit_time\",\"fee_paid\"]},\"rows\":{\"ParkingTransactions\":[[1,1001,\"2023-06-01 08:00:00\",\"2023-06-01 10:30:00\",5.00],[1,1001,\"2023-06-02 11:00:00\",\"2023-06-02 12:45:00\",3.00],[2,1001,\"2023-06-01 10:45:00\",\"2023-06-01 12:00:00\",6.00],[2,1002,\"2023-06-01 09:00:00\",\"2023-06-01 11:30:00\",4.00],[3,1001,\"2023-06-03 07:00:00\",\"2023-06-03 09:00:00\",4.00],[3,1002,\"2023-06-02 12:00:00\",\"2023-06-02 14:00:00\",2.00]]}}",
"__typename": "QuestionNode"
}
}
}

View File

@@ -0,0 +1,64 @@
{
"data": {
"question": {
"questionId": "3609",
"questionFrontendId": "3293",
"categoryTitle": "Database",
"boundTopicId": 2920566,
"title": "Calculate Product Final Price",
"titleSlug": "calculate-product-final-price",
"content": null,
"translatedTitle": "计算产品最终价格",
"translatedContent": null,
"isPaidOnly": true,
"difficulty": "Medium",
"likes": 0,
"dislikes": 0,
"isLiked": null,
"similarQuestions": "[]",
"contributors": [],
"langToValidPlayground": null,
"topicTags": [
{
"name": "Database",
"slug": "database",
"translatedName": "数据库",
"__typename": "TopicTagNode"
}
],
"companyTagStats": null,
"codeSnippets": null,
"stats": "{\"totalAccepted\": \"21\", \"totalSubmission\": \"24\", \"totalAcceptedRaw\": 21, \"totalSubmissionRaw\": 24, \"acRate\": \"87.5%\"}",
"hints": [],
"solution": null,
"status": null,
"sampleTestCase": "{\"headers\":{\"Products\":[\"product_id\",\"category\",\"price\"],\"Discounts\":[\"category\",\"discount\"]},\"rows\":{\"Products\":[[1,\"Electronics\",1000],[2,\"Clothing\",50],[3,\"Electronics\",1200],[4,\"Home\",500]],\"Discounts\":[[\"Electronics\",10],[\"Clothing\",20]]}}",
"metaData": "{\"mysql\":[\"Create table if not exists Products (product_id int, category varchar(50), price int)\",\"Create table if not exists Discounts(category varchar(50), discount int)\"],\"mssql\":[\"Create table Products (product_id int, category varchar(50), price int)\",\"Create table Discounts(category varchar(50), discount int)\"],\"oraclesql\":[\"Create table Products (product_id Number, category varchar2(50), price Number)\",\"Create table Discounts(category varchar2(50), discount Number)\"],\"database\":true,\"name\":\"calculate_final_prices\",\"postgresql\":[\"CREATE TABLE IF NOT EXISTS Products (\\n product_id INT,\\n category VARCHAR(50),\\n price INT\\n);\\n\",\"CREATE TABLE IF NOT EXISTS Discounts (\\n category VARCHAR(50),\\n discount INT\\n);\\n\"],\"pythondata\":[\"Products = pd.DataFrame(columns=['product_id', 'category', 'price'], dtype=int)\\n\",\"Discounts = pd.DataFrame({'category': pd.Series(dtype='str'), 'discount': pd.Series(dtype='int')})\\n\"],\"database_schema\":{\"Products\":{\"product_id\":\"INT\",\"category\":\"VARCHAR(50)\",\"price\":\"INT\"},\"Discounts\":{\"category\":\"VARCHAR(50)\",\"discount\":\"INT\"}}}",
"judgerAvailable": true,
"judgeType": "large",
"mysqlSchemas": [
"Create table if not exists Products (product_id int, category varchar(50), price int)",
"Create table if not exists Discounts(category varchar(50), discount int)",
"Truncate table Products",
"insert into Products (product_id, category, price) values ('1', 'Electronics', '1000')",
"insert into Products (product_id, category, price) values ('2', 'Clothing', '50')",
"insert into Products (product_id, category, price) values ('3', 'Electronics', '1200')",
"insert into Products (product_id, category, price) values ('4', 'Home', '500')",
"Truncate table Discounts",
"insert into Discounts (category, discount) values ('Electronics', '10')",
"insert into Discounts (category, discount) values ('Clothing', '20')"
],
"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\":{\"Products\":[\"product_id\",\"category\",\"price\"],\"Discounts\":[\"category\",\"discount\"]},\"rows\":{\"Products\":[[1,\"Electronics\",1000],[2,\"Clothing\",50],[3,\"Electronics\",1200],[4,\"Home\",500]],\"Discounts\":[[\"Electronics\",10],[\"Clothing\",20]]}}",
"__typename": "QuestionNode"
}
}
}

View File

@@ -0,0 +1,64 @@
{
"data": {
"question": {
"questionId": "3549",
"questionFrontendId": "3236",
"categoryTitle": "Database",
"boundTopicId": 2861886,
"title": "CEO Subordinate Hierarchy",
"titleSlug": "ceo-subordinate-hierarchy",
"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\": \"45\", \"totalSubmission\": \"57\", \"totalAcceptedRaw\": 45, \"totalSubmissionRaw\": 57, \"acRate\": \"78.9%\"}",
"hints": [],
"solution": null,
"status": null,
"sampleTestCase": "{\"headers\":{\"Employees\":[\"employee_id\",\"employee_name\",\"manager_id\",\"salary\"]},\"rows\":{\"Employees\":[[1,\"Alice\",null,150000],[2,\"Bob\",1,120000],[3,\"Charlie\",1,110000],[4,\"David\",2,105000],[5,\"Eve\",2,100000],[6,\"Frank\",3,95000],[7,\"Grace\",3,98000],[8,\"Helen\",5,90000]]}}",
"metaData": "{\"mysql\":[\"Create table if not exists employees(employee_id int, employee_name varchar(100), manager_id int, salary int)\"],\"mssql\":[\"Create table employees(employee_id int, employee_name varchar(100), manager_id int, salary int)\"],\"oraclesql\":[\"Create table employees(employee_id NUMBER, employee_name varchar2(100), manager_id NUMBER, salary NUMBER)\"],\"database\":true,\"name\":\"find_subordinates\",\"manual\":false,\"postgresql\":[\"CREATE TABLE IF NOT EXISTS employees (\\n employee_id INT,\\n employee_name VARCHAR(100),\\n manager_id INT,\\n salary INT\\n);\\n\"],\"pythondata\":[\"Employees = pd.DataFrame(columns=['employee_id', 'employee_name', 'manager_id', 'salary']).astype({\\n 'employee_id': pd.Int64Dtype(),\\n 'employee_name': 'str',\\n 'manager_id': pd.Int64Dtype(),\\n 'salary': pd.Int64Dtype()\\n})\"],\"database_schema\":{\"employees\":{\"employee_id\":\"INT\",\"employee_name\":\"VARCHAR(100)\",\"manager_id\":\"INT\",\"salary\":\"INT\"}}}",
"judgerAvailable": true,
"judgeType": "large",
"mysqlSchemas": [
"Create table if not exists employees(employee_id int, employee_name varchar(100), manager_id int, salary int)",
"Truncate table Employees",
"insert into Employees (employee_id, employee_name, manager_id, salary) values ('1', 'Alice', 'None', '150000')",
"insert into Employees (employee_id, employee_name, manager_id, salary) values ('2', 'Bob', '1', '120000')",
"insert into Employees (employee_id, employee_name, manager_id, salary) values ('3', 'Charlie', '1', '110000')",
"insert into Employees (employee_id, employee_name, manager_id, salary) values ('4', 'David', '2', '105000')",
"insert into Employees (employee_id, employee_name, manager_id, salary) values ('5', 'Eve', '2', '100000')",
"insert into Employees (employee_id, employee_name, manager_id, salary) values ('6', 'Frank', '3', '95000')",
"insert into Employees (employee_id, employee_name, manager_id, salary) values ('7', 'Grace', '3', '98000')",
"insert into Employees (employee_id, employee_name, manager_id, salary) values ('8', 'Helen', '5', '90000')"
],
"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\":{\"Employees\":[\"employee_id\",\"employee_name\",\"manager_id\",\"salary\"]},\"rows\":{\"Employees\":[[1,\"Alice\",null,150000],[2,\"Bob\",1,120000],[3,\"Charlie\",1,110000],[4,\"David\",2,105000],[5,\"Eve\",2,100000],[6,\"Frank\",3,95000],[7,\"Grace\",3,98000],[8,\"Helen\",5,90000]]}}",
"__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,66 @@
{
"data": {
"question": {
"questionId": "3539",
"questionFrontendId": "3230",
"categoryTitle": "Database",
"boundTopicId": 2852426,
"title": "Customer Purchasing Behavior Analysis",
"titleSlug": "customer-purchasing-behavior-analysis",
"content": null,
"translatedTitle": "客户购买行为分析",
"translatedContent": null,
"isPaidOnly": true,
"difficulty": "Medium",
"likes": 0,
"dislikes": 0,
"isLiked": null,
"similarQuestions": "[]",
"contributors": [],
"langToValidPlayground": null,
"topicTags": [
{
"name": "Database",
"slug": "database",
"translatedName": "数据库",
"__typename": "TopicTagNode"
}
],
"companyTagStats": null,
"codeSnippets": null,
"stats": "{\"totalAccepted\": \"55\", \"totalSubmission\": \"162\", \"totalAcceptedRaw\": 55, \"totalSubmissionRaw\": 162, \"acRate\": \"34.0%\"}",
"hints": [],
"solution": null,
"status": null,
"sampleTestCase": "{\"headers\":{\"Transactions\":[\"transaction_id\",\"customer_id\",\"product_id\",\"transaction_date\",\"amount\"],\"Products\":[\"product_id\",\"category\",\"price\"]},\"rows\":{\"Transactions\":[[1,101,1,\"2023-01-01\",100.00],[2,101,2,\"2023-01-15\",150.00],[3,102,1,\"2023-01-01\",100.00],[4,102,3,\"2023-01-22\",200.00],[5,101,3,\"2023-02-10\",200.00]],\"Products\":[[1,\"A\",100.00],[2,\"B\",150.00],[3,\"C\",200.00]]}}",
"metaData": "{\"mysql\":[\"CREATE TABLE if not exists Transactions (\\n transaction_id INT,\\n customer_id INT,\\n product_id INT,\\n transaction_date DATE,\\n amount DECIMAL(10, 2)\\n)\",\"CREATE TABLE if not exists Products (\\n product_id INT ,\\n category VARCHAR(255),\\n price DECIMAL(10, 2)\\n)\\n\"],\"mssql\":[\"CREATE TABLE Transactions (\\n transaction_id INT ,\\n customer_id INT,\\n product_id INT,\\n transaction_date DATE,\\n amount DECIMAL(10, 2)\\n)\\n\",\"\\nCREATE TABLE Products (\\n product_id INT ,\\n category VARCHAR(255),\\n price DECIMAL(10, 2)\\n)\"],\"oraclesql\":[\"CREATE TABLE Transactions (\\n transaction_id NUMBER ,\\n customer_id NUMBER,\\n product_id NUMBER,\\n transaction_date DATE,\\n amount NUMBER(10, 2)\\n)\",\"CREATE TABLE Products (\\n product_id NUMBER ,\\n category VARCHAR2(255),\\n price NUMBER(10, 2)\\n)\",\"ALTER SESSION SET nls_date_format='YYYY-MM-DD'\"],\"database\":true,\"name\":\"analyze_customer_behavior\",\"postgresql\":[\"CREATE TABLE IF NOT EXISTS Transactions (\\n transaction_id INTEGER,\\n customer_id INTEGER,\\n product_id INTEGER,\\n transaction_date DATE,\\n amount NUMERIC(10, 2)\\n);\\n\",\"CREATE TABLE IF NOT EXISTS Products (\\n product_id INTEGER,\\n category VARCHAR(255),\\n price NUMERIC(10, 2)\\n);\\n\"],\"pythondata\":[\"Transactions = pd.DataFrame(columns=['transaction_id', 'customer_id', 'product_id', 'transaction_date', 'amount']).astype({'transaction_id': 'int', 'customer_id': 'int', 'product_id': 'int', 'transaction_date': 'datetime64[ns]', 'amount': 'float'})\",\"Products = pd.DataFrame(columns=['product_id', 'category', 'price']).astype({'product_id': 'int', 'category': 'str', 'price': 'float'})\"],\"database_schema\":{\"Transactions\":{\"transaction_id\":\"INT\",\"customer_id\":\"INT\",\"product_id\":\"INT\",\"transaction_date\":\"DATE\",\"amount\":\"DECIMAL(10, 2)\"},\"Products\":{\"product_id\":\"INT\",\"category\":\"VARCHAR(255)\",\"price\":\"DECIMAL(10, 2)\"}}}",
"judgerAvailable": true,
"judgeType": "large",
"mysqlSchemas": [
"CREATE TABLE if not exists Transactions (\n transaction_id INT,\n customer_id INT,\n product_id INT,\n transaction_date DATE,\n amount DECIMAL(10, 2)\n)",
"CREATE TABLE if not exists Products (\n product_id INT ,\n category VARCHAR(255),\n price DECIMAL(10, 2)\n)\n",
"Truncate table Transactions",
"insert into Transactions (transaction_id, customer_id, product_id, transaction_date, amount) values ('1', '101', '1', '2023-01-01', '100.0')",
"insert into Transactions (transaction_id, customer_id, product_id, transaction_date, amount) values ('2', '101', '2', '2023-01-15', '150.0')",
"insert into Transactions (transaction_id, customer_id, product_id, transaction_date, amount) values ('3', '102', '1', '2023-01-01', '100.0')",
"insert into Transactions (transaction_id, customer_id, product_id, transaction_date, amount) values ('4', '102', '3', '2023-01-22', '200.0')",
"insert into Transactions (transaction_id, customer_id, product_id, transaction_date, amount) values ('5', '101', '3', '2023-02-10', '200.0')",
"Truncate table Products",
"insert into Products (product_id, category, price) values ('1', 'A', '100.0')",
"insert into Products (product_id, category, price) values ('2', 'B', '150.0')",
"insert into Products (product_id, category, price) values ('3', 'C', '200.0')"
],
"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\":{\"Transactions\":[\"transaction_id\",\"customer_id\",\"product_id\",\"transaction_date\",\"amount\"],\"Products\":[\"product_id\",\"category\",\"price\"]},\"rows\":{\"Transactions\":[[1,101,1,\"2023-01-01\",100.00],[2,101,2,\"2023-01-15\",150.00],[3,102,1,\"2023-01-01\",100.00],[4,102,3,\"2023-01-22\",200.00],[5,101,3,\"2023-02-10\",200.00]],\"Products\":[[1,\"A\",100.00],[2,\"B\",150.00],[3,\"C\",200.00]]}}",
"__typename": "QuestionNode"
}
}
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,63 @@
{
"data": {
"question": {
"questionId": "3465",
"questionFrontendId": "3156",
"categoryTitle": "Database",
"boundTopicId": 2783743,
"title": "Employee Task Duration and Concurrent Tasks",
"titleSlug": "employee-task-duration-and-concurrent-tasks",
"content": null,
"translatedTitle": "员工任务持续时间和并发任务",
"translatedContent": null,
"isPaidOnly": true,
"difficulty": "Hard",
"likes": 1,
"dislikes": 0,
"isLiked": null,
"similarQuestions": "[]",
"contributors": [],
"langToValidPlayground": null,
"topicTags": [
{
"name": "Database",
"slug": "database",
"translatedName": "数据库",
"__typename": "TopicTagNode"
}
],
"companyTagStats": null,
"codeSnippets": null,
"stats": "{\"totalAccepted\": \"40\", \"totalSubmission\": \"87\", \"totalAcceptedRaw\": 40, \"totalSubmissionRaw\": 87, \"acRate\": \"46.0%\"}",
"hints": [],
"solution": null,
"status": null,
"sampleTestCase": "{\"headers\":{\"Tasks\":[\"task_id\",\"employee_id\",\"start_time\",\"end_time\"]},\"rows\":{\"Tasks\":[[1,1001,\"2023-05-01 08:00:00\",\"2023-05-01 09:00:00\"],[2,1001,\"2023-05-01 08:30:00\",\"2023-05-01 10:30:00\"],[3,1001,\"2023-05-01 11:00:00\",\"2023-05-01 12:00:00\"],[7,1001,\"2023-05-01 13:00:00\",\"2023-05-01 15:30:00\"],[4,1002,\"2023-05-01 09:00:00\",\"2023-05-01 10:00:00\"],[5,1002,\"2023-05-01 09:30:00\",\"2023-05-01 11:30:00\"],[6,1003,\"2023-05-01 14:00:00\",\"2023-05-01 16:00:00\"]]}}",
"metaData": "{\"mysql\":[\"CREATE TABLE if Not exists Tasks (\\n task_id INT ,\\n employee_id INT,\\n start_time DATETIME,\\n end_time DATETIME\\n);\"],\"mssql\":[\"CREATE TABLE Tasks (\\n task_id INT PRIMARY KEY,\\n employee_id INT,\\n start_time DATETIME,\\n end_time DATETIME\\n);\\n\"],\"oraclesql\":[\"CREATE TABLE Tasks (\\n task_id int ,\\n employee_id int,\\n start_time DATE,\\n end_time DATE\\n)\\n\\n\\n\\n\\n\\n\\n\",\"ALTER SESSION SET nls_date_format='YYYY-MM-DD HH24:MI:SS'\"],\"postgresql\":[\"CREATE TABLE IF NOT EXISTS Tasks (\\n task_id INT,\\n employee_id INT,\\n start_time TIMESTAMP,\\n end_time TIMESTAMP\\n);\\n\"],\"pythondata\":[\"Tasks = pd.DataFrame([], columns=['task_id', 'employee_id', 'start_time', 'end_time']).astype({\\n 'task_id': 'Int64',\\n 'employee_id': 'Int64',\\n 'start_time': 'datetime64[ns]',\\n 'end_time': 'datetime64[ns]'\\n})\"],\"database\":true,\"name\":\"find_total_duration\",\"database_schema\":{\"Tasks\":{\"task_id\":\"INT\",\"employee_id\":\"INT\",\"start_time\":\"DATETIME\",\"end_time\":\"DATETIME\"}}}",
"judgerAvailable": true,
"judgeType": "large",
"mysqlSchemas": [
"CREATE TABLE if Not exists Tasks (\n task_id INT ,\n employee_id INT,\n start_time DATETIME,\n end_time DATETIME\n);",
"Truncate table Tasks",
"insert into Tasks (task_id, employee_id, start_time, end_time) values ('1', '1001', '2023-05-01 08:00:00', '2023-05-01 09:00:00')",
"insert into Tasks (task_id, employee_id, start_time, end_time) values ('2', '1001', '2023-05-01 08:30:00', '2023-05-01 10:30:00')",
"insert into Tasks (task_id, employee_id, start_time, end_time) values ('3', '1001', '2023-05-01 11:00:00', '2023-05-01 12:00:00')",
"insert into Tasks (task_id, employee_id, start_time, end_time) values ('7', '1001', '2023-05-01 13:00:00', '2023-05-01 15:30:00')",
"insert into Tasks (task_id, employee_id, start_time, end_time) values ('4', '1002', '2023-05-01 09:00:00', '2023-05-01 10:00:00')",
"insert into Tasks (task_id, employee_id, start_time, end_time) values ('5', '1002', '2023-05-01 09:30:00', '2023-05-01 11:30:00')",
"insert into Tasks (task_id, employee_id, start_time, end_time) values ('6', '1003', '2023-05-01 14:00:00', '2023-05-01 16: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\":{\"Tasks\":[\"task_id\",\"employee_id\",\"start_time\",\"end_time\"]},\"rows\":{\"Tasks\":[[1,1001,\"2023-05-01 08:00:00\",\"2023-05-01 09:00:00\"],[2,1001,\"2023-05-01 08:30:00\",\"2023-05-01 10:30:00\"],[3,1001,\"2023-05-01 11:00:00\",\"2023-05-01 12:00:00\"],[7,1001,\"2023-05-01 13:00:00\",\"2023-05-01 15:30:00\"],[4,1002,\"2023-05-01 09:00:00\",\"2023-05-01 10:00:00\"],[5,1002,\"2023-05-01 09:30:00\",\"2023-05-01 11:30:00\"],[6,1003,\"2023-05-01 14:00:00\",\"2023-05-01 16:00:00\"]]}}",
"__typename": "QuestionNode"
}
}
}

View File

@@ -0,0 +1,76 @@
{
"data": {
"question": {
"questionId": "3589",
"questionFrontendId": "3278",
"categoryTitle": "Database",
"boundTopicId": 2900887,
"title": "Find Candidates for Data Scientist Position II",
"titleSlug": "find-candidates-for-data-scientist-position-ii",
"content": null,
"translatedTitle": "寻找数据科学家职位的候选人 II",
"translatedContent": null,
"isPaidOnly": true,
"difficulty": "Medium",
"likes": 0,
"dislikes": 0,
"isLiked": null,
"similarQuestions": "[]",
"contributors": [],
"langToValidPlayground": null,
"topicTags": [
{
"name": "Database",
"slug": "database",
"translatedName": "数据库",
"__typename": "TopicTagNode"
}
],
"companyTagStats": null,
"codeSnippets": null,
"stats": "{\"totalAccepted\": \"70\", \"totalSubmission\": \"132\", \"totalAcceptedRaw\": 70, \"totalSubmissionRaw\": 132, \"acRate\": \"53.0%\"}",
"hints": [],
"solution": null,
"status": null,
"sampleTestCase": "{\"headers\":{\"Candidates\":[\"candidate_id\",\"skill\",\"proficiency\"],\"Projects\":[\"project_id\",\"skill\",\"importance\"]},\"rows\":{\"Candidates\":[[101,\"Python\",5],[101,\"Tableau\",3],[101,\"PostgreSQL\",4],[101,\"TensorFlow\",2],[102,\"Python\",4],[102,\"Tableau\",5],[102,\"PostgreSQL\",4],[102,\"R\",4],[103,\"Python\",3],[103,\"Tableau\",5],[103,\"PostgreSQL\",5],[103,\"Spark\",4]],\"Projects\":[[501,\"Python\",4],[501,\"Tableau\",3],[501,\"PostgreSQL\",5],[502,\"Python\",3],[502,\"Tableau\",4],[502,\"R\",2]]}}",
"metaData": "{\"mysql\":[\"Create table if not exists Candidates(candidate_id int, skill varchar(50), proficiency int)\",\"Create table if not exists Projects( project_id int, skill varchar(50), importance int)\"],\"mssql\":[\"Create table Candidates(candidate_id int, skill varchar(50), proficiency int)\",\"Create table Projects( project_id int, skill varchar(50), importance int)\"],\"oraclesql\":[\"Create table Candidates(candidate_id number, skill varchar2(50), proficiency number)\",\"Create table Projects(project_id number, skill varchar2(50), importance number)\"],\"database\":true,\"name\":\"find_best_candidates\",\"postgresql\":[\"CREATE TABLE IF NOT EXISTS Candidates (\\n candidate_id INT,\\n skill VARCHAR(50),\\n proficiency INT\\n);\\n\",\"CREATE TABLE IF NOT EXISTS Projects (\\n project_id INT,\\n skill VARCHAR(50),\\n importance INT\\n);\\n\"],\"pythondata\":[\"Candidates = pd.DataFrame({\\n 'candidate_id': pd.Series(dtype='int'),\\n 'skill': pd.Series(dtype='str'),\\n 'proficiency': pd.Series(dtype='int')\\n})\",\"Projects = pd.DataFrame({\\n 'project_id': pd.Series(dtype='int'),\\n 'skill': pd.Series(dtype='str'),\\n 'importance': pd.Series(dtype='int')\\n})\"],\"database_schema\":{\"Candidates\":{\"candidate_id\":\"INT\",\"skill\":\"VARCHAR(50)\",\"proficiency\":\"INT\"},\"Projects\":{\"project_id\":\"INT\",\"skill\":\"VARCHAR(50)\",\"importance\":\"INT\"}}}",
"judgerAvailable": true,
"judgeType": "large",
"mysqlSchemas": [
"Create table if not exists Candidates(candidate_id int, skill varchar(50), proficiency int)",
"Create table if not exists Projects( project_id int, skill varchar(50), importance int)",
"Truncate table Candidates",
"insert into Candidates (candidate_id, skill, proficiency) values ('101', 'Python', '5')",
"insert into Candidates (candidate_id, skill, proficiency) values ('101', 'Tableau', '3')",
"insert into Candidates (candidate_id, skill, proficiency) values ('101', 'PostgreSQL', '4')",
"insert into Candidates (candidate_id, skill, proficiency) values ('101', 'TensorFlow', '2')",
"insert into Candidates (candidate_id, skill, proficiency) values ('102', 'Python', '4')",
"insert into Candidates (candidate_id, skill, proficiency) values ('102', 'Tableau', '5')",
"insert into Candidates (candidate_id, skill, proficiency) values ('102', 'PostgreSQL', '4')",
"insert into Candidates (candidate_id, skill, proficiency) values ('102', 'R', '4')",
"insert into Candidates (candidate_id, skill, proficiency) values ('103', 'Python', '3')",
"insert into Candidates (candidate_id, skill, proficiency) values ('103', 'Tableau', '5')",
"insert into Candidates (candidate_id, skill, proficiency) values ('103', 'PostgreSQL', '5')",
"insert into Candidates (candidate_id, skill, proficiency) values ('103', 'Spark', '4')",
"Truncate table Projects",
"insert into Projects (project_id, skill, importance) values ('501', 'Python', '4')",
"insert into Projects (project_id, skill, importance) values ('501', 'Tableau', '3')",
"insert into Projects (project_id, skill, importance) values ('501', 'PostgreSQL', '5')",
"insert into Projects (project_id, skill, importance) values ('502', 'Python', '3')",
"insert into Projects (project_id, skill, importance) values ('502', 'Tableau', '4')",
"insert into Projects (project_id, skill, importance) values ('502', 'R', '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>\"],\"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\":{\"Candidates\":[\"candidate_id\",\"skill\",\"proficiency\"],\"Projects\":[\"project_id\",\"skill\",\"importance\"]},\"rows\":{\"Candidates\":[[101,\"Python\",5],[101,\"Tableau\",3],[101,\"PostgreSQL\",4],[101,\"TensorFlow\",2],[102,\"Python\",4],[102,\"Tableau\",5],[102,\"PostgreSQL\",4],[102,\"R\",4],[103,\"Python\",3],[103,\"Tableau\",5],[103,\"PostgreSQL\",5],[103,\"Spark\",4]],\"Projects\":[[501,\"Python\",4],[501,\"Tableau\",3],[501,\"PostgreSQL\",5],[502,\"Python\",3],[502,\"Tableau\",4],[502,\"R\",2]]}}",
"__typename": "QuestionNode"
}
}
}

View File

@@ -0,0 +1,71 @@
{
"data": {
"question": {
"questionId": "3650",
"questionFrontendId": "3328",
"categoryTitle": "Database",
"boundTopicId": 2958682,
"title": "Find Cities in Each State II",
"titleSlug": "find-cities-in-each-state-ii",
"content": null,
"translatedTitle": "查找每个州的城市 II",
"translatedContent": null,
"isPaidOnly": true,
"difficulty": "Medium",
"likes": 0,
"dislikes": 0,
"isLiked": null,
"similarQuestions": "[]",
"contributors": [],
"langToValidPlayground": null,
"topicTags": [
{
"name": "Database",
"slug": "database",
"translatedName": "数据库",
"__typename": "TopicTagNode"
}
],
"companyTagStats": null,
"codeSnippets": null,
"stats": "{\"totalAccepted\": \"58\", \"totalSubmission\": \"81\", \"totalAcceptedRaw\": 58, \"totalSubmissionRaw\": 81, \"acRate\": \"71.6%\"}",
"hints": [],
"solution": null,
"status": null,
"sampleTestCase": "{\"headers\":{\"cities\":[\"state\",\"city\"]},\"rows\":{\"cities\":[[\"New York\",\"New York City\"],[\"New York\",\"Newark\"],[\"New York\",\"Buffalo\"],[\"New York\",\"Rochester\"],[\"California\",\"San Francisco\"],[\"California\",\"Sacramento\"],[\"California\",\"San Diego\"],[\"California\",\"Los Angeles\"],[\"Texas\",\"Tyler\"],[\"Texas\",\"Temple\"],[\"Texas\",\"Taylor\"],[\"Texas\",\"Dallas\"],[\"Pennsylvania\",\"Philadelphia\"],[\"Pennsylvania\",\"Pittsburgh\"],[\"Pennsylvania\",\"Pottstown\"]]}}",
"metaData": "{\"mysql\":[\"Create table if not exists cities( state varchar(100),city varchar(100))\"],\"mssql\":[\"Create table cities( state varchar(100),city varchar(100))\"],\"oraclesql\":[\"Create table cities( state varchar2(100),city varchar2(100))\"],\"database\":true,\"name\":\"state_city_analysis\",\"postgresql\":[\"CREATE TABLE IF NOT EXISTS cities (\\n state VARCHAR(100),\\n city VARCHAR(100)\\n);\\n\"],\"pythondata\":[\"cities = pd.DataFrame({\\n 'state': pd.Series(dtype='str'),\\n 'city': pd.Series(dtype='str')\\n})\"],\"database_schema\":{\"cities\":{\"state\":\"VARCHAR(100)\",\"city\":\"VARCHAR(100)\"}}}",
"judgerAvailable": true,
"judgeType": "large",
"mysqlSchemas": [
"Create table if not exists cities( state varchar(100),city varchar(100))",
"Truncate table cities",
"insert into cities (state, city) values ('New York', 'New York City')",
"insert into cities (state, city) values ('New York', 'Newark')",
"insert into cities (state, city) values ('New York', 'Buffalo')",
"insert into cities (state, city) values ('New York', 'Rochester')",
"insert into cities (state, city) values ('California', 'San Francisco')",
"insert into cities (state, city) values ('California', 'Sacramento')",
"insert into cities (state, city) values ('California', 'San Diego')",
"insert into cities (state, city) values ('California', 'Los Angeles')",
"insert into cities (state, city) values ('Texas', 'Tyler')",
"insert into cities (state, city) values ('Texas', 'Temple')",
"insert into cities (state, city) values ('Texas', 'Taylor')",
"insert into cities (state, city) values ('Texas', 'Dallas')",
"insert into cities (state, city) values ('Pennsylvania', 'Philadelphia')",
"insert into cities (state, city) values ('Pennsylvania', 'Pittsburgh')",
"insert into cities (state, city) values ('Pennsylvania', 'Pottstown')"
],
"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\":{\"cities\":[\"state\",\"city\"]},\"rows\":{\"cities\":[[\"New York\",\"New York City\"],[\"New York\",\"Newark\"],[\"New York\",\"Buffalo\"],[\"New York\",\"Rochester\"],[\"California\",\"San Francisco\"],[\"California\",\"Sacramento\"],[\"California\",\"San Diego\"],[\"California\",\"Los Angeles\"],[\"Texas\",\"Tyler\"],[\"Texas\",\"Temple\"],[\"Texas\",\"Taylor\"],[\"Texas\",\"Dallas\"],[\"Pennsylvania\",\"Philadelphia\"],[\"Pennsylvania\",\"Pittsburgh\"],[\"Pennsylvania\",\"Pottstown\"]]}}",
"__typename": "QuestionNode"
}
}
}

View File

@@ -0,0 +1,58 @@
{
"data": {
"question": {
"questionId": "3505",
"questionFrontendId": "3198",
"categoryTitle": "Database",
"boundTopicId": 2821350,
"title": "Find Cities in Each State",
"titleSlug": "find-cities-in-each-state",
"content": null,
"translatedTitle": null,
"translatedContent": null,
"isPaidOnly": true,
"difficulty": "Easy",
"likes": 0,
"dislikes": 0,
"isLiked": null,
"similarQuestions": "[]",
"contributors": [],
"langToValidPlayground": null,
"topicTags": [],
"companyTagStats": null,
"codeSnippets": null,
"stats": "{\"totalAccepted\": \"2\", \"totalSubmission\": \"3\", \"totalAcceptedRaw\": 2, \"totalSubmissionRaw\": 3, \"acRate\": \"66.7%\"}",
"hints": [],
"solution": null,
"status": null,
"sampleTestCase": "{\"headers\":{\"cities\":[\"state\",\"city\"]},\"rows\":{\"cities\":[[\"California\",\"Los Angeles\"],[\"California\",\"San Francisco\"],[\"California\",\"San Diego\"],[\"Texas\",\"Houston\"],[\"Texas\",\"Austin\"],[\"Texas\",\"Dallas\"],[\"New York\",\"New York City\"],[\"New York\",\"Buffalo\"],[\"New York\",\"Rochester\"]]}}",
"metaData": "{\"mysql\":[\"Create table if not exists cities( state varchar(100),city varchar(100))\"],\"mssql\":[\"Create table cities( state varchar(100),city varchar(100))\"],\"oraclesql\":[\"Create table cities( state varchar2(100),city varchar2(100))\"],\"database\":true,\"name\":\"find_cities\",\"postgresql\":[\"CREATE TABLE IF NOT EXISTS cities (\\n state VARCHAR(100),\\n city VARCHAR(100)\\n);\"],\"pythondata\":[\"cities = pd.DataFrame(columns=['state', 'city'])\"],\"database_schema\":{\"cities\":{\"state\":\"VARCHAR(100)\",\"city\":\"VARCHAR(100)\"}}}",
"judgerAvailable": true,
"judgeType": "large",
"mysqlSchemas": [
"Create table if not exists cities( state varchar(100),city varchar(100))",
"Truncate table cities",
"insert into cities (state, city) values ('California', 'Los Angeles')",
"insert into cities (state, city) values ('California', 'San Francisco')",
"insert into cities (state, city) values ('California', 'San Diego')",
"insert into cities (state, city) values ('Texas', 'Houston')",
"insert into cities (state, city) values ('Texas', 'Austin')",
"insert into cities (state, city) values ('Texas', 'Dallas')",
"insert into cities (state, city) values ('New York', 'New York City')",
"insert into cities (state, city) values ('New York', 'Buffalo')",
"insert into cities (state, city) values ('New York', 'Rochester')"
],
"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\":{\"cities\":[\"state\",\"city\"]},\"rows\":{\"cities\":[[\"California\",\"Los Angeles\"],[\"California\",\"San Francisco\"],[\"California\",\"San Diego\"],[\"Texas\",\"Houston\"],[\"Texas\",\"Austin\"],[\"Texas\",\"Dallas\"],[\"New York\",\"New York City\"],[\"New York\",\"Buffalo\"],[\"New York\",\"Rochester\"]]}}",
"__typename": "QuestionNode"
}
}
}

View File

@@ -0,0 +1,62 @@
{
"data": {
"question": {
"questionId": "3585",
"questionFrontendId": "3268",
"categoryTitle": "Database",
"boundTopicId": 2895162,
"title": "Find Overlapping Shifts II",
"titleSlug": "find-overlapping-shifts-ii",
"content": null,
"translatedTitle": "查找重叠的班次 II",
"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\": \"90\", \"totalSubmission\": \"127\", \"totalAcceptedRaw\": 90, \"totalSubmissionRaw\": 127, \"acRate\": \"70.9%\"}",
"hints": [],
"solution": null,
"status": null,
"sampleTestCase": "{\"headers\": {\"EmployeeShifts\":[\"employee_id\",\"start_time\",\"end_time\"]},\"rows\":{\"EmployeeShifts\":[[1,\"2023-10-01 09:00:00\",\"2023-10-01 17:00:00\"],[1,\"2023-10-01 15:00:00\",\"2023-10-01 23:00:00\"],[1,\"2023-10-01 16:00:00\",\"2023-10-02 00:00:00\"],[2,\"2023-10-01 09:00:00\",\"2023-10-01 17:00:00\"],[2,\"2023-10-01 11:00:00\",\"2023-10-01 19:00:00\"],[3,\"2023-10-01 09:00:00\",\"2023-10-01 17:00:00\"]]}}",
"metaData": "{\"mysql\":[\"Create table if not exists EmployeeShifts(employee_id int, start_time datetime, end_time datetime)\"],\"mssql\":[\"Create table EmployeeShifts(employee_id int, start_time datetime, end_time datetime)\"],\"oraclesql\":[\"Create table EmployeeShifts(employee_id number, start_time date, end_time date)\",\"ALTER SESSION SET nls_date_format='YYYY-MM-DD HH24:MI:SS'\"],\"database\":true,\"name\":\"calculate_shift_overlaps\",\"postgresql\":[\"CREATE TABLE IF NOT EXISTS EmployeeShifts (\\n employee_id INT,\\n start_time TIMESTAMP,\\n end_time TIMESTAMP\\n);\\n\"],\"pythondata\":[\"EmployeeShifts = pd.DataFrame({\\n 'employee_id': pd.Series(dtype='int'),\\n 'start_time': pd.Series(dtype='datetime64[ns]'),\\n 'end_time': pd.Series(dtype='datetime64[ns]')\\n})\"],\"database_schema\":{\"EmployeeShifts\":{\"employee_id\":\"INT\",\"start_time\":\"DATETIME\",\"end_time\":\"DATETIME\"}}}",
"judgerAvailable": true,
"judgeType": "large",
"mysqlSchemas": [
"Create table if not exists EmployeeShifts(employee_id int, start_time datetime, end_time datetime)",
"Truncate table EmployeeShifts",
"insert into EmployeeShifts (employee_id, start_time, end_time) values ('1', '2023-10-01 09:00:00', '2023-10-01 17:00:00')",
"insert into EmployeeShifts (employee_id, start_time, end_time) values ('1', '2023-10-01 15:00:00', '2023-10-01 23:00:00')",
"insert into EmployeeShifts (employee_id, start_time, end_time) values ('1', '2023-10-01 16:00:00', '2023-10-02 00:00:00')",
"insert into EmployeeShifts (employee_id, start_time, end_time) values ('2', '2023-10-01 09:00:00', '2023-10-01 17:00:00')",
"insert into EmployeeShifts (employee_id, start_time, end_time) values ('2', '2023-10-01 11:00:00', '2023-10-01 19:00:00')",
"insert into EmployeeShifts (employee_id, start_time, end_time) values ('3', '2023-10-01 09:00:00', '2023-10-01 17: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\": {\"EmployeeShifts\":[\"employee_id\",\"start_time\",\"end_time\"]},\"rows\":{\"EmployeeShifts\":[[1,\"2023-10-01 09:00:00\",\"2023-10-01 17:00:00\"],[1,\"2023-10-01 15:00:00\",\"2023-10-01 23:00:00\"],[1,\"2023-10-01 16:00:00\",\"2023-10-02 00:00:00\"],[2,\"2023-10-01 09:00:00\",\"2023-10-01 17:00:00\"],[2,\"2023-10-01 11:00:00\",\"2023-10-01 19:00:00\"],[3,\"2023-10-01 09:00:00\",\"2023-10-01 17:00:00\"]]}}",
"__typename": "QuestionNode"
}
}
}

View File

@@ -0,0 +1,59 @@
{
"data": {
"question": {
"questionId": "3574",
"questionFrontendId": "3262",
"categoryTitle": "Database",
"boundTopicId": 2887671,
"title": "Find Overlapping Shifts",
"titleSlug": "find-overlapping-shifts",
"content": null,
"translatedTitle": "查找重叠的班次",
"translatedContent": null,
"isPaidOnly": true,
"difficulty": "Medium",
"likes": 0,
"dislikes": 0,
"isLiked": null,
"similarQuestions": "[]",
"contributors": [],
"langToValidPlayground": null,
"topicTags": [],
"companyTagStats": null,
"codeSnippets": null,
"stats": "{\"totalAccepted\": \"49\", \"totalSubmission\": \"67\", \"totalAcceptedRaw\": 49, \"totalSubmissionRaw\": 67, \"acRate\": \"73.1%\"}",
"hints": [],
"solution": null,
"status": null,
"sampleTestCase": "{\"headers\":{\"EmployeeShifts\":[\"employee_id\",\"start_time\",\"end_time\"]},\"rows\":{\"EmployeeShifts\":[[1,\"08:00:00\",\"12:00:00\"],[1,\"11:00:00\",\"15:00:00\"],[1,\"14:00:00\",\"18:00:00\"],[2,\"09:00:00\",\"17:00:00\"],[2,\"16:00:00\",\"20:00:00\"],[3,\"10:00:00\",\"12:00:00\"],[3,\"13:00:00\",\"15:00:00\"],[3,\"16:00:00\",\"18:00:00\"],[4,\"08:00:00\",\"10:00:00\"],[4,\"09:00:00\",\"11:00:00\"]]}}",
"metaData": "{\"mysql\":[\"Create table if not exists EmployeeShifts(employee_id int, start_time time, end_time time)\"],\"mssql\":[\"Create table EmployeeShifts(employee_id int, start_time time, end_time time)\"],\"oraclesql\":[\"Create table EmployeeShifts(employee_id number, start_time date, end_time date)\",\"ALTER SESSION SET nls_date_format='HH24:MI:SS'\"],\"database\":true,\"name\":\"find_overlapping_shifts\",\"pythondata\":[\"EmployeeShifts = pd.DataFrame({\\n 'employee_id': pd.Series(dtype='int'),\\n 'start_time': pd.Series(dtype='datetime64[ns]'),\\n 'end_time': pd.Series(dtype='datetime64[ns]')\\n})\"],\"postgresql\":[\"CREATE TABLE IF NOT EXISTS EmployeeShifts (\\n employee_id INT,\\n start_time TIME,\\n end_time TIME\\n);\\n\"],\"database_schema\":{\"EmployeeShifts\":{\"employee_id\":\"INT\",\"start_time\":\"TIME\",\"end_time\":\"TIME\"}}}",
"judgerAvailable": true,
"judgeType": "large",
"mysqlSchemas": [
"Create table if not exists EmployeeShifts(employee_id int, start_time time, end_time time)",
"Truncate table EmployeeShifts",
"insert into EmployeeShifts (employee_id, start_time, end_time) values ('1', '08:00:00', '12:00:00')",
"insert into EmployeeShifts (employee_id, start_time, end_time) values ('1', '11:00:00', '15:00:00')",
"insert into EmployeeShifts (employee_id, start_time, end_time) values ('1', '14:00:00', '18:00:00')",
"insert into EmployeeShifts (employee_id, start_time, end_time) values ('2', '09:00:00', '17:00:00')",
"insert into EmployeeShifts (employee_id, start_time, end_time) values ('2', '16:00:00', '20:00:00')",
"insert into EmployeeShifts (employee_id, start_time, end_time) values ('3', '10:00:00', '12:00:00')",
"insert into EmployeeShifts (employee_id, start_time, end_time) values ('3', '13:00:00', '15:00:00')",
"insert into EmployeeShifts (employee_id, start_time, end_time) values ('3', '16:00:00', '18:00:00')",
"insert into EmployeeShifts (employee_id, start_time, end_time) values ('4', '08:00:00', '10:00:00')",
"insert into EmployeeShifts (employee_id, start_time, end_time) values ('4', '09:00:00', '11: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\":{\"EmployeeShifts\":[\"employee_id\",\"start_time\",\"end_time\"]},\"rows\":{\"EmployeeShifts\":[[1,\"08:00:00\",\"12:00:00\"],[1,\"11:00:00\",\"15:00:00\"],[1,\"14:00:00\",\"18:00:00\"],[2,\"09:00:00\",\"17:00:00\"],[2,\"16:00:00\",\"20:00:00\"],[3,\"10:00:00\",\"12:00:00\"],[3,\"13:00:00\",\"15:00:00\"],[3,\"16:00:00\",\"18:00:00\"],[4,\"08:00:00\",\"10:00:00\"],[4,\"09:00:00\",\"11:00:00\"]]}}",
"__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,72 @@
{
"data": {
"question": {
"questionId": "3624",
"questionFrontendId": "3308",
"categoryTitle": "Database",
"boundTopicId": 2935114,
"title": "Find Top Performing Driver",
"titleSlug": "find-top-performing-driver",
"content": null,
"translatedTitle": null,
"translatedContent": null,
"isPaidOnly": true,
"difficulty": "Medium",
"likes": 0,
"dislikes": 0,
"isLiked": null,
"similarQuestions": "[]",
"contributors": [],
"langToValidPlayground": null,
"topicTags": [
{
"name": "Database",
"slug": "database",
"translatedName": "数据库",
"__typename": "TopicTagNode"
}
],
"companyTagStats": null,
"codeSnippets": null,
"stats": "{\"totalAccepted\": \"40\", \"totalSubmission\": \"66\", \"totalAcceptedRaw\": 40, \"totalSubmissionRaw\": 66, \"acRate\": \"60.6%\"}",
"hints": [],
"solution": null,
"status": null,
"sampleTestCase": "{\"headers\":{\"Drivers\":[\"driver_id\",\"name\",\"age\",\"experience\",\"accidents\"],\"Vehicles\":[\"vehicle_id\",\"driver_id\",\"model\",\"fuel_type\",\"mileage\"],\"Trips\":[\"trip_id\",\"vehicle_id\",\"distance\",\"duration\",\"rating\"]},\"rows\":{\"Drivers\":[[1,\"Alice\",34,10,1],[2,\"Bob\",45,20,3],[3,\"Charlie\",28,5,0]],\"Vehicles\":[[100,1,\"Sedan\",\"Gasoline\",20000],[101,2,\"SUV\",\"Electric\",30000],[102,3,\"Coupe\",\"Gasoline\",15000]],\"Trips\":[[201,100,50,30,5],[202,100,30,20,4],[203,101,100,60,4],[204,101,80,50,5],[205,102,40,30,5],[206,102,60,40,5]]}}",
"metaData": "{\"mysql\":[\"CREATE TABLE If not exists Drivers (\\n driver_id INT ,\\n name VARCHAR(100),\\n age INT,\\n experience INT,\\n accidents INT\\n)\",\"CREATE TABLE If not exists Vehicles (\\n vehicle_id INT ,\\n driver_id INT,\\n model VARCHAR(100),\\n fuel_type VARCHAR(50),\\n mileage INT)\",\"CREATE TABLE If not exists Trips (\\n trip_id INT ,\\n vehicle_id INT,\\n distance INT,\\n duration INT,\\n rating INT\\n)\"],\"mssql\":[\"CREATE TABLE Drivers (\\n driver_id INT,\\n name NVARCHAR(100),\\n age INT,\\n experience INT,\\n accidents INT\\n)\",\"CREATE TABLE Vehicles (\\n vehicle_id INT,\\n driver_id INT,\\n model NVARCHAR(100),\\n fuel_type NVARCHAR(50),\\n mileage INT\\n)\",\"CREATE TABLE Trips (\\n trip_id INT,\\n vehicle_id INT,\\n distance INT,\\n duration INT,\\n rating INT CHECK (rating BETWEEN 1 AND 5)\\n)\"],\"oraclesql\":[\"CREATE TABLE Drivers (\\n driver_id NUMBER,\\n name VARCHAR2(100),\\n age NUMBER,\\n experience NUMBER,\\n accidents NUMBER\\n)\",\"CREATE TABLE Vehicles (\\n vehicle_id NUMBER,\\n driver_id NUMBER,\\n model VARCHAR2(100),\\n fuel_type VARCHAR2(50),\\n mileage NUMBER\\n)\",\"\\nCREATE TABLE Trips (\\n trip_id NUMBER,\\n vehicle_id NUMBER,\\n distance NUMBER,\\n duration NUMBER,\\n rating NUMBER )\"],\"database\":true,\"name\":\"get_top_performing_drivers\",\"pythondata\":[\"Drivers = pd.DataFrame({\\n 'driver_id': pd.Series(dtype='int'),\\n 'name': pd.Series(dtype='str'),\\n 'age': pd.Series(dtype='int'),\\n 'experience': pd.Series(dtype='int'),\\n 'accidents': pd.Series(dtype='int')\\n})\",\"Vehicles = pd.DataFrame({\\n 'vehicle_id': pd.Series(dtype='int'),\\n 'driver_id': pd.Series(dtype='int'),\\n 'model': pd.Series(dtype='str'),\\n 'fuel_type': pd.Series(dtype='str'),\\n 'mileage': pd.Series(dtype='int')\\n})\",\"Trips = pd.DataFrame({\\n 'trip_id': pd.Series(dtype='int'),\\n 'vehicle_id': pd.Series(dtype='int'),\\n 'distance': pd.Series(dtype='int'),\\n 'duration': pd.Series(dtype='int'),\\n 'rating': pd.Series(dtype='int')\\n})\"],\"postgresql\":[\"CREATE TABLE Drivers (\\n driver_id SERIAL PRIMARY KEY,\\n name VARCHAR(100),\\n age INT,\\n experience INT,\\n accidents INT\\n);\\n\",\"CREATE TABLE Vehicles (\\n vehicle_id SERIAL PRIMARY KEY,\\n driver_id INT,\\n model VARCHAR(100),\\n fuel_type VARCHAR(50),\\n mileage INT\\n);\\n\",\"CREATE TABLE Trips (\\n trip_id SERIAL PRIMARY KEY,\\n vehicle_id INT,\\n distance INT,\\n duration INT,\\n rating INT CHECK (rating BETWEEN 1 AND 5)\\n);\\n\",\"TRUNCATE TABLE Vehicles, Drivers;\\n\"],\"database_schema\":{\"Drivers\":{\"driver_id\":\"INT\",\"name\":\"VARCHAR(100)\",\"age\":\"INT\",\"experience\":\"INT\",\"accidents\":\"INT\"},\"Vehicles\":{\"vehicle_id\":\"INT\",\"driver_id\":\"INT\",\"model\":\"VARCHAR(100)\",\"fuel_type\":\"VARCHAR(50)\",\"mileage\":\"INT\"},\"Trips\":{\"trip_id\":\"INT\",\"vehicle_id\":\"INT\",\"distance\":\"INT\",\"duration\":\"INT\",\"rating\":\"INT\"}}}",
"judgerAvailable": true,
"judgeType": "large",
"mysqlSchemas": [
"CREATE TABLE If not exists Drivers (\n driver_id INT ,\n name VARCHAR(100),\n age INT,\n experience INT,\n accidents INT\n)",
"CREATE TABLE If not exists Vehicles (\n vehicle_id INT ,\n driver_id INT,\n model VARCHAR(100),\n fuel_type VARCHAR(50),\n mileage INT)",
"CREATE TABLE If not exists Trips (\n trip_id INT ,\n vehicle_id INT,\n distance INT,\n duration INT,\n rating INT\n)",
"Truncate table Drivers",
"insert into Drivers (driver_id, name, age, experience, accidents) values ('1', 'Alice', '34', '10', '1')",
"insert into Drivers (driver_id, name, age, experience, accidents) values ('2', 'Bob', '45', '20', '3')",
"insert into Drivers (driver_id, name, age, experience, accidents) values ('3', 'Charlie', '28', '5', '0')",
"Truncate table Vehicles",
"insert into Vehicles (vehicle_id, driver_id, model, fuel_type, mileage) values ('100', '1', 'Sedan', 'Gasoline', '20000')",
"insert into Vehicles (vehicle_id, driver_id, model, fuel_type, mileage) values ('101', '2', 'SUV', 'Electric', '30000')",
"insert into Vehicles (vehicle_id, driver_id, model, fuel_type, mileage) values ('102', '3', 'Coupe', 'Gasoline', '15000')",
"Truncate table Trips",
"insert into Trips (trip_id, vehicle_id, distance, duration, rating) values ('201', '100', '50', '30', '5')",
"insert into Trips (trip_id, vehicle_id, distance, duration, rating) values ('202', '100', '30', '20', '4')",
"insert into Trips (trip_id, vehicle_id, distance, duration, rating) values ('203', '101', '100', '60', '4')",
"insert into Trips (trip_id, vehicle_id, distance, duration, rating) values ('204', '101', '80', '50', '5')",
"insert into Trips (trip_id, vehicle_id, distance, duration, rating) values ('205', '102', '40', '30', '5')",
"insert into Trips (trip_id, vehicle_id, distance, duration, rating) values ('206', '102', '60', '40', '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>\"],\"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\":{\"Drivers\":[\"driver_id\",\"name\",\"age\",\"experience\",\"accidents\"],\"Vehicles\":[\"vehicle_id\",\"driver_id\",\"model\",\"fuel_type\",\"mileage\"],\"Trips\":[\"trip_id\",\"vehicle_id\",\"distance\",\"duration\",\"rating\"]},\"rows\":{\"Drivers\":[[1,\"Alice\",34,10,1],[2,\"Bob\",45,20,3],[3,\"Charlie\",28,5,0]],\"Vehicles\":[[100,1,\"Sedan\",\"Gasoline\",20000],[101,2,\"SUV\",\"Electric\",30000],[102,3,\"Coupe\",\"Gasoline\",15000]],\"Trips\":[[201,100,50,30,5],[202,100,30,20,4],[203,101,100,60,4],[204,101,80,50,5],[205,102,40,30,5],[206,102,60,40,5]]}}",
"__typename": "QuestionNode"
}
}
}

View File

@@ -0,0 +1,77 @@
{
"data": {
"question": {
"questionId": "3503",
"questionFrontendId": "3188",
"categoryTitle": "Database",
"boundTopicId": 2814944,
"title": "Find Top Scoring Students II",
"titleSlug": "find-top-scoring-students-ii",
"content": null,
"translatedTitle": "查找得分最高的学生 II",
"translatedContent": null,
"isPaidOnly": true,
"difficulty": "Hard",
"likes": 0,
"dislikes": 0,
"isLiked": null,
"similarQuestions": "[]",
"contributors": [],
"langToValidPlayground": null,
"topicTags": [],
"companyTagStats": null,
"codeSnippets": null,
"stats": "{\"totalAccepted\": \"57\", \"totalSubmission\": \"106\", \"totalAcceptedRaw\": 57, \"totalSubmissionRaw\": 106, \"acRate\": \"53.8%\"}",
"hints": [],
"solution": null,
"status": null,
"sampleTestCase": "{\"headers\":{\"students\":[\"student_id\",\"name\",\"major\"],\"courses\":[\"course_id\",\"name\",\"credits\",\"major\",\"mandatory\"],\"enrollments\":[\"student_id\",\"course_id\",\"semester\",\"grade\",\"GPA\"]},\"rows\":{\"students\":[[1,\"Alice\",\"Computer Science\"],[2,\"Bob\",\"Computer Science\"],[3,\"Charlie\",\"Mathematics\"],[4,\"David\",\"Mathematics\"]],\"courses\":[[101,\"Algorithms\",3,\"Computer Science\",\"Yes\"],[102,\"Data Structures\",3,\"Computer Science\",\"Yes\"],[103,\"Calculus\",4,\"Mathematics\",\"Yes\"],[104,\"Linear Algebra\",4,\"Mathematics\",\"Yes\"],[105,\"Machine Learning\",3,\"Computer Science\",\"No\"],[106,\"Probability\",3,\"Mathematics\",\"No\"],[107,\"Operating Systems\",3,\"Computer Science\",\"No\"],[108,\"Statistics\",3,\"Mathematics\",\"No\"]],\"enrollments\":[[1,101,\"Fall 2023\",\"A\",4.0],[1,102,\"Spring 2023\",\"A\",4.0],[1,105,\"Spring 2023\",\"A\",4.0],[1,107,\"Fall 2023\",\"B\",3.5],[2,101,\"Fall 2023\",\"A\",4.0],[2,102,\"Spring 2023\",\"B\",3.0],[3,103,\"Fall 2023\",\"A\",4.0],[3,104,\"Spring 2023\",\"A\",4.0],[3,106,\"Spring 2023\",\"A\",4.0],[3,108,\"Fall 2023\",\"B\",3.5],[4,103,\"Fall 2023\",\"B\",3.0],[4,104,\"Spring 2023\",\"B\",3.0]]}}",
"metaData": "{\"mysql\":[\"CREATE TABLE if not exists students (\\n student_id INT ,\\n name VARCHAR(255),\\n major VARCHAR(255)\\n)\",\"CREATE TABLE if not exists courses (\\n course_id INT ,\\n name VARCHAR(255),\\n credits INT,\\n major VARCHAR(255),\\n mandatory ENUM('yes', 'no') DEFAULT 'no'\\n)\",\"CREATE TABLE if not exists enrollments (\\n student_id INT,\\n course_id INT,\\n semester VARCHAR(255),\\n grade VARCHAR(10),\\nGPA decimal(3,2)\\n\\n);\"],\"mssql\":[\"CREATE TABLE students (\\n student_id INT ,\\n name VARCHAR(255),\\n major VARCHAR(255)\\n)\",\"CREATE TABLE courses (\\n course_id INT PRIMARY KEY,\\n name VARCHAR(255),\\n credits INT,\\n major VARCHAR(255),\\n mandatory VARCHAR(3) CHECK (mandatory IN ('yes', 'no')) DEFAULT 'no'\\n)\",\"CREATE TABLE enrollments (\\n student_id INT,\\n course_id INT,\\n semester VARCHAR(255),\\n grade VARCHAR(1),\\n GPA DECIMAL(3,2)\\n)\"],\"oraclesql\":[\"CREATE TABLE students (\\n student_id NUMBER ,\\n name VARCHAR2(255),\\n major VARCHAR2(255)\\n)\",\"CREATE TABLE courses (\\n course_id NUMBER ,\\n name VARCHAR2(255),\\n credits NUMBER,\\n major VARCHAR2(255),\\n mandatory VARCHAR2(3) CHECK (mandatory IN ('Yes', 'No')) \\n)\",\"CREATE TABLE enrollments (\\n student_id NUMBER,\\n course_id NUMBER,\\n semester VARCHAR2(255),\\n grade VARCHAR2(1),\\n GPA Number (3,2)\\n)\"],\"database\":true,\"name\":\"find_top_scoring_students\",\"pythondata\":[\"students = pd.DataFrame([], columns=['student_id', 'name', 'major']).astype({\\n 'student_id': 'Int64', # Nullable integer type for student_id\\n 'name': 'string', # String type for names\\n 'major': 'string' # String type for majors\\n})\",\"courses = pd.DataFrame([], columns=['course_id', 'name', 'credits', 'major', 'mandatory']).astype({'course_id': 'Int64', 'name': 'string', 'credits': 'Int64', 'major': 'string', 'mandatory': 'string'})\\n\\n # pd.CategoricalDtype(categories=['yes', 'no'])\\n\",\"enrollments = pd.DataFrame([], columns=['student_id', 'course_id', 'semester', 'grade', 'GPA']).astype({'student_id': 'Int64', 'course_id': 'Int64', 'semester': 'string', 'grade': 'string', 'GPA': 'float'})\\n\"],\"postgresql\":[\"CREATE TABLE IF NOT EXISTS students (\\n student_id SERIAL,\\n name VARCHAR(255),\\n major VARCHAR(255)\\n);\",\"CREATE TABLE courses (\\n course_id INTEGER, -- or SERIAL if you want auto-increment\\n name VARCHAR(255),\\n credits INTEGER, -- or NUMERIC if you need decimal places\\n major VARCHAR(255),\\n mandatory VARCHAR(3) CHECK (mandatory IN ('Yes', 'No'))\\n);\\n\",\"CREATE TABLE IF NOT EXISTS enrollments (\\n student_id INT,\\n course_id INT,\\n semester VARCHAR(255),\\n grade VARCHAR(10),\\n GPA NUMERIC(3,2)\\n);\\n\"],\"database_schema\":{\"students\":{\"student_id\":\"INT\",\"name\":\"VARCHAR(255)\",\"major\":\"VARCHAR(255)\"},\"courses\":{\"course_id\":\"INT\",\"name\":\"VARCHAR(255)\",\"credits\":\"INT\",\"major\":\"VARCHAR(255)\",\"mandatory\":\"ENUM('yes', 'no')\"},\"enrollments\":{\"student_id\":\"INT\",\"course_id\":\"INT\",\"semester\":\"VARCHAR(255)\",\"grade\":\"VARCHAR(10)\",\"GPA\":\"DECIMAL(3, 2)\"}}}",
"judgerAvailable": true,
"judgeType": "large",
"mysqlSchemas": [
"CREATE TABLE if not exists students (\n student_id INT ,\n name VARCHAR(255),\n major VARCHAR(255)\n)",
"CREATE TABLE if not exists courses (\n course_id INT ,\n name VARCHAR(255),\n credits INT,\n major VARCHAR(255),\n mandatory ENUM('yes', 'no') DEFAULT 'no'\n)",
"CREATE TABLE if not exists enrollments (\n student_id INT,\n course_id INT,\n semester VARCHAR(255),\n grade VARCHAR(10),\nGPA decimal(3,2)\n\n);",
"Truncate table students",
"insert into students (student_id, name, major) values ('1', 'Alice', 'Computer Science')",
"insert into students (student_id, name, major) values ('2', 'Bob', 'Computer Science')",
"insert into students (student_id, name, major) values ('3', 'Charlie', 'Mathematics')",
"insert into students (student_id, name, major) values ('4', 'David', 'Mathematics')",
"Truncate table courses",
"insert into courses (course_id, name, credits, major, mandatory) values ('101', 'Algorithms', '3', 'Computer Science', 'Yes')",
"insert into courses (course_id, name, credits, major, mandatory) values ('102', 'Data Structures', '3', 'Computer Science', 'Yes')",
"insert into courses (course_id, name, credits, major, mandatory) values ('103', 'Calculus', '4', 'Mathematics', 'Yes')",
"insert into courses (course_id, name, credits, major, mandatory) values ('104', 'Linear Algebra', '4', 'Mathematics', 'Yes')",
"insert into courses (course_id, name, credits, major, mandatory) values ('105', 'Machine Learning', '3', 'Computer Science', 'No')",
"insert into courses (course_id, name, credits, major, mandatory) values ('106', 'Probability', '3', 'Mathematics', 'No')",
"insert into courses (course_id, name, credits, major, mandatory) values ('107', 'Operating Systems', '3', 'Computer Science', 'No')",
"insert into courses (course_id, name, credits, major, mandatory) values ('108', 'Statistics', '3', 'Mathematics', 'No')",
"Truncate table enrollments",
"insert into enrollments (student_id, course_id, semester, grade, GPA) values ('1', '101', 'Fall 2023', 'A', '4.0')",
"insert into enrollments (student_id, course_id, semester, grade, GPA) values ('1', '102', 'Spring 2023', 'A', '4.0')",
"insert into enrollments (student_id, course_id, semester, grade, GPA) values ('1', '105', 'Spring 2023', 'A', '4.0')",
"insert into enrollments (student_id, course_id, semester, grade, GPA) values ('1', '107', 'Fall 2023', 'B', '3.5')",
"insert into enrollments (student_id, course_id, semester, grade, GPA) values ('2', '101', 'Fall 2023', 'A', '4.0')",
"insert into enrollments (student_id, course_id, semester, grade, GPA) values ('2', '102', 'Spring 2023', 'B', '3.0')",
"insert into enrollments (student_id, course_id, semester, grade, GPA) values ('3', '103', 'Fall 2023', 'A', '4.0')",
"insert into enrollments (student_id, course_id, semester, grade, GPA) values ('3', '104', 'Spring 2023', 'A', '4.0')",
"insert into enrollments (student_id, course_id, semester, grade, GPA) values ('3', '106', 'Spring 2023', 'A', '4.0')",
"insert into enrollments (student_id, course_id, semester, grade, GPA) values ('3', '108', 'Fall 2023', 'B', '3.5')",
"insert into enrollments (student_id, course_id, semester, grade, GPA) values ('4', '103', 'Fall 2023', 'B', '3.0')",
"insert into enrollments (student_id, course_id, semester, grade, GPA) values ('4', '104', 'Spring 2023', 'B', '3.0')"
],
"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\":{\"students\":[\"student_id\",\"name\",\"major\"],\"courses\":[\"course_id\",\"name\",\"credits\",\"major\",\"mandatory\"],\"enrollments\":[\"student_id\",\"course_id\",\"semester\",\"grade\",\"GPA\"]},\"rows\":{\"students\":[[1,\"Alice\",\"Computer Science\"],[2,\"Bob\",\"Computer Science\"],[3,\"Charlie\",\"Mathematics\"],[4,\"David\",\"Mathematics\"]],\"courses\":[[101,\"Algorithms\",3,\"Computer Science\",\"Yes\"],[102,\"Data Structures\",3,\"Computer Science\",\"Yes\"],[103,\"Calculus\",4,\"Mathematics\",\"Yes\"],[104,\"Linear Algebra\",4,\"Mathematics\",\"Yes\"],[105,\"Machine Learning\",3,\"Computer Science\",\"No\"],[106,\"Probability\",3,\"Mathematics\",\"No\"],[107,\"Operating Systems\",3,\"Computer Science\",\"No\"],[108,\"Statistics\",3,\"Mathematics\",\"No\"]],\"enrollments\":[[1,101,\"Fall 2023\",\"A\",4.0],[1,102,\"Spring 2023\",\"A\",4.0],[1,105,\"Spring 2023\",\"A\",4.0],[1,107,\"Fall 2023\",\"B\",3.5],[2,101,\"Fall 2023\",\"A\",4.0],[2,102,\"Spring 2023\",\"B\",3.0],[3,103,\"Fall 2023\",\"A\",4.0],[3,104,\"Spring 2023\",\"A\",4.0],[3,106,\"Spring 2023\",\"A\",4.0],[3,108,\"Fall 2023\",\"B\",3.5],[4,103,\"Fall 2023\",\"B\",3.0],[4,104,\"Spring 2023\",\"B\",3.0]]}}",
"__typename": "QuestionNode"
}
}
}

View File

@@ -0,0 +1,76 @@
{
"data": {
"question": {
"questionId": "3488",
"questionFrontendId": "3182",
"categoryTitle": "Database",
"boundTopicId": 2805903,
"title": "Find Top Scoring Students",
"titleSlug": "find-top-scoring-students",
"content": null,
"translatedTitle": "查找得分最高的学生",
"translatedContent": null,
"isPaidOnly": true,
"difficulty": "Medium",
"likes": 0,
"dislikes": 0,
"isLiked": null,
"similarQuestions": "[]",
"contributors": [],
"langToValidPlayground": null,
"topicTags": [
{
"name": "Database",
"slug": "database",
"translatedName": "数据库",
"__typename": "TopicTagNode"
}
],
"companyTagStats": null,
"codeSnippets": null,
"stats": "{\"totalAccepted\": \"66\", \"totalSubmission\": \"131\", \"totalAcceptedRaw\": 66, \"totalSubmissionRaw\": 131, \"acRate\": \"50.4%\"}",
"hints": [],
"solution": null,
"status": null,
"sampleTestCase": "{\"headers\":{\"students\":[\"student_id\",\"name\",\"major\"],\"courses\":[\"course_id\",\"name\",\"credits\",\"major\"],\"enrollments\":[\"student_id\",\"course_id\",\"semester\",\"grade\"]},\"rows\":{\"students\":[[1,\"Alice\",\"Computer Science\"],[2,\"Bob\",\"Computer Science\"],[3,\"Charlie\",\"Mathematics\"],[4,\"David\",\"Mathematics\"]],\"courses\":[[101,\"Algorithms\",3,\"Computer Science\"],[102,\"Data Structures\",3,\"Computer Science\"],[103,\"Calculus\",4,\"Mathematics\"],[104,\"Linear Algebra\",4,\"Mathematics\"]],\"enrollments\":[[1,101,\"Fall 2023\",\"A\"],[1,102,\"Fall 2023\",\"A\"],[2,101,\"Fall 2023\",\"B\"],[2,102,\"Fall 2023\",\"A\"],[3,103,\"Fall 2023\",\"A\"],[3,104,\"Fall 2023\",\"A\"],[4,103,\"Fall 2023\",\"A\"],[4,104,\"Fall 2023\",\"B\"]]}}",
"metaData": "{\"mysql\":[\"CREATE TABLE if not exists students (\\n student_id INT ,\\n name VARCHAR(255),\\n major VARCHAR(255)\\n)\",\"CREATE TABLE if not exists courses (\\n course_id INT ,\\n name VARCHAR(255),\\n credits INT,\\n major VARCHAR(255)\\n)\\n\",\"CREATE TABLE if not exists enrollments (\\n student_id INT,\\n course_id INT,\\n semester VARCHAR(255),\\n grade VARCHAR(10)\\n\\n);\"],\"mssql\":[\"CREATE TABLE students (\\n student_id INT ,\\n name VARCHAR(255),\\n major VARCHAR(255)\\n)\",\"CREATE TABLE courses (\\n course_id INT ,\\n name VARCHAR(255),\\n credits INT,\\n major VARCHAR(255)\\n)\\n\",\"CREATE TABLE enrollments (\\n student_id INT,\\n course_id INT,\\n semester VARCHAR(255),\\n grade VARCHAR(10)\\n\\n);\"],\"oraclesql\":[\"CREATE TABLE students (\\n student_id NUMBER ,\\n name VARCHAR2(255),\\n major VARCHAR2(255)\\n)\",\"CREATE TABLE courses (\\n course_id NUMBER,\\n name VARCHAR2(255),\\n credits NUMBER,\\n major VARCHAR2(255)\\n)\",\"CREATE TABLE enrollments (\\n student_id NUMBER,\\n course_id NUMBER,\\n semester VARCHAR2(255),\\n grade VARCHAR2(10) \\n \\n)\"],\"database\":true,\"name\":\"find_top_scoring_students\",\"pythondata\":[\"enrollments = pd.DataFrame([], columns=['student_id', 'course_id', 'semester', 'grade']).astype({\\n 'student_id': 'Int64', # Nullable integer type\\n 'course_id': 'Int64', # Nullable integer type\\n 'semester': 'object', # Object type for arbitrary strings\\n 'grade': 'object' # Object type for arbitrary strings\\n})\",\"students = pd.DataFrame([], columns=['student_id', 'name', 'major']).astype({\\n 'student_id': 'Int64', # Nullable integer type\\n 'name': 'object', # Object type for arbitrary strings, equivalent to VARCHAR\\n 'major': 'object' # Object type for arbitrary strings, equivalent to VARCHAR\\n})\",\"courses = pd.DataFrame([], columns=['course_id', 'name', 'credits', 'major']).astype({\\n 'course_id': 'Int64', # Nullable integer type\\n 'name': 'object', # Object type for arbitrary strings, equivalent to VARCHAR\\n 'credits': 'Int64', # Nullable integer type\\n 'major': 'object' # Object type for arbitrary strings, equivalent to VARCHAR\\n})\"],\"postgresql\":[\"CREATE TABLE IF NOT EXISTS students (\\n student_id INT,\\n name VARCHAR(255),\\n major VARCHAR(255)\\n);\\n\",\"CREATE TABLE IF NOT EXISTS courses (\\n course_id INT,\\n name VARCHAR(255),\\n credits INT,\\n major VARCHAR(255)\\n);\\n\",\"CREATE TABLE IF NOT EXISTS enrollments (\\n student_id INT,\\n course_id INT,\\n semester VARCHAR(255),\\n grade VARCHAR(10)\\n);\\n\"],\"database_schema\":{\"students\":{\"student_id\":\"INT\",\"name\":\"VARCHAR(255)\",\"major\":\"VARCHAR(255)\"},\"courses\":{\"course_id\":\"INT\",\"name\":\"VARCHAR(255)\",\"credits\":\"INT\",\"major\":\"VARCHAR(255)\"},\"enrollments\":{\"student_id\":\"INT\",\"course_id\":\"INT\",\"semester\":\"VARCHAR(255)\",\"grade\":\"VARCHAR(10)\"}}}",
"judgerAvailable": true,
"judgeType": "large",
"mysqlSchemas": [
"CREATE TABLE if not exists students (\n student_id INT ,\n name VARCHAR(255),\n major VARCHAR(255)\n)",
"CREATE TABLE if not exists courses (\n course_id INT ,\n name VARCHAR(255),\n credits INT,\n major VARCHAR(255)\n)\n",
"CREATE TABLE if not exists enrollments (\n student_id INT,\n course_id INT,\n semester VARCHAR(255),\n grade VARCHAR(10)\n\n);",
"Truncate table students",
"insert into students (student_id, name, major) values ('1', 'Alice', 'Computer Science')",
"insert into students (student_id, name, major) values ('2', 'Bob', 'Computer Science')",
"insert into students (student_id, name, major) values ('3', 'Charlie', 'Mathematics')",
"insert into students (student_id, name, major) values ('4', 'David', 'Mathematics')",
"Truncate table courses",
"insert into courses (course_id, name, credits, major) values ('101', 'Algorithms', '3', 'Computer Science')",
"insert into courses (course_id, name, credits, major) values ('102', 'Data Structures', '3', 'Computer Science')",
"insert into courses (course_id, name, credits, major) values ('103', 'Calculus', '4', 'Mathematics')",
"insert into courses (course_id, name, credits, major) values ('104', 'Linear Algebra', '4', 'Mathematics')",
"Truncate table enrollments",
"insert into enrollments (student_id, course_id, semester, grade) values ('1', '101', 'Fall 2023', 'A')",
"insert into enrollments (student_id, course_id, semester, grade) values ('1', '102', 'Fall 2023', 'A')",
"insert into enrollments (student_id, course_id, semester, grade) values ('2', '101', 'Fall 2023', 'B')",
"insert into enrollments (student_id, course_id, semester, grade) values ('2', '102', 'Fall 2023', 'A')",
"insert into enrollments (student_id, course_id, semester, grade) values ('3', '103', 'Fall 2023', 'A')",
"insert into enrollments (student_id, course_id, semester, grade) values ('3', '104', 'Fall 2023', 'A')",
"insert into enrollments (student_id, course_id, semester, grade) values ('4', '103', 'Fall 2023', 'A')",
"insert into enrollments (student_id, course_id, semester, grade) values ('4', '104', 'Fall 2023', 'B')"
],
"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\":{\"students\":[\"student_id\",\"name\",\"major\"],\"courses\":[\"course_id\",\"name\",\"credits\",\"major\"],\"enrollments\":[\"student_id\",\"course_id\",\"semester\",\"grade\"]},\"rows\":{\"students\":[[1,\"Alice\",\"Computer Science\"],[2,\"Bob\",\"Computer Science\"],[3,\"Charlie\",\"Mathematics\"],[4,\"David\",\"Mathematics\"]],\"courses\":[[101,\"Algorithms\",3,\"Computer Science\"],[102,\"Data Structures\",3,\"Computer Science\"],[103,\"Calculus\",4,\"Mathematics\"],[104,\"Linear Algebra\",4,\"Mathematics\"]],\"enrollments\":[[1,101,\"Fall 2023\",\"A\"],[1,102,\"Fall 2023\",\"A\"],[2,101,\"Fall 2023\",\"B\"],[2,102,\"Fall 2023\",\"A\"],[3,103,\"Fall 2023\",\"A\"],[3,104,\"Fall 2023\",\"A\"],[4,103,\"Fall 2023\",\"A\"],[4,104,\"Fall 2023\",\"B\"]]}}",
"__typename": "QuestionNode"
}
}
}

View File

@@ -0,0 +1,53 @@
{
"data": {
"question": {
"questionId": "3703",
"questionFrontendId": "3368",
"categoryTitle": "Database",
"boundTopicId": 2999592,
"title": "First Letter Capitalization",
"titleSlug": "first-letter-capitalization",
"content": null,
"translatedTitle": "首字母大写",
"translatedContent": null,
"isPaidOnly": true,
"difficulty": "Hard",
"likes": 0,
"dislikes": 0,
"isLiked": null,
"similarQuestions": "[]",
"contributors": [],
"langToValidPlayground": null,
"topicTags": [],
"companyTagStats": null,
"codeSnippets": null,
"stats": "{\"totalAccepted\": \"32\", \"totalSubmission\": \"34\", \"totalAcceptedRaw\": 32, \"totalSubmissionRaw\": 34, \"acRate\": \"94.1%\"}",
"hints": [],
"solution": null,
"status": null,
"sampleTestCase": "{\"headers\":{\"user_content\":[\"content_id\",\"content_text\"]},\"rows\":{\"user_content\":[[1,\"hello world of SQL\"],[2,\"the QUICK brown fox\"],[3,\"data science AND machine learning\"],[4,\"TOP rated programming BOOKS\"]]}}",
"metaData": "{\"mysql\":[\"CREATE TABLE If not exists user_content (\\n content_id INT,\\n content_text VARCHAR(255)\\n)\"],\"mssql\":[\"CREATE TABLE user_content (\\n content_id INT,\\n content_text VARCHAR(255)\\n)\"],\"oraclesql\":[\"CREATE TABLE user_content (\\n content_id NUMBER,\\n content_text VARCHAR2(255)\\n)\"],\"database\":true,\"name\":\"process_text\",\"postgresql\":[\"CREATE TABLE IF NOT EXISTS user_content (\\n content_id SERIAL PRIMARY KEY,\\n content_text VARCHAR(255)\\n);\\n\"],\"pythondata\":[\"user_content = pd.DataFrame({\\n 'content_id': pd.Series(dtype='int'),\\n 'content_text': pd.Series(dtype='str')\\n})\"],\"database_schema\":{\"user_content\":{\"content_id\":\"INT\",\"content_text\":\"VARCHAR(255)\"}}}",
"judgerAvailable": true,
"judgeType": "large",
"mysqlSchemas": [
"CREATE TABLE If not exists user_content (\n content_id INT,\n content_text VARCHAR(255)\n)",
"Truncate table user_content",
"insert into user_content (content_id, content_text) values ('1', 'hello world of SQL')",
"insert into user_content (content_id, content_text) values ('2', 'the QUICK brown fox')",
"insert into user_content (content_id, content_text) values ('3', 'data science AND machine learning')",
"insert into user_content (content_id, content_text) values ('4', 'TOP rated programming BOOKS')"
],
"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.2.2 and NumPy 1.26.4<\\/p>\"],\"postgresql\":[\"PostgreSQL\",\"<p>PostgreSQL 16<\\/p>\"]}",
"book": null,
"isSubscribed": false,
"isDailyQuestion": false,
"dailyRecordStatus": null,
"editorType": "CKEDITOR",
"ugcQuestionId": null,
"style": "LEETCODE",
"exampleTestcases": "{\"headers\":{\"user_content\":[\"content_id\",\"content_text\"]},\"rows\":{\"user_content\":[[1,\"hello world of SQL\"],[2,\"the QUICK brown fox\"],[3,\"data science AND machine learning\"],[4,\"TOP rated programming BOOKS\"]]}}",
"__typename": "QuestionNode"
}
}
}

View File

@@ -0,0 +1,76 @@
{
"data": {
"question": {
"questionId": "3726",
"questionFrontendId": "3390",
"categoryTitle": "Database",
"boundTopicId": 3021381,
"title": "Longest Team Pass Streak",
"titleSlug": "longest-team-pass-streak",
"content": null,
"translatedTitle": null,
"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\": \"13\", \"totalSubmission\": \"22\", \"totalAcceptedRaw\": 13, \"totalSubmissionRaw\": 22, \"acRate\": \"59.1%\"}",
"hints": [],
"solution": null,
"status": null,
"sampleTestCase": "{\"headers\":{\"Teams\":[\"player_id\",\"team_name\"],\"Passes\":[\"pass_from\",\"time_stamp\",\"pass_to\"]},\"rows\":{\"Teams\":[[1,\"Arsenal\"],[2,\"Arsenal\"],[3,\"Arsenal\"],[4,\"Arsenal\"],[5,\"Chelsea\"],[6,\"Chelsea\"],[7,\"Chelsea\"],[8,\"Chelsea\"]],\"Passes\":[[1,\"00:05\",2],[2,\"00:07\",3],[3,\"00:08\",4],[4,\"00:10\",5],[6,\"00:15\",7],[7,\"00:17\",8],[8,\"00:20\",6],[6,\"00:22\",5],[1,\"00:25\",2],[2,\"00:27\",3]]}}",
"metaData": "{\"mysql\":[\"CREATE TABLE If not exists Teams (\\n player_id INT,\\n team_name VARCHAR(100)\\n)\\n\\n\",\"CREATE TABLE if not exists Passes (\\n pass_from INT,\\n time_stamp VARCHAR(5),\\n pass_to INT\\n)\"],\"mssql\":[\"CREATE TABLE Teams (\\n player_id INT,\\n team_name VARCHAR(100)\\n)\\n\",\"\\nCREATE TABLE Passes (\\n pass_from INT,\\n time_stamp VARCHAR(5),\\n pass_to INT\\n)\"],\"oraclesql\":[\"CREATE TABLE Teams (\\n player_id NUMBER,\\n team_name VARCHAR2(100)\\n)\\n\\n\",\"CREATE TABLE Passes (\\n pass_from NUMBER,\\n time_stamp VARCHAR2(5),\\n pass_to NUMBER\\n)\"],\"database\":true,\"name\":\"calculate_longest_streaks\",\"pythondata\":[\"Teams = pd.DataFrame(columns=[\\\"player_id\\\", \\\"team_name\\\"]).astype({\\\"player_id\\\": \\\"int\\\", \\\"team_name\\\": \\\"string\\\"})\\n\",\"Passes = pd.DataFrame(columns=[\\\"pass_from\\\", \\\"time_stamp\\\", \\\"pass_to\\\"]).astype({\\\"pass_from\\\": \\\"int\\\", \\\"time_stamp\\\": \\\"string\\\", \\\"pass_to\\\": \\\"int\\\"})\\n\"],\"postgresql\":[\"CREATE TABLE IF NOT EXISTS Teams (\\n player_id INTEGER,\\n team_name VARCHAR(100)\\n);\\n\",\"CREATE TABLE IF NOT EXISTS Passes (\\n pass_from INTEGER,\\n time_stamp VARCHAR(5),\\n pass_to INTEGER\\n);\\n\"],\"database_schema\":{\"Teams\":{\"player_id\":\"INT\",\"team_name\":\"VARCHAR(100)\"},\"Passes\":{\"pass_from\":\"INT\",\"time_stamp\":\"VARCHAR(5)\",\"pass_to\":\"INT\"}}}",
"judgerAvailable": true,
"judgeType": "large",
"mysqlSchemas": [
"CREATE TABLE If not exists Teams (\n player_id INT,\n team_name VARCHAR(100)\n)\n\n",
"CREATE TABLE if not exists Passes (\n pass_from INT,\n time_stamp VARCHAR(5),\n pass_to INT\n)",
"Truncate table Teams",
"insert into Teams (player_id, team_name) values ('1', 'Arsenal')",
"insert into Teams (player_id, team_name) values ('2', 'Arsenal')",
"insert into Teams (player_id, team_name) values ('3', 'Arsenal')",
"insert into Teams (player_id, team_name) values ('4', 'Arsenal')",
"insert into Teams (player_id, team_name) values ('5', 'Chelsea')",
"insert into Teams (player_id, team_name) values ('6', 'Chelsea')",
"insert into Teams (player_id, team_name) values ('7', 'Chelsea')",
"insert into Teams (player_id, team_name) values ('8', 'Chelsea')",
"Truncate table Passes",
"insert into Passes (pass_from, time_stamp, pass_to) values ('1', '00:05', '2')",
"insert into Passes (pass_from, time_stamp, pass_to) values ('2', '00:07', '3')",
"insert into Passes (pass_from, time_stamp, pass_to) values ('3', '00:08', '4')",
"insert into Passes (pass_from, time_stamp, pass_to) values ('4', '00:10', '5')",
"insert into Passes (pass_from, time_stamp, pass_to) values ('6', '00:15', '7')",
"insert into Passes (pass_from, time_stamp, pass_to) values ('7', '00:17', '8')",
"insert into Passes (pass_from, time_stamp, pass_to) values ('8', '00:20', '6')",
"insert into Passes (pass_from, time_stamp, pass_to) values ('6', '00:22', '5')",
"insert into Passes (pass_from, time_stamp, pass_to) values ('1', '00:25', '2')",
"insert into Passes (pass_from, time_stamp, pass_to) values ('2', '00:27', '3')"
],
"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.2.2 and NumPy 1.26.4<\\/p>\"],\"postgresql\":[\"PostgreSQL\",\"<p>PostgreSQL 16<\\/p>\"]}",
"book": null,
"isSubscribed": false,
"isDailyQuestion": false,
"dailyRecordStatus": null,
"editorType": "CKEDITOR",
"ugcQuestionId": null,
"style": "LEETCODE",
"exampleTestcases": "{\"headers\":{\"Teams\":[\"player_id\",\"team_name\"],\"Passes\":[\"pass_from\",\"time_stamp\",\"pass_to\"]},\"rows\":{\"Teams\":[[1,\"Arsenal\"],[2,\"Arsenal\"],[3,\"Arsenal\"],[4,\"Arsenal\"],[5,\"Chelsea\"],[6,\"Chelsea\"],[7,\"Chelsea\"],[8,\"Chelsea\"]],\"Passes\":[[1,\"00:05\",2],[2,\"00:07\",3],[3,\"00:08\",4],[4,\"00:10\",5],[6,\"00:15\",7],[7,\"00:17\",8],[8,\"00:20\",6],[6,\"00:22\",5],[1,\"00:25\",2],[2,\"00:27\",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

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,66 @@
{
"data": {
"question": {
"questionId": "3564",
"questionFrontendId": "3252",
"categoryTitle": "Database",
"boundTopicId": 2876919,
"title": "Premier League Table Ranking II",
"titleSlug": "premier-league-table-ranking-ii",
"content": null,
"translatedTitle": "英超积分榜排名 II",
"translatedContent": null,
"isPaidOnly": true,
"difficulty": "Medium",
"likes": 0,
"dislikes": 0,
"isLiked": null,
"similarQuestions": "[]",
"contributors": [],
"langToValidPlayground": null,
"topicTags": [
{
"name": "Database",
"slug": "database",
"translatedName": "数据库",
"__typename": "TopicTagNode"
}
],
"companyTagStats": null,
"codeSnippets": null,
"stats": "{\"totalAccepted\": \"90\", \"totalSubmission\": \"146\", \"totalAcceptedRaw\": 90, \"totalSubmissionRaw\": 146, \"acRate\": \"61.6%\"}",
"hints": [],
"solution": null,
"status": null,
"sampleTestCase": "{\"headers\": {\"TeamStats\": [\"team_id\", \"team_name\", \"matches_played\", \"wins\", \"draws\", \"losses\"]}, \"rows\": {\"TeamStats\": [[1, \"Chelsea\", 22, 13, 2, 7], [2, \"Nottingham Forest\", 27, 6, 6, 15], [3, \"Liverpool\", 17, 1, 8, 8], [4, \"Aston Villa\", 20, 1, 6, 13], [5, \"Fulham\", 31, 18, 1, 12], [6, \"Burnley\", 26, 6, 9, 11], [7, \"Newcastle United\", 33, 11, 10, 12], [8, \"Sheffield United\", 20, 18, 2, 0], [9, \"Luton Town\", 5, 4, 0, 1], [10, \"Everton\", 14, 2, 6, 6]]}}",
"metaData": "{\"mysql\":[\"Create table if not exists TeamStats( team_id int, team_name varchar(100),matches_played int, wins int,draws int,losses int)\"],\"mssql\":[\"Create table TeamStats( team_id int, team_name varchar(100),matches_played int, wins int,draws int,losses int)\"],\"oraclesql\":[\"Create table TeamStats( team_id NUMBER, team_name varchar2(100),matches_played NUMBER, wins NUMBER,draws NUMBER,losses NUMBER)\"],\"postgresql\":[\"CREATE TABLE IF NOT EXISTS TeamStats (\\n team_id INT,\\n team_name VARCHAR(100),\\n matches_played INT,\\n wins INT,\\n draws INT,\\n losses INT\\n);\\n\"],\"pythondata\":[\"TeamStats = pd.DataFrame(data, columns=[\\\"team_id\\\", \\\"team_name\\\", \\\"matches_played\\\", \\\"wins\\\", \\\"draws\\\", \\\"losses\\\"]).astype({\\\"team_id\\\": \\\"int\\\", \\\"team_name\\\": \\\"string\\\", \\\"matches_played\\\": \\\"int\\\", \\\"wins\\\": \\\"int\\\", \\\"draws\\\": \\\"int\\\", \\\"losses\\\": \\\"int\\\"})\\n\"],\"database\":true,\"name\":\"calculate_team_tiers\",\"database_schema\":{\"TeamStats\":{\"team_id\":\"INT\",\"team_name\":\"VARCHAR(100)\",\"matches_played\":\"INT\",\"wins\":\"INT\",\"draws\":\"INT\",\"losses\":\"INT\"}}}",
"judgerAvailable": true,
"judgeType": "large",
"mysqlSchemas": [
"Create table if not exists TeamStats( team_id int, team_name varchar(100),matches_played int, wins int,draws int,losses int)",
"Truncate table TeamStats",
"insert into TeamStats (team_id, team_name, matches_played, wins, draws, losses) values ('1', 'Chelsea', '22', '13', '2', '7')",
"insert into TeamStats (team_id, team_name, matches_played, wins, draws, losses) values ('2', 'Nottingham Forest', '27', '6', '6', '15')",
"insert into TeamStats (team_id, team_name, matches_played, wins, draws, losses) values ('3', 'Liverpool', '17', '1', '8', '8')",
"insert into TeamStats (team_id, team_name, matches_played, wins, draws, losses) values ('4', 'Aston Villa', '20', '1', '6', '13')",
"insert into TeamStats (team_id, team_name, matches_played, wins, draws, losses) values ('5', 'Fulham', '31', '18', '1', '12')",
"insert into TeamStats (team_id, team_name, matches_played, wins, draws, losses) values ('6', 'Burnley', '26', '6', '9', '11')",
"insert into TeamStats (team_id, team_name, matches_played, wins, draws, losses) values ('7', 'Newcastle United', '33', '11', '10', '12')",
"insert into TeamStats (team_id, team_name, matches_played, wins, draws, losses) values ('8', 'Sheffield United', '20', '18', '2', '0')",
"insert into TeamStats (team_id, team_name, matches_played, wins, draws, losses) values ('9', 'Luton Town', '5', '4', '0', '1')",
"insert into TeamStats (team_id, team_name, matches_played, wins, draws, losses) values ('10', 'Everton', '14', '2', '6', '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>\"],\"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\": {\"TeamStats\": [\"team_id\", \"team_name\", \"matches_played\", \"wins\", \"draws\", \"losses\"]}, \"rows\": {\"TeamStats\": [[1, \"Chelsea\", 22, 13, 2, 7], [2, \"Nottingham Forest\", 27, 6, 6, 15], [3, \"Liverpool\", 17, 1, 8, 8], [4, \"Aston Villa\", 20, 1, 6, 13], [5, \"Fulham\", 31, 18, 1, 12], [6, \"Burnley\", 26, 6, 9, 11], [7, \"Newcastle United\", 33, 11, 10, 12], [8, \"Sheffield United\", 20, 18, 2, 0], [9, \"Luton Town\", 5, 4, 0, 1], [10, \"Everton\", 14, 2, 6, 6]]}}",
"__typename": "QuestionNode"
}
}
}

View File

@@ -0,0 +1,66 @@
{
"data": {
"question": {
"questionId": "3642",
"questionFrontendId": "3322",
"categoryTitle": "Database",
"boundTopicId": 2949746,
"title": "Premier League Table Ranking III",
"titleSlug": "premier-league-table-ranking-iii",
"content": null,
"translatedTitle": "英超积分榜排名 III",
"translatedContent": null,
"isPaidOnly": true,
"difficulty": "Medium",
"likes": 0,
"dislikes": 0,
"isLiked": null,
"similarQuestions": "[]",
"contributors": [],
"langToValidPlayground": null,
"topicTags": [
{
"name": "Database",
"slug": "database",
"translatedName": "数据库",
"__typename": "TopicTagNode"
}
],
"companyTagStats": null,
"codeSnippets": null,
"stats": "{\"totalAccepted\": \"84\", \"totalSubmission\": \"104\", \"totalAcceptedRaw\": 84, \"totalSubmissionRaw\": 104, \"acRate\": \"80.8%\"}",
"hints": [],
"solution": null,
"status": null,
"sampleTestCase": "{\"headers\":{\"SeasonStats\":[\"season_id\",\"team_id\",\"team_name\",\"matches_played\",\"wins\",\"draws\",\"losses\",\"goals_for\",\"goals_against\"]},\"rows\":{\"SeasonStats\":[[2021,1,\"Manchester City\",38,29,6,3,99,26],[2021,2,\"Liverpool\",38,28,8,2,94,26],[2021,3,\"Chelsea\",38,21,11,6,76,33],[2021,4,\"Tottenham\",38,22,5,11,69,40],[2021,5,\"Arsenal\",38,22,3,13,61,48],[2022,1,\"Manchester City\",38,28,5,5,94,33],[2022,2,\"Arsenal\",38,26,6,6,88,43],[2022,3,\"Manchester United\",38,23,6,9,58,43],[2022,4,\"Newcastle\",38,19,14,5,68,33],[2022,5,\"Liverpool\",38,19,10,9,75,47]]}}",
"metaData": "{\"mysql\":[\"CREATE TABLE SeasonStats (\\n season_id INT,\\n team_id INT,\\n team_name VARCHAR(255),\\n matches_played INT,\\n wins INT,\\n draws INT,\\n losses INT,\\n goals_for INT,\\n goals_against INT\\n)\"],\"mssql\":[\"CREATE TABLE SeasonStats (\\n season_id INT,\\n team_id INT,\\n team_name NVARCHAR(255),\\n matches_played INT,\\n wins INT,\\n draws INT,\\n losses INT,\\n goals_for INT,\\n goals_against INT\\n)\"],\"oraclesql\":[\"CREATE TABLE SeasonStats (\\n season_id NUMBER,\\n team_id NUMBER,\\n team_name VARCHAR2(255),\\n matches_played NUMBER,\\n wins NUMBER,\\n draws NUMBER,\\n losses NUMBER,\\n goals_for NUMBER,\\n goals_against NUMBER\\n)\"],\"database\":true,\"name\":\"process_team_standings\",\"postgresql\":[\"CREATE TABLE SeasonStats (\\n season_id INTEGER,\\n team_id INTEGER,\\n team_name VARCHAR(255),\\n matches_played INTEGER,\\n wins INTEGER,\\n draws INTEGER,\\n losses INTEGER,\\n goals_for INTEGER,\\n goals_against INTEGER\\n);\\n\"],\"pythondata\":[\"SeasonStats = pd.DataFrame(columns=['season_id', 'team_id', 'team_name', 'matches_played', 'wins', 'draws', 'losses', 'goals_for', 'goals_against'], dtype='int')\\n\"],\"database_schema\":{\"SeasonStats\":{\"season_id\":\"INT\",\"team_id\":\"INT\",\"team_name\":\"VARCHAR(255)\",\"matches_played\":\"INT\",\"wins\":\"INT\",\"draws\":\"INT\",\"losses\":\"INT\",\"goals_for\":\"INT\",\"goals_against\":\"INT\"}}}",
"judgerAvailable": true,
"judgeType": "large",
"mysqlSchemas": [
"CREATE TABLE SeasonStats (\n season_id INT,\n team_id INT,\n team_name VARCHAR(255),\n matches_played INT,\n wins INT,\n draws INT,\n losses INT,\n goals_for INT,\n goals_against INT\n)",
"Truncate table SeasonStats",
"insert into SeasonStats (season_id, team_id, team_name, matches_played, wins, draws, losses, goals_for, goals_against) values ('2021', '1', 'Manchester City', '38', '29', '6', '3', '99', '26')",
"insert into SeasonStats (season_id, team_id, team_name, matches_played, wins, draws, losses, goals_for, goals_against) values ('2021', '2', 'Liverpool', '38', '28', '8', '2', '94', '26')",
"insert into SeasonStats (season_id, team_id, team_name, matches_played, wins, draws, losses, goals_for, goals_against) values ('2021', '3', 'Chelsea', '38', '21', '11', '6', '76', '33')",
"insert into SeasonStats (season_id, team_id, team_name, matches_played, wins, draws, losses, goals_for, goals_against) values ('2021', '4', 'Tottenham', '38', '22', '5', '11', '69', '40')",
"insert into SeasonStats (season_id, team_id, team_name, matches_played, wins, draws, losses, goals_for, goals_against) values ('2021', '5', 'Arsenal', '38', '22', '3', '13', '61', '48')",
"insert into SeasonStats (season_id, team_id, team_name, matches_played, wins, draws, losses, goals_for, goals_against) values ('2022', '1', 'Manchester City', '38', '28', '5', '5', '94', '33')",
"insert into SeasonStats (season_id, team_id, team_name, matches_played, wins, draws, losses, goals_for, goals_against) values ('2022', '2', 'Arsenal', '38', '26', '6', '6', '88', '43')",
"insert into SeasonStats (season_id, team_id, team_name, matches_played, wins, draws, losses, goals_for, goals_against) values ('2022', '3', 'Manchester United', '38', '23', '6', '9', '58', '43')",
"insert into SeasonStats (season_id, team_id, team_name, matches_played, wins, draws, losses, goals_for, goals_against) values ('2022', '4', 'Newcastle', '38', '19', '14', '5', '68', '33')",
"insert into SeasonStats (season_id, team_id, team_name, matches_played, wins, draws, losses, goals_for, goals_against) values ('2022', '5', 'Liverpool', '38', '19', '10', '9', '75', '47')"
],
"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\":{\"SeasonStats\":[\"season_id\",\"team_id\",\"team_name\",\"matches_played\",\"wins\",\"draws\",\"losses\",\"goals_for\",\"goals_against\"]},\"rows\":{\"SeasonStats\":[[2021,1,\"Manchester City\",38,29,6,3,99,26],[2021,2,\"Liverpool\",38,28,8,2,94,26],[2021,3,\"Chelsea\",38,21,11,6,76,33],[2021,4,\"Tottenham\",38,22,5,11,69,40],[2021,5,\"Arsenal\",38,22,3,13,61,48],[2022,1,\"Manchester City\",38,28,5,5,94,33],[2022,2,\"Arsenal\",38,26,6,6,88,43],[2022,3,\"Manchester United\",38,23,6,9,58,43],[2022,4,\"Newcastle\",38,19,14,5,68,33],[2022,5,\"Liverpool\",38,19,10,9,75,47]]}}",
"__typename": "QuestionNode"
}
}
}

View File

@@ -0,0 +1,61 @@
{
"data": {
"question": {
"questionId": "3554",
"questionFrontendId": "3246",
"categoryTitle": "Database",
"boundTopicId": 2869459,
"title": "Premier League Table Ranking",
"titleSlug": "premier-league-table-ranking",
"content": null,
"translatedTitle": "英超积分榜排名",
"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,
"stats": "{\"totalAccepted\": \"32\", \"totalSubmission\": \"35\", \"totalAcceptedRaw\": 32, \"totalSubmissionRaw\": 35, \"acRate\": \"91.4%\"}",
"hints": [],
"solution": null,
"status": null,
"sampleTestCase": "{\"headers\":{\"TeamStats\":[\"team_id\",\"team_name\",\"matches_played\",\"wins\",\"draws\",\"losses\"]},\"rows\":{\"TeamStats\":[[1,\"Manchester City\",10,6,2,2],[2,\"Liverpool\",10,6,2,2],[3,\"Chelsea\",10,5,3,2],[4,\"Arsenal\",10,4,4,2],[5,\"Tottenham\",10,3,5,2]]}}",
"metaData": "{\"mysql\":[\"Create table if not exists TeamStats( team_id int, team_name varchar(100),matches_played int, wins int,draws int,losses int)\"],\"mssql\":[\"Create table TeamStats( team_id int, team_name varchar(100),matches_played int, wins int,draws int,losses int)\"],\"oraclesql\":[\"Create table TeamStats( team_id NUMBER, team_name varchar2(100),matches_played NUMBER, wins NUMBER,draws NUMBER,losses NUMBER)\"],\"database\":true,\"name\":\"calculate_team_standings\",\"postgresql\":[\"CREATE TABLE IF NOT EXISTS TeamStats (\\n team_id INT,\\n team_name VARCHAR(100),\\n matches_played INT,\\n wins INT,\\n draws INT,\\n losses INT\\n);\\n\"],\"pythondata\":[\"TeamStats = pd.DataFrame(data, columns=[\\\"team_id\\\", \\\"team_name\\\", \\\"matches_played\\\", \\\"wins\\\", \\\"draws\\\", \\\"losses\\\"]).astype({\\\"team_id\\\": \\\"int\\\", \\\"team_name\\\": \\\"string\\\", \\\"matches_played\\\": \\\"int\\\", \\\"wins\\\": \\\"int\\\", \\\"draws\\\": \\\"int\\\", \\\"losses\\\": \\\"int\\\"})\\n\"],\"database_schema\":{\"TeamStats\":{\"team_id\":\"INT\",\"team_name\":\"VARCHAR(100)\",\"matches_played\":\"INT\",\"wins\":\"INT\",\"draws\":\"INT\",\"losses\":\"INT\"}}}",
"judgerAvailable": true,
"judgeType": "large",
"mysqlSchemas": [
"Create table if not exists TeamStats( team_id int, team_name varchar(100),matches_played int, wins int,draws int,losses int)",
"Truncate table TeamStats",
"insert into TeamStats (team_id, team_name, matches_played, wins, draws, losses) values ('1', 'Manchester City', '10', '6', '2', '2')",
"insert into TeamStats (team_id, team_name, matches_played, wins, draws, losses) values ('2', 'Liverpool', '10', '6', '2', '2')",
"insert into TeamStats (team_id, team_name, matches_played, wins, draws, losses) values ('3', 'Chelsea', '10', '5', '3', '2')",
"insert into TeamStats (team_id, team_name, matches_played, wins, draws, losses) values ('4', 'Arsenal', '10', '4', '4', '2')",
"insert into TeamStats (team_id, team_name, matches_played, wins, draws, losses) values ('5', 'Tottenham', '10', '3', '5', '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>\"],\"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\":{\"TeamStats\":[\"team_id\",\"team_name\",\"matches_played\",\"wins\",\"draws\",\"losses\"]},\"rows\":{\"TeamStats\":[[1,\"Manchester City\",10,6,2,2],[2,\"Liverpool\",10,6,2,2],[3,\"Chelsea\",10,5,3,2],[4,\"Arsenal\",10,4,4,2],[5,\"Tottenham\",10,3,5,2]]}}",
"__typename": "QuestionNode"
}
}
}

View File

@@ -0,0 +1,64 @@
{
"data": {
"question": {
"questionId": "3481",
"questionFrontendId": "3172",
"categoryTitle": "Database",
"boundTopicId": 2798976,
"title": "Second Day Verification",
"titleSlug": "second-day-verification",
"content": null,
"translatedTitle": "第二天验证",
"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,
"stats": "{\"totalAccepted\": \"28\", \"totalSubmission\": \"36\", \"totalAcceptedRaw\": 28, \"totalSubmissionRaw\": 36, \"acRate\": \"77.8%\"}",
"hints": [],
"solution": null,
"status": null,
"sampleTestCase": "{\"headers\":{\"emails\":[\"email_id\",\"user_id\",\"signup_date\"],\"texts\":[\"text_id\",\"email_id\",\"signup_action\",\"action_date\"]},\"rows\":{\"emails\":[[125,7771,\"2022-06-14 09:30:00\"],[433,1052,\"2022-07-09 08:15:00\"],[234,7005,\"2022-08-20 10:00:00\"]],\"texts\":[[1,125,\"Verified\",\"2022-06-15 08:30:00\"],[2,433,\"Not Verified\",\"2022-07-10 10:45:00\"],[4,234,\"Verified\",\"2022-08-21 09:30:00\"]]}}",
"metaData": "{\"mysql\":[\"CREATE TABLE If not exists emails (\\n email_id INT,\\n user_id INT,\\n signup_date DATETIME\\n);\",\"CREATE TABLE If not exists texts (\\n text_id INT,\\n email_id INT,\\n signup_action ENUM('Verified', 'Not Verified'),\\n action_date DATETIME\\n);\"],\"mssql\":[\"CREATE TABLE emails (\\n email_id INT,\\n user_id INT,\\n signup_date DATETIME\\n);\",\"CREATE TABLE texts (\\n text_id INT,\\n email_id INT,\\n signup_action VARCHAR(12),\\n action_date DATETIME\\n);\"],\"oraclesql\":[\"CREATE TABLE emails (\\n email_id NUMBER,\\n user_id NUMBER,\\n signup_date DATE\\n)\\n\",\"CREATE TABLE texts (\\n text_id NUMBER,\\n email_id NUMBER,\\n signup_action VARCHAR(32),\\n action_date DATE\\n)\",\"ALTER SESSION SET nls_date_format='YYYY-MM-DD HH24:MI:SS'\"],\"database\":true,\"name\":\"find_second_day_signups\",\"postgresql\":[\"CREATE TABLE emails (\\n email_id INTEGER,\\n user_id INTEGER,\\n signup_date DATE\\n);\\n\",\"CREATE TABLE texts (\\n text_id INTEGER,\\n email_id INTEGER,\\n signup_action VARCHAR(32),\\n action_date DATE\\n);\\n\",\"SELECT to_char(action_date, 'YYYY-MM-DD HH24:MI:SS') FROM texts;\\n\"],\"pythondata\":[\"emails = pd.DataFrame([], columns=['email_id', 'user_id', 'signup_date']).astype({\\n 'email_id': 'Int64', # Nullable integer type\\n 'user_id': 'Int64', # Nullable integer type\\n 'signup_date': 'datetime64[ns]' # DateTime type for signup date\\n})\",\"texts = pd.DataFrame([], columns=['text_id', 'email_id', 'signup_action', 'action_date']).astype({\\n 'text_id': 'Int64', # Nullable integer type for text_id\\n 'email_id': 'Int64', # Nullable integer type for email_id\\n 'signup_action': 'object', # Using 'object' to store string values for ENUM\\n 'action_date': 'datetime64[ns]' # DateTime type for action_date\\n})\"],\"database_schema\":{\"emails\":{\"email_id\":\"INT\",\"user_id\":\"INT\",\"signup_date\":\"DATETIME\"},\"texts\":{\"text_id\":\"INT\",\"email_id\":\"INT\",\"signup_action\":\"ENUM('Verified', 'Not Verified')\",\"action_date\":\"DATETIME\"}}}",
"judgerAvailable": true,
"judgeType": "large",
"mysqlSchemas": [
"CREATE TABLE If not exists emails (\n email_id INT,\n user_id INT,\n signup_date DATETIME\n);",
"CREATE TABLE If not exists texts (\n text_id INT,\n email_id INT,\n signup_action ENUM('Verified', 'Not Verified'),\n action_date DATETIME\n);",
"Truncate table emails",
"insert into emails (email_id, user_id, signup_date) values ('125', '7771', '2022-06-14 09:30:00')",
"insert into emails (email_id, user_id, signup_date) values ('433', '1052', '2022-07-09 08:15:00')",
"insert into emails (email_id, user_id, signup_date) values ('234', '7005', '2022-08-20 10:00:00')",
"Truncate table texts",
"insert into texts (text_id, email_id, signup_action, action_date) values ('1', '125', 'Verified', '2022-06-15 08:30:00')",
"insert into texts (text_id, email_id, signup_action, action_date) values ('2', '433', 'Not Verified', '2022-07-10 10:45:00')",
"insert into texts (text_id, email_id, signup_action, action_date) values ('4', '234', 'Verified', '2022-08-21 09:30: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\":{\"emails\":[\"email_id\",\"user_id\",\"signup_date\"],\"texts\":[\"text_id\",\"email_id\",\"signup_action\",\"action_date\"]},\"rows\":{\"emails\":[[125,7771,\"2022-06-14 09:30:00\"],[433,1052,\"2022-07-09 08:15:00\"],[234,7005,\"2022-08-20 10:00:00\"]],\"texts\":[[1,125,\"Verified\",\"2022-06-15 08:30:00\"],[2,433,\"Not Verified\",\"2022-07-10 10:45:00\"],[4,234,\"Verified\",\"2022-08-21 09:30:00\"]]}}",
"__typename": "QuestionNode"
}
}
}

View File

@@ -0,0 +1,66 @@
{
"data": {
"question": {
"questionId": "3660",
"questionFrontendId": "3338",
"categoryTitle": "Database",
"boundTopicId": 2968919,
"title": "Second Highest Salary II",
"titleSlug": "second-highest-salary-ii",
"content": null,
"translatedTitle": "第二高的薪水 II",
"translatedContent": null,
"isPaidOnly": true,
"difficulty": "Medium",
"likes": 0,
"dislikes": 0,
"isLiked": null,
"similarQuestions": "[]",
"contributors": [],
"langToValidPlayground": null,
"topicTags": [
{
"name": "Database",
"slug": "database",
"translatedName": "数据库",
"__typename": "TopicTagNode"
}
],
"companyTagStats": null,
"codeSnippets": null,
"stats": "{\"totalAccepted\": \"60\", \"totalSubmission\": \"65\", \"totalAcceptedRaw\": 60, \"totalSubmissionRaw\": 65, \"acRate\": \"92.3%\"}",
"hints": [],
"solution": null,
"status": null,
"sampleTestCase": "{\"headers\":{\"employees\":[\"emp_id\",\"salary\",\"dept\"]},\"rows\":{\"employees\":[[1,70000,\"Sales\"],[2,80000,\"Sales\"],[3,80000,\"Sales\"],[4,90000,\"Sales\"],[5,55000,\"IT\"],[6,65000,\"IT\"],[7,65000,\"IT\"],[8,50000,\"Marketing\"],[9,55000,\"Marketing\"],[10,55000,\"HR\"]]}}",
"metaData": "{\"mysql\":[\"Create table if not exists Employees (\\n emp_id int,\\n salary int,\\n dept varchar(50)\\n)\"],\"mssql\":[\"Create table Employees (\\n emp_id int,\\n salary int,\\n dept varchar(50)\\n)\"],\"oraclesql\":[\"Create table Employees (\\n emp_id number,\\n salary number,\\n dept varchar2(50)\\n)\"],\"database\":true,\"name\":\"find_second_highest_salary\",\"postgresql\":[\"CREATE TABLE IF NOT EXISTS Employees (\\n emp_id INT,\\n salary INT,\\n dept VARCHAR(50)\\n);\\n\"],\"pythondata\":[\"employees = pd.DataFrame({\\n 'emp_id': pd.Series(dtype='int'),\\n 'salary': pd.Series(dtype='int'),\\n 'dept': pd.Series(dtype='string')\\n})\"],\"database_schema\":{\"Employees\":{\"emp_id\":\"INT\",\"salary\":\"INT\",\"dept\":\"VARCHAR(50)\"}}}",
"judgerAvailable": true,
"judgeType": "large",
"mysqlSchemas": [
"Create table if not exists Employees (\n emp_id int,\n salary int,\n dept varchar(50)\n)",
"Truncate table employees",
"insert into employees (emp_id, salary, dept) values ('1', '70000', 'Sales')",
"insert into employees (emp_id, salary, dept) values ('2', '80000', 'Sales')",
"insert into employees (emp_id, salary, dept) values ('3', '80000', 'Sales')",
"insert into employees (emp_id, salary, dept) values ('4', '90000', 'Sales')",
"insert into employees (emp_id, salary, dept) values ('5', '55000', 'IT')",
"insert into employees (emp_id, salary, dept) values ('6', '65000', 'IT')",
"insert into employees (emp_id, salary, dept) values ('7', '65000', 'IT')",
"insert into employees (emp_id, salary, dept) values ('8', '50000', 'Marketing')",
"insert into employees (emp_id, salary, dept) values ('9', '55000', 'Marketing')",
"insert into employees (emp_id, salary, dept) values ('10', '55000', 'HR')"
],
"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\":{\"employees\":[\"emp_id\",\"salary\",\"dept\"]},\"rows\":{\"employees\":[[1,70000,\"Sales\"],[2,80000,\"Sales\"],[3,80000,\"Sales\"],[4,90000,\"Sales\"],[5,55000,\"IT\"],[6,65000,\"IT\"],[7,65000,\"IT\"],[8,50000,\"Marketing\"],[9,55000,\"Marketing\"],[10,55000,\"HR\"]]}}",
"__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,72 @@
{
"data": {
"question": {
"questionId": "3719",
"questionFrontendId": "3384",
"categoryTitle": "Database",
"boundTopicId": 3014613,
"title": "Team Dominance by Pass Success",
"titleSlug": "team-dominance-by-pass-success",
"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\": \"44\", \"totalSubmission\": \"52\", \"totalAcceptedRaw\": 44, \"totalSubmissionRaw\": 52, \"acRate\": \"84.6%\"}",
"hints": [],
"solution": null,
"status": null,
"sampleTestCase": "{\"headers\":{\"Teams\":[\"player_id\",\"team_name\"],\"Passes\":[\"pass_from\",\"time_stamp\",\"pass_to\"]},\"rows\":{\"Teams\":[[1,\"Arsenal\"],[2,\"Arsenal\"],[3,\"Arsenal\"],[4,\"Chelsea\"],[5,\"Chelsea\"],[6,\"Chelsea\"]],\"Passes\":[[1,\"00:15\",2],[2,\"00:45\",3],[3,\"01:15\",1],[4,\"00:30\",1],[2,\"46:00\",3],[3,\"46:15\",4],[1,\"46:45\",2],[5,\"46:30\",6]]}}",
"metaData": "{\"mysql\":[\"CREATE TABLE If not exists Teams (\\n player_id INT,\\n team_name VARCHAR(100)\\n)\\n\\n\",\"CREATE TABLE if not exists Passes (\\n pass_from INT,\\n time_stamp VARCHAR(5),\\n pass_to INT\\n)\"],\"mssql\":[\"CREATE TABLE Teams (\\n player_id INT,\\n team_name VARCHAR(100)\\n)\\n\",\"\\nCREATE TABLE Passes (\\n pass_from INT,\\n time_stamp VARCHAR(5),\\n pass_to INT\\n)\"],\"oraclesql\":[\"CREATE TABLE Teams (\\n player_id NUMBER,\\n team_name VARCHAR2(100)\\n)\\n\\n\",\"CREATE TABLE Passes (\\n pass_from NUMBER,\\n time_stamp VARCHAR2(5),\\n pass_to NUMBER\\n)\"],\"database\":true,\"name\":\"calculate_team_dominance\",\"postgresql\":[\"CREATE TABLE IF NOT EXISTS Teams (\\n player_id INTEGER,\\n team_name VARCHAR(100)\\n);\\n\",\"CREATE TABLE IF NOT EXISTS Passes (\\n pass_from INTEGER,\\n time_stamp VARCHAR(5),\\n pass_to INTEGER\\n);\\n\"],\"pythondata\":[\"Teams = pd.DataFrame(columns=[\\\"player_id\\\", \\\"team_name\\\"]).astype({\\\"player_id\\\": \\\"int\\\", \\\"team_name\\\": \\\"string\\\"})\\n\",\"Passes = pd.DataFrame(columns=[\\\"pass_from\\\", \\\"time_stamp\\\", \\\"pass_to\\\"]).astype({\\\"pass_from\\\": \\\"int\\\", \\\"time_stamp\\\": \\\"string\\\", \\\"pass_to\\\": \\\"int\\\"})\\n\"],\"database_schema\":{\"Teams\":{\"player_id\":\"INT\",\"team_name\":\"VARCHAR(100)\"},\"Passes\":{\"pass_from\":\"INT\",\"time_stamp\":\"VARCHAR(5)\",\"pass_to\":\"INT\"}}}",
"judgerAvailable": true,
"judgeType": "large",
"mysqlSchemas": [
"CREATE TABLE If not exists Teams (\n player_id INT,\n team_name VARCHAR(100)\n)\n\n",
"CREATE TABLE if not exists Passes (\n pass_from INT,\n time_stamp VARCHAR(5),\n pass_to INT\n)",
"Truncate table Teams",
"insert into Teams (player_id, team_name) values ('1', 'Arsenal')",
"insert into Teams (player_id, team_name) values ('2', 'Arsenal')",
"insert into Teams (player_id, team_name) values ('3', 'Arsenal')",
"insert into Teams (player_id, team_name) values ('4', 'Chelsea')",
"insert into Teams (player_id, team_name) values ('5', 'Chelsea')",
"insert into Teams (player_id, team_name) values ('6', 'Chelsea')",
"Truncate table Passes",
"insert into Passes (pass_from, time_stamp, pass_to) values ('1', '00:15', '2')",
"insert into Passes (pass_from, time_stamp, pass_to) values ('2', '00:45', '3')",
"insert into Passes (pass_from, time_stamp, pass_to) values ('3', '01:15', '1')",
"insert into Passes (pass_from, time_stamp, pass_to) values ('4', '00:30', '1')",
"insert into Passes (pass_from, time_stamp, pass_to) values ('2', '46:00', '3')",
"insert into Passes (pass_from, time_stamp, pass_to) values ('3', '46:15', '4')",
"insert into Passes (pass_from, time_stamp, pass_to) values ('1', '46:45', '2')",
"insert into Passes (pass_from, time_stamp, pass_to) values ('5', '46:30', '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>\"],\"pythondata\":[\"Pandas\",\"<p>Python 3.10 with Pandas 2.2.2 and NumPy 1.26.4<\\/p>\"],\"postgresql\":[\"PostgreSQL\",\"<p>PostgreSQL 16<\\/p>\"]}",
"book": null,
"isSubscribed": false,
"isDailyQuestion": false,
"dailyRecordStatus": null,
"editorType": "CKEDITOR",
"ugcQuestionId": null,
"style": "LEETCODE",
"exampleTestcases": "{\"headers\":{\"Teams\":[\"player_id\",\"team_name\"],\"Passes\":[\"pass_from\",\"time_stamp\",\"pass_to\"]},\"rows\":{\"Teams\":[[1,\"Arsenal\"],[2,\"Arsenal\"],[3,\"Arsenal\"],[4,\"Chelsea\"],[5,\"Chelsea\"],[6,\"Chelsea\"]],\"Passes\":[[1,\"00:15\",2],[2,\"00:45\",3],[3,\"01:15\",1],[4,\"00:30\",1],[2,\"46:00\",3],[3,\"46:15\",4],[1,\"46:45\",2],[5,\"46:30\",6]]}}",
"__typename": "QuestionNode"
}
}
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,60 @@
{
"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"
}
}
}

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

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

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

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