Find Top Performing Driver
[]
['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')"]
{"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"}}}
{"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']