Team Ai
Datasetpublic

Sagar12/text2sql

sourceHugging Faceunknownupdated 3y agoView on Hugging Face
0likes4downloads
data.jsonl11 linesDownload Raw Back to root
1{"instruction":"Name the home team for carlton away team","input":"CREATE TABLE table_name_77 (\n    home_team VARCHAR,\n    away_team VARCHAR\n)","response":"SELECT home_team FROM table_name_77 WHERE away_team = \"carlton\"","source":"sql_create_context","text":"Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Name the home team for carlton away team ### Input: CREATE TABLE table_name_77 (\n    home_team VARCHAR,\n    away_team VARCHAR\n) ### Response: SELECT home_team FROM table_name_77 WHERE away_team = \"carlton\""}2{"instruction":"what will the population of Asia be when Latin America\/Caribbean is 783 (7.5%)?","input":"CREATE TABLE table_22767 (\n    \"Year\" real,\n    \"World\" real,\n    \"Asia\" text,\n    \"Africa\" text,\n    \"Europe\" text,\n    \"Latin America\/Caribbean\" text,\n    \"Northern America\" text,\n    \"Oceania\" text\n)","response":"SELECT \"Asia\" FROM table_22767 WHERE \"Latin America\/Caribbean\" = '783 (7.5%)'","source":"wikisql","text":"Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what will the population of Asia be when Latin America\/Caribbean is 783 (7.5%)? ### Input: CREATE TABLE table_22767 (\n    \"Year\" real,\n    \"World\" real,\n    \"Asia\" text,\n    \"Africa\" text,\n    \"Europe\" text,\n    \"Latin America\/Caribbean\" text,\n    \"Northern America\" text,\n    \"Oceania\" text\n) ### Response: SELECT \"Asia\" FROM table_22767 WHERE \"Latin America\/Caribbean\" = '783 (7.5%)'"}3{"instruction":"How many faculty members do we have for each gender? Draw a bar chart, order by the Y-axis in descending.","input":"CREATE TABLE Student (\n    StuID INTEGER,\n    LName VARCHAR(12),\n    Fname VARCHAR(12),\n    Age INTEGER,\n    Sex VARCHAR(1),\n    Major INTEGER,\n    Advisor INTEGER,\n    city_code VARCHAR(3)\n)\n\nCREATE TABLE Faculty (\n    FacID INTEGER,\n    Lname VARCHAR(15),\n    Fname VARCHAR(15),\n    Rank VARCHAR(15),\n    Sex VARCHAR(1),\n    Phone INTEGER,\n    Room VARCHAR(5),\n    Building VARCHAR(13)\n)\n\nCREATE TABLE Faculty_Participates_in (\n    FacID INTEGER,\n    actid INTEGER\n)\n\nCREATE TABLE Activity (\n    actid INTEGER,\n    activity_name varchar(25)\n)\n\nCREATE TABLE Participates_in (\n    stuid INTEGER,\n    actid INTEGER\n)","response":"SELECT Sex, COUNT(*) FROM Faculty GROUP BY Sex ORDER BY COUNT(*) DESC","source":"nvbench","text":"Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: How many faculty members do we have for each gender? Draw a bar chart, order by the Y-axis in descending. ### Input: CREATE TABLE Student (\n    StuID INTEGER,\n    LName VARCHAR(12),\n    Fname VARCHAR(12),\n    Age INTEGER,\n    Sex VARCHAR(1),\n    Major INTEGER,\n    Advisor INTEGER,\n    city_code VARCHAR(3)\n)\n\nCREATE TABLE Faculty (\n    FacID INTEGER,\n    Lname VARCHAR(15),\n    Fname VARCHAR(15),\n    Rank VARCHAR(15),\n    Sex VARCHAR(1),\n    Phone INTEGER,\n    Room VARCHAR(5),\n    Building VARCHAR(13)\n)\n\nCREATE TABLE Faculty_Participates_in (\n    FacID INTEGER,\n    actid INTEGER\n)\n\nCREATE TABLE Activity (\n    actid INTEGER,\n    activity_name varchar(25)\n)\n\nCREATE TABLE Participates_in (\n    stuid INTEGER,\n    actid INTEGER\n) ### Response: SELECT Sex, COUNT(*) FROM Faculty GROUP BY Sex ORDER BY COUNT(*) DESC"}4{"instruction":"List the record of 0-1 from the table?","input":"CREATE TABLE table_14656147_2 (\n    week VARCHAR,\n    record VARCHAR\n)","response":"SELECT week FROM table_14656147_2 WHERE record = \"0-1\"","source":"sql_create_context","text":"Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: List the record of 0-1 from the table? ### Input: CREATE TABLE table_14656147_2 (\n    week VARCHAR,\n    record VARCHAR\n) ### Response: SELECT week FROM table_14656147_2 WHERE record = \"0-1\""}5{"instruction":"Which silver has a Gold smaller than 12, a Rank smaller than 5, and a Bronze of 5?","input":"CREATE TABLE table_name_24 (\n    silver VARCHAR,\n    bronze VARCHAR,\n    gold VARCHAR,\n    rank VARCHAR\n)","response":"SELECT silver FROM table_name_24 WHERE gold < 12 AND rank < 5 AND bronze = 5","source":"sql_create_context","text":"Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Which silver has a Gold smaller than 12, a Rank smaller than 5, and a Bronze of 5? ### Input: CREATE TABLE table_name_24 (\n    silver VARCHAR,\n    bronze VARCHAR,\n    gold VARCHAR,\n    rank VARCHAR\n) ### Response: SELECT silver FROM table_name_24 WHERE gold < 12 AND rank < 5 AND bronze = 5"}6{"instruction":"When did Samsung Electronics Co LTD make the GT-i9100?","input":"CREATE TABLE table_47482 (\n    \"Company name\" text,\n    \"Hardware Model\" text,\n    \"Accreditation type\" text,\n    \"Accreditation level\" text,\n    \"Date\" text\n)","response":"SELECT \"Date\" FROM table_47482 WHERE \"Company name\" = 'samsung electronics co ltd' AND \"Hardware Model\" = 'gt-i9100'","source":"wikisql","text":"Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: When did Samsung Electronics Co LTD make the GT-i9100? ### Input: CREATE TABLE table_47482 (\n    \"Company name\" text,\n    \"Hardware Model\" text,\n    \"Accreditation type\" text,\n    \"Accreditation level\" text,\n    \"Date\" text\n) ### Response: SELECT \"Date\" FROM table_47482 WHERE \"Company name\" = 'samsung electronics co ltd' AND \"Hardware Model\" = 'gt-i9100'"}7{"instruction":"what are the early morning flights from BOSTON to DENVER","input":"CREATE TABLE time_interval (\n    period text,\n    begin_time int,\n    end_time int\n)\n\nCREATE TABLE flight_leg (\n    flight_id int,\n    leg_number int,\n    leg_flight int\n)\n\nCREATE TABLE airline (\n    airline_code varchar,\n    airline_name text,\n    note text\n)\n\nCREATE TABLE ground_service (\n    city_code text,\n    airport_code text,\n    transport_type text,\n    ground_fare int\n)\n\nCREATE TABLE class_of_service (\n    booking_class varchar,\n    rank int,\n    class_description text\n)\n\nCREATE TABLE restriction (\n    restriction_code text,\n    advance_purchase int,\n    stopovers text,\n    saturday_stay_required text,\n    minimum_stay int,\n    maximum_stay int,\n    application text,\n    no_discounts text\n)\n\nCREATE TABLE date_day (\n    month_number int,\n    day_number int,\n    year int,\n    day_name varchar\n)\n\nCREATE TABLE dual_carrier (\n    main_airline varchar,\n    low_flight_number int,\n    high_flight_number int,\n    dual_airline varchar,\n    service_name text\n)\n\nCREATE TABLE compartment_class (\n    compartment varchar,\n    class_type varchar\n)\n\nCREATE TABLE equipment_sequence (\n    aircraft_code_sequence varchar,\n    aircraft_code varchar\n)\n\nCREATE TABLE flight (\n    aircraft_code_sequence text,\n    airline_code varchar,\n    airline_flight text,\n    arrival_time int,\n    connections int,\n    departure_time int,\n    dual_carrier text,\n    flight_days text,\n    flight_id int,\n    flight_number int,\n    from_airport varchar,\n    meal_code text,\n    stops int,\n    time_elapsed int,\n    to_airport varchar\n)\n\nCREATE TABLE month (\n    month_number int,\n    month_name text\n)\n\nCREATE TABLE code_description (\n    code varchar,\n    description text\n)\n\nCREATE TABLE airport (\n    airport_code varchar,\n    airport_name text,\n    airport_location text,\n    state_code varchar,\n    country_name varchar,\n    time_zone_code varchar,\n    minimum_connect_time int\n)\n\nCREATE TABLE state (\n    state_code text,\n    state_name text,\n    country_name text\n)\n\nCREATE TABLE food_service (\n    meal_code text,\n    meal_number int,\n    compartment text,\n    meal_description varchar\n)\n\nCREATE TABLE city (\n    city_code varchar,\n    city_name varchar,\n    state_code varchar,\n    country_name varchar,\n    time_zone_code varchar\n)\n\nCREATE TABLE time_zone (\n    time_zone_code text,\n    time_zone_name text,\n    hours_from_gmt int\n)\n\nCREATE TABLE flight_stop (\n    flight_id int,\n    stop_number int,\n    stop_days text,\n    stop_airport text,\n    arrival_time int,\n    arrival_airline text,\n    arrival_flight_number int,\n    departure_time int,\n    departure_airline text,\n    departure_flight_number int,\n    stop_time int\n)\n\nCREATE TABLE flight_fare (\n    flight_id int,\n    fare_id int\n)\n\nCREATE TABLE days (\n    days_code varchar,\n    day_name varchar\n)\n\nCREATE TABLE fare_basis (\n    fare_basis_code text,\n    booking_class text,\n    class_type text,\n    premium text,\n    economy text,\n    discounted text,\n    night text,\n    season text,\n    basis_days text\n)\n\nCREATE TABLE fare (\n    fare_id int,\n    from_airport varchar,\n    to_airport varchar,\n    fare_basis_code text,\n    fare_airline text,\n    restriction_code text,\n    one_direction_cost int,\n    round_trip_cost int,\n    round_trip_required varchar\n)\n\nCREATE TABLE aircraft (\n    aircraft_code varchar,\n    aircraft_description varchar,\n    manufacturer varchar,\n    basic_type varchar,\n    engines int,\n    propulsion varchar,\n    wide_body varchar,\n    wing_span int,\n    length int,\n    weight int,\n    capacity int,\n    pay_load int,\n    cruising_speed int,\n    range_miles int,\n    pressurized varchar\n)\n\nCREATE TABLE airport_service (\n    city_code varchar,\n    airport_code varchar,\n    miles_distant int,\n    direction varchar,\n    minutes_distant int\n)","response":"SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE (CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'BOSTON' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'DENVER' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code AND flight.to_airport = AIRPORT_SERVICE_1.airport_code) AND flight.departure_time BETWEEN 0 AND 800","source":"atis","text":"Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: what are the early morning flights from BOSTON to DENVER ### Input: CREATE TABLE time_interval (\n    period text,\n    begin_time int,\n    end_time int\n)\n\nCREATE TABLE flight_leg (\n    flight_id int,\n    leg_number int,\n    leg_flight int\n)\n\nCREATE TABLE airline (\n    airline_code varchar,\n    airline_name text,\n    note text\n)\n\nCREATE TABLE ground_service (\n    city_code text,\n    airport_code text,\n    transport_type text,\n    ground_fare int\n)\n\nCREATE TABLE class_of_service (\n    booking_class varchar,\n    rank int,\n    class_description text\n)\n\nCREATE TABLE restriction (\n    restriction_code text,\n    advance_purchase int,\n    stopovers text,\n    saturday_stay_required text,\n    minimum_stay int,\n    maximum_stay int,\n    application text,\n    no_discounts text\n)\n\nCREATE TABLE date_day (\n    month_number int,\n    day_number int,\n    year int,\n    day_name varchar\n)\n\nCREATE TABLE dual_carrier (\n    main_airline varchar,\n    low_flight_number int,\n    high_flight_number int,\n    dual_airline varchar,\n    service_name text\n)\n\nCREATE TABLE compartment_class (\n    compartment varchar,\n    class_type varchar\n)\n\nCREATE TABLE equipment_sequence (\n    aircraft_code_sequence varchar,\n    aircraft_code varchar\n)\n\nCREATE TABLE flight (\n    aircraft_code_sequence text,\n    airline_code varchar,\n    airline_flight text,\n    arrival_time int,\n    connections int,\n    departure_time int,\n    dual_carrier text,\n    flight_days text,\n    flight_id int,\n    flight_number int,\n    from_airport varchar,\n    meal_code text,\n    stops int,\n    time_elapsed int,\n    to_airport varchar\n)\n\nCREATE TABLE month (\n    month_number int,\n    month_name text\n)\n\nCREATE TABLE code_description (\n    code varchar,\n    description text\n)\n\nCREATE TABLE airport (\n    airport_code varchar,\n    airport_name text,\n    airport_location text,\n    state_code varchar,\n    country_name varchar,\n    time_zone_code varchar,\n    minimum_connect_time int\n)\n\nCREATE TABLE state (\n    state_code text,\n    state_name text,\n    country_name text\n)\n\nCREATE TABLE food_service (\n    meal_code text,\n    meal_number int,\n    compartment text,\n    meal_description varchar\n)\n\nCREATE TABLE city (\n    city_code varchar,\n    city_name varchar,\n    state_code varchar,\n    country_name varchar,\n    time_zone_code varchar\n)\n\nCREATE TABLE time_zone (\n    time_zone_code text,\n    time_zone_name text,\n    hours_from_gmt int\n)\n\nCREATE TABLE flight_stop (\n    flight_id int,\n    stop_number int,\n    stop_days text,\n    stop_airport text,\n    arrival_time int,\n    arrival_airline text,\n    arrival_flight_number int,\n    departure_time int,\n    departure_airline text,\n    departure_flight_number int,\n    stop_time int\n)\n\nCREATE TABLE flight_fare (\n    flight_id int,\n    fare_id int\n)\n\nCREATE TABLE days (\n    days_code varchar,\n    day_name varchar\n)\n\nCREATE TABLE fare_basis (\n    fare_basis_code text,\n    booking_class text,\n    class_type text,\n    premium text,\n    economy text,\n    discounted text,\n    night text,\n    season text,\n    basis_days text\n)\n\nCREATE TABLE fare (\n    fare_id int,\n    from_airport varchar,\n    to_airport varchar,\n    fare_basis_code text,\n    fare_airline text,\n    restriction_code text,\n    one_direction_cost int,\n    round_trip_cost int,\n    round_trip_required varchar\n)\n\nCREATE TABLE aircraft (\n    aircraft_code varchar,\n    aircraft_description varchar,\n    manufacturer varchar,\n    basic_type varchar,\n    engines int,\n    propulsion varchar,\n    wide_body varchar,\n    wing_span int,\n    length int,\n    weight int,\n    capacity int,\n    pay_load int,\n    cruising_speed int,\n    range_miles int,\n    pressurized varchar\n)\n\nCREATE TABLE airport_service (\n    city_code varchar,\n    airport_code varchar,\n    miles_distant int,\n    direction varchar,\n    minutes_distant int\n) ### Response: SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE (CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'BOSTON' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'DENVER' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code AND flight.to_airport = AIRPORT_SERVICE_1.airport_code) AND flight.departure_time BETWEEN 0 AND 800"}8{"instruction":"Name the most 3 credits","input":"CREATE TABLE table_148535_2 (\n    Id VARCHAR\n)","response":"SELECT MIN(3 AS _credits) FROM table_148535_2","source":"sql_create_context","text":"Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: Name the most 3 credits ### Input: CREATE TABLE table_148535_2 (\n    Id VARCHAR\n) ### Response: SELECT MIN(3 AS _credits) FROM table_148535_2"}9{"instruction":"What is every yellow jersey entry for the distance 125?","input":"CREATE TABLE table_3791 (\n    \"Year\" text,\n    \"Stage\" real,\n    \"Start of stage\" text,\n    \"Distance (km)\" text,\n    \"Category of climb\" text,\n    \"Stage winner\" text,\n    \"Nationality\" text,\n    \"Yellow jersey\" text,\n    \"Bend\" real\n)","response":"SELECT \"Yellow jersey\" FROM table_3791 WHERE \"Distance (km)\" = '125'","source":"wikisql","text":"Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: What is every yellow jersey entry for the distance 125? ### Input: CREATE TABLE table_3791 (\n    \"Year\" text,\n    \"Stage\" real,\n    \"Start of stage\" text,\n    \"Distance (km)\" text,\n    \"Category of climb\" text,\n    \"Stage winner\" text,\n    \"Nationality\" text,\n    \"Yellow jersey\" text,\n    \"Bend\" real\n) ### Response: SELECT \"Yellow jersey\" FROM table_3791 WHERE \"Distance (km)\" = '125'"}10{"instruction":"In what years was there a rank lower than 9, under 84 goals, and more than 158 matches?","input":"CREATE TABLE table_name_63 (\n    years VARCHAR,\n    goals VARCHAR,\n    matches VARCHAR,\n    rank VARCHAR\n)","response":"SELECT years FROM table_name_63 WHERE matches > 158 AND rank > 9 AND goals < 84","source":"sql_create_context","text":"Below are sql tables schemas paired with instruction that describes a task. Using valid SQLite, write a response that appropriately completes the request for the provided tables. ### Instruction: In what years was there a rank lower than 9, under 84 goals, and more than 158 matches? ### Input: CREATE TABLE table_name_63 (\n    years VARCHAR,\n    goals VARCHAR,\n    matches VARCHAR,\n    rank VARCHAR\n) ### Response: SELECT years FROM table_name_63 WHERE matches > 158 AND rank > 9 AND goals < 84"}11