{ "data": { "question": { "questionId": "1564", "questionFrontendId": "1435", "boundTopicId": null, "title": "Create a Session Bar Chart", "titleSlug": "create-a-session-bar-chart", "content": null, "translatedTitle": null, "translatedContent": null, "isPaidOnly": true, "difficulty": "Easy", "likes": 145, "dislikes": 257, "isLiked": null, "similarQuestions": "[{\"title\": \"Count Salary Categories\", \"titleSlug\": \"count-salary-categories\", \"difficulty\": \"Medium\", \"translatedTitle\": null}]", "exampleTestcases": "{\"headers\": {\"Sessions\": [\"session_id\", \"duration\"]}, \"rows\": {\"Sessions\": [[1, 30], [2, 199], [3, 299], [4, 580], [5, 1000]]}}", "categoryTitle": "Database", "contributors": [], "topicTags": [ { "name": "Database", "slug": "database", "translatedName": null, "__typename": "TopicTagNode" } ], "companyTagStats": null, "codeSnippets": null, "stats": "{\"totalAccepted\": \"21.7K\", \"totalSubmission\": \"28.7K\", \"totalAcceptedRaw\": 21698, \"totalSubmissionRaw\": 28749, \"acRate\": \"75.5%\"}", "hints": [], "solution": null, "status": null, "sampleTestCase": "{\"headers\": {\"Sessions\": [\"session_id\", \"duration\"]}, \"rows\": {\"Sessions\": [[1, 30], [2, 199], [3, 299], [4, 580], [5, 1000]]}}", "metaData": "{\"mysql\": [\"Create table If Not Exists Sessions (session_id int, duration int)\"], \"mssql\": [\"Create table Sessions (session_id int, duration int)\"], \"oraclesql\": [\"Create table Sessions (session_id int, duration int)\"], \"database\": true, \"name\": \"create_bar_chart\", \"pythondata\": [\"Sessions = pd.DataFrame([], columns=['session_id', 'duration']).astype({'session_id':'Int64', 'duration':'Int64'})\"], \"postgresql\": [\"\\nCreate table If Not Exists Sessions (session_id int, duration int)\"], \"database_schema\": {\"Sessions\": {\"session_id\": \"INT\", \"duration\": \"INT\"}}}", "judgerAvailable": true, "judgeType": "large", "mysqlSchemas": [ "Create table If Not Exists Sessions (session_id int, duration int)", "Truncate table Sessions", "insert into Sessions (session_id, duration) values ('1', '30')", "insert into Sessions (session_id, duration) values ('2', '199')", "insert into Sessions (session_id, duration) values ('3', '299')", "insert into Sessions (session_id, duration) values ('4', '580')", "insert into Sessions (session_id, duration) values ('5', '1000')" ], "enableRunCode": true, "enableTestMode": false, "enableDebugger": false, "envInfo": "{\"mysql\": [\"MySQL\", \"

MySQL 8.0.

\"], \"mssql\": [\"MS SQL Server\", \"

mssql server 2019.

\"], \"oraclesql\": [\"Oracle\", \"

Oracle Sql 11.2.

\"], \"pythondata\": [\"Pandas\", \"

Python 3.10 with Pandas 2.0.2 and NumPy 1.25.0

\"], \"postgresql\": [\"PostgreSQL\", \"

PostgreSQL 16

\"]}", "libraryUrl": null, "adminUrl": null, "challengeQuestion": null, "__typename": "QuestionNode" } } }