Find Top Scoring Students
[]
['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')"]
{"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)"}}}
{"mysql": ["MySQL", "<p><code>MySQL 8.0</code>.</p>"], "mssql": ["MS SQL Server", "<p><code>mssql server 2019</code>.</p>"], "oraclesql": ["Oracle", "<p><code>Oracle Sql 11.2</code>.</p>"], "pythondata": ["Pandas", "<p>Python 3.10 with Pandas 2.2.2 and NumPy 1.26.4</p>"], "postgresql": ["PostgreSQL", "<p>PostgreSQL 16</p>"]}
['Database']