text2SQL
stringlengths
192
7.27k
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE state ( state_name, capital, population, area, country_name, density ) CREATE TABLE mountain ( mountain_name, mountain_altitude, state_name, country_name ) CREATE TABLE highlow ( state_name, highest_point, highest_elevation, lowest_point, lowest_elevation ) CREATE TABLE road ( road_name, state_name ) CREATE TABLE city ( city_name, state_name, population, country_name ) CREATE TABLE river ( river_name, length, traverse, country_name ) CREATE TABLE lake ( lake_name, area, state_name, country_name ) CREATE TABLE border_info ( state_name, border ) -- Using valid SQLite, answer the following questions for the tables provided above. -- which state is the city denver located in SELECT### Response: SELECT state_name FROM city WHERE city_name = 'denver'.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE mountain ( mountain_name, mountain_altitude, state_name, country_name ) CREATE TABLE lake ( lake_name, area, state_name, country_name ) CREATE TABLE border_info ( state_name, border ) CREATE TABLE state ( state_name, capital, population, area, country_name, density ) CREATE TABLE city ( city_name, state_name, population, country_name ) CREATE TABLE road ( road_name, state_name ) CREATE TABLE river ( river_name, length, traverse, country_name ) CREATE TABLE highlow ( state_name, highest_point, highest_elevation, lowest_point, lowest_elevation ) -- Using valid SQLite, answer the following questions for the tables provided above. -- population of boulder SELECT### Response: SELECT population FROM city WHERE city_name = 'boulder'.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE month ( month_number, month_name ) CREATE TABLE flight ( aircraft_code_sequence, airline_code, airline_flight, arrival_time, connections, departure_time, dual_carrier, flight_days, flight_id, flight_number, from_airport, meal_code, stops, time_elapsed, to_airport ) CREATE TABLE time_zone ( time_zone_code, time_zone_name, hours_from_gmt ) CREATE TABLE airline ( airline_code, airline_name, note ) CREATE TABLE state ( state_code, state_name, country_name ) CREATE TABLE restriction ( restriction_code, advance_purchase, stopovers, saturday_stay_required, minimum_stay, maximum_stay, application, no_discounts ) CREATE TABLE city ( city_code, city_name, state_code, country_name, time_zone_code ) CREATE TABLE ground_service ( city_code, airport_code, transport_type, ground_fare ) CREATE TABLE compartment_class ( compartment, class_type ) CREATE TABLE fare ( fare_id, from_airport, to_airport, fare_basis_code, fare_airline, restriction_code, one_direction_cost, round_trip_cost, round_trip_required ) CREATE TABLE aircraft ( aircraft_code, aircraft_description, manufacturer, basic_type, engines, propulsion, wide_body, wing_span, length, weight, capacity, pay_load, cruising_speed, range_miles, pressurized ) CREATE TABLE airport_service ( city_code, airport_code, miles_distant, direction, minutes_distant ) CREATE TABLE airport ( airport_code, airport_name, airport_location, state_code, country_name, time_zone_code, minimum_connect_time ) CREATE TABLE class_of_service ( booking_class, rank, class_description ) CREATE TABLE flight_fare ( flight_id, fare_id ) CREATE TABLE fare_basis ( fare_basis_code, booking_class, class_type, premium, economy, discounted, night, season, basis_days ) CREATE TABLE food_service ( meal_code, meal_number, compartment, meal_description ) CREATE TABLE days ( days_code, day_name ) CREATE TABLE flight_stop ( flight_id, stop_number, stop_days, stop_airport, arrival_time, arrival_airline, arrival_flight_number, departure_time, departure_airline, departure_flight_number, stop_time ) CREATE TABLE equipment_sequence ( aircraft_code_sequence, aircraft_code ) CREATE TABLE time_interval ( period, begin_time, end_time ) CREATE TABLE date_day ( month_number, day_number, year, day_name ) CREATE TABLE dual_carrier ( main_airline, low_flight_number, high_flight_number, dual_airline, service_name ) CREATE TABLE code_description ( code, description ) CREATE TABLE flight_leg ( flight_id, leg_number, leg_flight ) -- Using valid SQLite, answer the following questions for the tables provided above. -- flight from WASHINGTON to SALT LAKE CITY SELECT### 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 = 'WASHINGTON' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'SALT LAKE CITY' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code AND flight.to_airport = AIRPORT_SERVICE_1.airport_code.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE ground_service ( city_code, airport_code, transport_type, ground_fare ) CREATE TABLE code_description ( code, description ) CREATE TABLE city ( city_code, city_name, state_code, country_name, time_zone_code ) CREATE TABLE flight_stop ( flight_id, stop_number, stop_days, stop_airport, arrival_time, arrival_airline, arrival_flight_number, departure_time, departure_airline, departure_flight_number, stop_time ) CREATE TABLE airport_service ( city_code, airport_code, miles_distant, direction, minutes_distant ) CREATE TABLE equipment_sequence ( aircraft_code_sequence, aircraft_code ) CREATE TABLE food_service ( meal_code, meal_number, compartment, meal_description ) CREATE TABLE state ( state_code, state_name, country_name ) CREATE TABLE restriction ( restriction_code, advance_purchase, stopovers, saturday_stay_required, minimum_stay, maximum_stay, application, no_discounts ) CREATE TABLE dual_carrier ( main_airline, low_flight_number, high_flight_number, dual_airline, service_name ) CREATE TABLE fare ( fare_id, from_airport, to_airport, fare_basis_code, fare_airline, restriction_code, one_direction_cost, round_trip_cost, round_trip_required ) CREATE TABLE flight ( aircraft_code_sequence, airline_code, airline_flight, arrival_time, connections, departure_time, dual_carrier, flight_days, flight_id, flight_number, from_airport, meal_code, stops, time_elapsed, to_airport ) CREATE TABLE flight_fare ( flight_id, fare_id ) CREATE TABLE airport ( airport_code, airport_name, airport_location, state_code, country_name, time_zone_code, minimum_connect_time ) CREATE TABLE compartment_class ( compartment, class_type ) CREATE TABLE flight_leg ( flight_id, leg_number, leg_flight ) CREATE TABLE time_interval ( period, begin_time, end_time ) CREATE TABLE aircraft ( aircraft_code, aircraft_description, manufacturer, basic_type, engines, propulsion, wide_body, wing_span, length, weight, capacity, pay_load, cruising_speed, range_miles, pressurized ) CREATE TABLE class_of_service ( booking_class, rank, class_description ) CREATE TABLE time_zone ( time_zone_code, time_zone_name, hours_from_gmt ) CREATE TABLE month ( month_number, month_name ) CREATE TABLE airline ( airline_code, airline_name, note ) CREATE TABLE days ( days_code, day_name ) CREATE TABLE date_day ( month_number, day_number, year, day_name ) CREATE TABLE fare_basis ( fare_basis_code, booking_class, class_type, premium, economy, discounted, night, season, basis_days ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what are the flights from NASHVILLE to TACOMA on tuesday the 18 of 5 SELECT### 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, date_day, days, flight WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'TACOMA' AND date_day.day_number = 18 AND date_day.month_number = 5 AND date_day.year = 1991 AND days.day_name = date_day.day_name AND flight.flight_days = days.days_code AND flight.to_airport = AIRPORT_SERVICE_1.airport_code) AND CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'NASHVILLE' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE river ( river_name, length, traverse, country_name ) CREATE TABLE state ( state_name, capital, population, area, country_name, density ) CREATE TABLE border_info ( state_name, border ) CREATE TABLE lake ( lake_name, area, state_name, country_name ) CREATE TABLE mountain ( mountain_name, mountain_altitude, state_name, country_name ) CREATE TABLE highlow ( state_name, highest_point, highest_elevation, lowest_point, lowest_elevation ) CREATE TABLE city ( city_name, state_name, population, country_name ) CREATE TABLE road ( road_name, state_name ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what state bordering nevada has the largest population SELECT### Response: SELECT state_name FROM state WHERE state_name IN (SELECT BORDER_INFOalias0.border FROM border_info AS BORDER_INFOalias0 WHERE BORDER_INFOalias0.state_name = 'nevada') ORDER BY population DESC LIMIT 1.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE keyword ( keyword, kid ) CREATE TABLE conference ( cid, homepage, name ) CREATE TABLE journal ( homepage, jid, name ) CREATE TABLE domain_author ( aid, did ) CREATE TABLE organization ( continent, homepage, name, oid ) CREATE TABLE domain_journal ( did, jid ) CREATE TABLE writes ( aid, pid ) CREATE TABLE domain_conference ( cid, did ) CREATE TABLE domain ( did, name ) CREATE TABLE cite ( cited, citing ) CREATE TABLE author ( aid, homepage, name, oid ) CREATE TABLE publication ( abstract, cid, citation_num, jid, pid, reference_num, title, year ) CREATE TABLE domain_publication ( did, pid ) CREATE TABLE domain_keyword ( did, kid ) CREATE TABLE publication_keyword ( kid, pid ) -- Using valid SQLite, answer the following questions for the tables provided above. -- return me the authors who have papers in VLDB conference before 2002 after 1995 . SELECT### Response: SELECT author.name FROM author, conference, publication, writes WHERE conference.name = 'VLDB' AND publication.cid = conference.cid AND publication.year < 2002 AND publication.year > 1995 AND writes.aid = author.aid AND writes.pid = publication.pid.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE airport ( airport_code, airport_name, airport_location, state_code, country_name, time_zone_code, minimum_connect_time ) CREATE TABLE ground_service ( city_code, airport_code, transport_type, ground_fare ) CREATE TABLE flight_fare ( flight_id, fare_id ) CREATE TABLE state ( state_code, state_name, country_name ) CREATE TABLE time_interval ( period, begin_time, end_time ) CREATE TABLE fare ( fare_id, from_airport, to_airport, fare_basis_code, fare_airline, restriction_code, one_direction_cost, round_trip_cost, round_trip_required ) CREATE TABLE class_of_service ( booking_class, rank, class_description ) CREATE TABLE month ( month_number, month_name ) CREATE TABLE date_day ( month_number, day_number, year, day_name ) CREATE TABLE city ( city_code, city_name, state_code, country_name, time_zone_code ) CREATE TABLE fare_basis ( fare_basis_code, booking_class, class_type, premium, economy, discounted, night, season, basis_days ) CREATE TABLE flight ( aircraft_code_sequence, airline_code, airline_flight, arrival_time, connections, departure_time, dual_carrier, flight_days, flight_id, flight_number, from_airport, meal_code, stops, time_elapsed, to_airport ) CREATE TABLE compartment_class ( compartment, class_type ) CREATE TABLE equipment_sequence ( aircraft_code_sequence, aircraft_code ) CREATE TABLE dual_carrier ( main_airline, low_flight_number, high_flight_number, dual_airline, service_name ) CREATE TABLE time_zone ( time_zone_code, time_zone_name, hours_from_gmt ) CREATE TABLE flight_leg ( flight_id, leg_number, leg_flight ) CREATE TABLE flight_stop ( flight_id, stop_number, stop_days, stop_airport, arrival_time, arrival_airline, arrival_flight_number, departure_time, departure_airline, departure_flight_number, stop_time ) CREATE TABLE days ( days_code, day_name ) CREATE TABLE code_description ( code, description ) CREATE TABLE airline ( airline_code, airline_name, note ) CREATE TABLE airport_service ( city_code, airport_code, miles_distant, direction, minutes_distant ) CREATE TABLE aircraft ( aircraft_code, aircraft_description, manufacturer, basic_type, engines, propulsion, wide_body, wing_span, length, weight, capacity, pay_load, cruising_speed, range_miles, pressurized ) CREATE TABLE food_service ( meal_code, meal_number, compartment, meal_description ) CREATE TABLE restriction ( restriction_code, advance_purchase, stopovers, saturday_stay_required, minimum_stay, maximum_stay, application, no_discounts ) -- Using valid SQLite, answer the following questions for the tables provided above. -- i want to fly from BOSTON to BALTIMORE SELECT### 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 = 'BALTIMORE' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code AND flight.to_airport = AIRPORT_SERVICE_1.airport_code.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE student_record ( student_id, course_id, semester, grade, how, transfer_source, earn_credit, repeat_term, test_id ) CREATE TABLE program ( program_id, name, college, introduction ) CREATE TABLE semester ( semester_id, semester, year ) CREATE TABLE student ( student_id, lastname, firstname, program_id, declare_major, total_credit, total_gpa, entered_as, admit_term, predicted_graduation_semester, degree, minor, internship ) CREATE TABLE area ( course_id, area ) CREATE TABLE program_requirement ( program_id, category, min_credit, additional_req ) CREATE TABLE gsi ( course_offering_id, student_id ) CREATE TABLE requirement ( requirement_id, requirement, college ) CREATE TABLE jobs ( job_id, job_title, description, requirement, city, state, country, zip ) CREATE TABLE course_prerequisite ( pre_course_id, course_id ) CREATE TABLE course_tags_count ( course_id, clear_grading, pop_quiz, group_projects, inspirational, long_lectures, extra_credit, few_tests, good_feedback, tough_tests, heavy_papers, cares_for_students, heavy_assignments, respected, participation, heavy_reading, tough_grader, hilarious, would_take_again, good_lecture, no_skip ) CREATE TABLE program_course ( program_id, course_id, workload, category ) CREATE TABLE course_offering ( offering_id, course_id, semester, section_number, start_time, end_time, monday, tuesday, wednesday, thursday, friday, saturday, sunday, has_final_project, has_final_exam, textbook, class_address, allow_audit ) CREATE TABLE ta ( campus_job_id, student_id, location ) CREATE TABLE comment_instructor ( instructor_id, student_id, score, comment_text ) CREATE TABLE course ( course_id, name, department, number, credits, advisory_requirement, enforced_requirement, description, num_semesters, num_enrolled, has_discussion, has_lab, has_projects, has_exams, num_reviews, clarity_score, easiness_score, helpfulness_score ) CREATE TABLE instructor ( instructor_id, name, uniqname ) CREATE TABLE offering_instructor ( offering_instructor_id, offering_id, instructor_id ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Is a lab included in 579 ? SELECT### Response: SELECT COUNT(*) > 0 FROM course WHERE department = 'EECS' AND has_lab = 'Y' AND number = 579.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE flight ( aircraft_code_sequence, airline_code, airline_flight, arrival_time, connections, departure_time, dual_carrier, flight_days, flight_id, flight_number, from_airport, meal_code, stops, time_elapsed, to_airport ) CREATE TABLE date_day ( month_number, day_number, year, day_name ) CREATE TABLE restriction ( restriction_code, advance_purchase, stopovers, saturday_stay_required, minimum_stay, maximum_stay, application, no_discounts ) CREATE TABLE compartment_class ( compartment, class_type ) CREATE TABLE ground_service ( city_code, airport_code, transport_type, ground_fare ) CREATE TABLE fare ( fare_id, from_airport, to_airport, fare_basis_code, fare_airline, restriction_code, one_direction_cost, round_trip_cost, round_trip_required ) CREATE TABLE days ( days_code, day_name ) CREATE TABLE state ( state_code, state_name, country_name ) CREATE TABLE class_of_service ( booking_class, rank, class_description ) CREATE TABLE time_zone ( time_zone_code, time_zone_name, hours_from_gmt ) CREATE TABLE city ( city_code, city_name, state_code, country_name, time_zone_code ) CREATE TABLE month ( month_number, month_name ) CREATE TABLE time_interval ( period, begin_time, end_time ) CREATE TABLE dual_carrier ( main_airline, low_flight_number, high_flight_number, dual_airline, service_name ) CREATE TABLE airport ( airport_code, airport_name, airport_location, state_code, country_name, time_zone_code, minimum_connect_time ) CREATE TABLE aircraft ( aircraft_code, aircraft_description, manufacturer, basic_type, engines, propulsion, wide_body, wing_span, length, weight, capacity, pay_load, cruising_speed, range_miles, pressurized ) CREATE TABLE flight_stop ( flight_id, stop_number, stop_days, stop_airport, arrival_time, arrival_airline, arrival_flight_number, departure_time, departure_airline, departure_flight_number, stop_time ) CREATE TABLE airline ( airline_code, airline_name, note ) CREATE TABLE equipment_sequence ( aircraft_code_sequence, aircraft_code ) CREATE TABLE fare_basis ( fare_basis_code, booking_class, class_type, premium, economy, discounted, night, season, basis_days ) CREATE TABLE food_service ( meal_code, meal_number, compartment, meal_description ) CREATE TABLE code_description ( code, description ) CREATE TABLE airport_service ( city_code, airport_code, miles_distant, direction, minutes_distant ) CREATE TABLE flight_leg ( flight_id, leg_number, leg_flight ) CREATE TABLE flight_fare ( flight_id, fare_id ) -- Using valid SQLite, answer the following questions for the tables provided above. -- please show me the flights from LAS VEGAS to DETROIT on the 28 SELECT### 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, date_day, days, flight WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'DETROIT' AND date_day.day_number = 28 AND date_day.month_number = 6 AND date_day.year = 1991 AND days.day_name = date_day.day_name AND flight.flight_days = days.days_code AND flight.to_airport = AIRPORT_SERVICE_1.airport_code) AND CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'LAS VEGAS' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE gsi ( course_offering_id, student_id ) CREATE TABLE offering_instructor ( offering_instructor_id, offering_id, instructor_id ) CREATE TABLE program ( program_id, name, college, introduction ) CREATE TABLE requirement ( requirement_id, requirement, college ) CREATE TABLE program_requirement ( program_id, category, min_credit, additional_req ) CREATE TABLE course_offering ( offering_id, course_id, semester, section_number, start_time, end_time, monday, tuesday, wednesday, thursday, friday, saturday, sunday, has_final_project, has_final_exam, textbook, class_address, allow_audit ) CREATE TABLE student_record ( student_id, course_id, semester, grade, how, transfer_source, earn_credit, repeat_term, test_id ) CREATE TABLE course_prerequisite ( pre_course_id, course_id ) CREATE TABLE comment_instructor ( instructor_id, student_id, score, comment_text ) CREATE TABLE program_course ( program_id, course_id, workload, category ) CREATE TABLE jobs ( job_id, job_title, description, requirement, city, state, country, zip ) CREATE TABLE student ( student_id, lastname, firstname, program_id, declare_major, total_credit, total_gpa, entered_as, admit_term, predicted_graduation_semester, degree, minor, internship ) CREATE TABLE ta ( campus_job_id, student_id, location ) CREATE TABLE course_tags_count ( course_id, clear_grading, pop_quiz, group_projects, inspirational, long_lectures, extra_credit, few_tests, good_feedback, tough_tests, heavy_papers, cares_for_students, heavy_assignments, respected, participation, heavy_reading, tough_grader, hilarious, would_take_again, good_lecture, no_skip ) CREATE TABLE instructor ( instructor_id, name, uniqname ) CREATE TABLE semester ( semester_id, semester, year ) CREATE TABLE course ( course_id, name, department, number, credits, advisory_requirement, enforced_requirement, description, num_semesters, num_enrolled, has_discussion, has_lab, has_projects, has_exams, num_reviews, clarity_score, easiness_score, helpfulness_score ) CREATE TABLE area ( course_id, area ) -- Using valid SQLite, answer the following questions for the tables provided above. -- For the Core requirement , what is the easiest class I can take ? SELECT### Response: SELECT DISTINCT course.department, course.name, course.number, program_course.workload, program_course.workload FROM course, program_course WHERE program_course.category LIKE '%Core%' AND program_course.course_id = course.course_id AND program_course.workload = (SELECT MIN(PROGRAM_COURSEalias1.workload) FROM program_course AS PROGRAM_COURSEalias1 WHERE PROGRAM_COURSEalias1.category LIKE '%Core%').
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE author ( authorid, authorname ) CREATE TABLE journal ( journalid, journalname ) CREATE TABLE dataset ( datasetid, datasetname ) CREATE TABLE paperfield ( fieldid, paperid ) CREATE TABLE field ( fieldid ) CREATE TABLE venue ( venueid, venuename ) CREATE TABLE paperkeyphrase ( paperid, keyphraseid ) CREATE TABLE paperdataset ( paperid, datasetid ) CREATE TABLE paper ( paperid, title, venueid, year, numciting, numcitedby, journalid ) CREATE TABLE cite ( citingpaperid, citedpaperid ) CREATE TABLE keyphrase ( keyphraseid, keyphrasename ) CREATE TABLE writes ( paperid, authorid ) -- Using valid SQLite, answer the following questions for the tables provided above. -- papers on semantic parsing SELECT### Response: SELECT DISTINCT paper.paperid FROM keyphrase, paper, paperkeyphrase WHERE keyphrase.keyphrasename = 'semantic parsing' AND paperkeyphrase.keyphraseid = keyphrase.keyphraseid AND paper.paperid = paperkeyphrase.paperid.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE course_prerequisite ( pre_course_id, course_id ) CREATE TABLE jobs ( job_id, job_title, description, requirement, city, state, country, zip ) CREATE TABLE area ( course_id, area ) CREATE TABLE ta ( campus_job_id, student_id, location ) CREATE TABLE program_requirement ( program_id, category, min_credit, additional_req ) CREATE TABLE program_course ( program_id, course_id, workload, category ) CREATE TABLE gsi ( course_offering_id, student_id ) CREATE TABLE semester ( semester_id, semester, year ) CREATE TABLE instructor ( instructor_id, name, uniqname ) CREATE TABLE course ( course_id, name, department, number, credits, advisory_requirement, enforced_requirement, description, num_semesters, num_enrolled, has_discussion, has_lab, has_projects, has_exams, num_reviews, clarity_score, easiness_score, helpfulness_score ) CREATE TABLE course_offering ( offering_id, course_id, semester, section_number, start_time, end_time, monday, tuesday, wednesday, thursday, friday, saturday, sunday, has_final_project, has_final_exam, textbook, class_address, allow_audit ) CREATE TABLE course_tags_count ( course_id, clear_grading, pop_quiz, group_projects, inspirational, long_lectures, extra_credit, few_tests, good_feedback, tough_tests, heavy_papers, cares_for_students, heavy_assignments, respected, participation, heavy_reading, tough_grader, hilarious, would_take_again, good_lecture, no_skip ) CREATE TABLE program ( program_id, name, college, introduction ) CREATE TABLE student_record ( student_id, course_id, semester, grade, how, transfer_source, earn_credit, repeat_term, test_id ) CREATE TABLE comment_instructor ( instructor_id, student_id, score, comment_text ) CREATE TABLE requirement ( requirement_id, requirement, college ) CREATE TABLE student ( student_id, lastname, firstname, program_id, declare_major, total_credit, total_gpa, entered_as, admit_term, predicted_graduation_semester, degree, minor, internship ) CREATE TABLE offering_instructor ( offering_instructor_id, offering_id, instructor_id ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which professors have given PSYCH minors a B- in their class ? SELECT### Response: SELECT DISTINCT instructor.name FROM instructor INNER JOIN offering_instructor ON offering_instructor.instructor_id = instructor.instructor_id INNER JOIN student_record ON student_record.offering_id = offering_instructor.offering_id INNER JOIN student ON student.student_id = student_record.student_id WHERE (student_record.grade LIKE '%B-%' OR student_record.grade LIKE '%B-%') AND student.minor = 'PSYCH'.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE code_description ( code, description ) CREATE TABLE fare ( fare_id, from_airport, to_airport, fare_basis_code, fare_airline, restriction_code, one_direction_cost, round_trip_cost, round_trip_required ) CREATE TABLE flight_fare ( flight_id, fare_id ) CREATE TABLE time_interval ( period, begin_time, end_time ) CREATE TABLE flight_leg ( flight_id, leg_number, leg_flight ) CREATE TABLE food_service ( meal_code, meal_number, compartment, meal_description ) CREATE TABLE airline ( airline_code, airline_name, note ) CREATE TABLE aircraft ( aircraft_code, aircraft_description, manufacturer, basic_type, engines, propulsion, wide_body, wing_span, length, weight, capacity, pay_load, cruising_speed, range_miles, pressurized ) CREATE TABLE date_day ( month_number, day_number, year, day_name ) CREATE TABLE flight ( aircraft_code_sequence, airline_code, airline_flight, arrival_time, connections, departure_time, dual_carrier, flight_days, flight_id, flight_number, from_airport, meal_code, stops, time_elapsed, to_airport ) CREATE TABLE state ( state_code, state_name, country_name ) CREATE TABLE ground_service ( city_code, airport_code, transport_type, ground_fare ) CREATE TABLE compartment_class ( compartment, class_type ) CREATE TABLE airport_service ( city_code, airport_code, miles_distant, direction, minutes_distant ) CREATE TABLE days ( days_code, day_name ) CREATE TABLE class_of_service ( booking_class, rank, class_description ) CREATE TABLE dual_carrier ( main_airline, low_flight_number, high_flight_number, dual_airline, service_name ) CREATE TABLE fare_basis ( fare_basis_code, booking_class, class_type, premium, economy, discounted, night, season, basis_days ) CREATE TABLE equipment_sequence ( aircraft_code_sequence, aircraft_code ) CREATE TABLE airport ( airport_code, airport_name, airport_location, state_code, country_name, time_zone_code, minimum_connect_time ) CREATE TABLE city ( city_code, city_name, state_code, country_name, time_zone_code ) CREATE TABLE month ( month_number, month_name ) CREATE TABLE flight_stop ( flight_id, stop_number, stop_days, stop_airport, arrival_time, arrival_airline, arrival_flight_number, departure_time, departure_airline, departure_flight_number, stop_time ) CREATE TABLE time_zone ( time_zone_code, time_zone_name, hours_from_gmt ) CREATE TABLE restriction ( restriction_code, advance_purchase, stopovers, saturday_stay_required, minimum_stay, maximum_stay, application, no_discounts ) -- Using valid SQLite, answer the following questions for the tables provided above. -- i'd like to get a flight from WASHINGTON to OAKLAND with a stopover in DFW for 9 15 SELECT### Response: SELECT DISTINCT flight.flight_id FROM airport, airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, flight, flight_stop WHERE ((airport.airport_code = 'DFW' AND date_day.day_number = 15 AND date_day.month_number = 9 AND date_day.year = 1991 AND days.day_name = date_day.day_name AND flight_stop.stop_airport = airport.airport_code AND flight.flight_days = days.days_code AND flight.flight_id = flight_stop.flight_id) AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'OAKLAND' AND flight.to_airport = AIRPORT_SERVICE_1.airport_code) AND CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'WASHINGTON' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE time_interval ( period, begin_time, end_time ) CREATE TABLE flight_stop ( flight_id, stop_number, stop_days, stop_airport, arrival_time, arrival_airline, arrival_flight_number, departure_time, departure_airline, departure_flight_number, stop_time ) CREATE TABLE date_day ( month_number, day_number, year, day_name ) CREATE TABLE code_description ( code, description ) CREATE TABLE fare_basis ( fare_basis_code, booking_class, class_type, premium, economy, discounted, night, season, basis_days ) CREATE TABLE flight_fare ( flight_id, fare_id ) CREATE TABLE aircraft ( aircraft_code, aircraft_description, manufacturer, basic_type, engines, propulsion, wide_body, wing_span, length, weight, capacity, pay_load, cruising_speed, range_miles, pressurized ) CREATE TABLE month ( month_number, month_name ) CREATE TABLE restriction ( restriction_code, advance_purchase, stopovers, saturday_stay_required, minimum_stay, maximum_stay, application, no_discounts ) CREATE TABLE flight_leg ( flight_id, leg_number, leg_flight ) CREATE TABLE food_service ( meal_code, meal_number, compartment, meal_description ) CREATE TABLE city ( city_code, city_name, state_code, country_name, time_zone_code ) CREATE TABLE time_zone ( time_zone_code, time_zone_name, hours_from_gmt ) CREATE TABLE class_of_service ( booking_class, rank, class_description ) CREATE TABLE compartment_class ( compartment, class_type ) CREATE TABLE equipment_sequence ( aircraft_code_sequence, aircraft_code ) CREATE TABLE dual_carrier ( main_airline, low_flight_number, high_flight_number, dual_airline, service_name ) CREATE TABLE fare ( fare_id, from_airport, to_airport, fare_basis_code, fare_airline, restriction_code, one_direction_cost, round_trip_cost, round_trip_required ) CREATE TABLE days ( days_code, day_name ) CREATE TABLE airport_service ( city_code, airport_code, miles_distant, direction, minutes_distant ) CREATE TABLE ground_service ( city_code, airport_code, transport_type, ground_fare ) CREATE TABLE airport ( airport_code, airport_name, airport_location, state_code, country_name, time_zone_code, minimum_connect_time ) CREATE TABLE flight ( aircraft_code_sequence, airline_code, airline_flight, arrival_time, connections, departure_time, dual_carrier, flight_days, flight_id, flight_number, from_airport, meal_code, stops, time_elapsed, to_airport ) CREATE TABLE state ( state_code, state_name, country_name ) CREATE TABLE airline ( airline_code, airline_name, note ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what ground transportation is available at BALTIMORE SELECT### Response: SELECT DISTINCT ground_service.transport_type FROM city, ground_service WHERE city.city_name = 'BALTIMORE' AND ground_service.city_code = city.city_code.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE student ( student_id, lastname, firstname, program_id, declare_major, total_credit, total_gpa, entered_as, admit_term, predicted_graduation_semester, degree, minor, internship ) CREATE TABLE course_offering ( offering_id, course_id, semester, section_number, start_time, end_time, monday, tuesday, wednesday, thursday, friday, saturday, sunday, has_final_project, has_final_exam, textbook, class_address, allow_audit ) CREATE TABLE jobs ( job_id, job_title, description, requirement, city, state, country, zip ) CREATE TABLE course ( course_id, name, department, number, credits, advisory_requirement, enforced_requirement, description, num_semesters, num_enrolled, has_discussion, has_lab, has_projects, has_exams, num_reviews, clarity_score, easiness_score, helpfulness_score ) CREATE TABLE area ( course_id, area ) CREATE TABLE semester ( semester_id, semester, year ) CREATE TABLE instructor ( instructor_id, name, uniqname ) CREATE TABLE program_requirement ( program_id, category, min_credit, additional_req ) CREATE TABLE student_record ( student_id, course_id, semester, grade, how, transfer_source, earn_credit, repeat_term, test_id ) CREATE TABLE gsi ( course_offering_id, student_id ) CREATE TABLE comment_instructor ( instructor_id, student_id, score, comment_text ) CREATE TABLE offering_instructor ( offering_instructor_id, offering_id, instructor_id ) CREATE TABLE program ( program_id, name, college, introduction ) CREATE TABLE requirement ( requirement_id, requirement, college ) CREATE TABLE program_course ( program_id, course_id, workload, category ) CREATE TABLE course_prerequisite ( pre_course_id, course_id ) CREATE TABLE ta ( campus_job_id, student_id, location ) CREATE TABLE course_tags_count ( course_id, clear_grading, pop_quiz, group_projects, inspirational, long_lectures, extra_credit, few_tests, good_feedback, tough_tests, heavy_papers, cares_for_students, heavy_assignments, respected, participation, heavy_reading, tough_grader, hilarious, would_take_again, good_lecture, no_skip ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which upper-level electives are offered in the Fall and Winter ? SELECT### Response: SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN semester ON semester.semester_id = course_offering.semester INNER JOIN program_course ON program_course.course_id = course.course_id WHERE (semester.semester = 'FA' OR semester.semester = 'WN') AND course.department = 'EECS' AND program_course.category LIKE '%ULCS%' AND semester.year = 2016.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE flight_fare ( flight_id, fare_id ) CREATE TABLE fare ( fare_id, from_airport, to_airport, fare_basis_code, fare_airline, restriction_code, one_direction_cost, round_trip_cost, round_trip_required ) CREATE TABLE aircraft ( aircraft_code, aircraft_description, manufacturer, basic_type, engines, propulsion, wide_body, wing_span, length, weight, capacity, pay_load, cruising_speed, range_miles, pressurized ) CREATE TABLE date_day ( month_number, day_number, year, day_name ) CREATE TABLE flight ( aircraft_code_sequence, airline_code, airline_flight, arrival_time, connections, departure_time, dual_carrier, flight_days, flight_id, flight_number, from_airport, meal_code, stops, time_elapsed, to_airport ) CREATE TABLE airline ( airline_code, airline_name, note ) CREATE TABLE ground_service ( city_code, airport_code, transport_type, ground_fare ) CREATE TABLE class_of_service ( booking_class, rank, class_description ) CREATE TABLE state ( state_code, state_name, country_name ) CREATE TABLE time_zone ( time_zone_code, time_zone_name, hours_from_gmt ) CREATE TABLE compartment_class ( compartment, class_type ) CREATE TABLE days ( days_code, day_name ) CREATE TABLE food_service ( meal_code, meal_number, compartment, meal_description ) CREATE TABLE flight_stop ( flight_id, stop_number, stop_days, stop_airport, arrival_time, arrival_airline, arrival_flight_number, departure_time, departure_airline, departure_flight_number, stop_time ) CREATE TABLE month ( month_number, month_name ) CREATE TABLE time_interval ( period, begin_time, end_time ) CREATE TABLE fare_basis ( fare_basis_code, booking_class, class_type, premium, economy, discounted, night, season, basis_days ) CREATE TABLE airport_service ( city_code, airport_code, miles_distant, direction, minutes_distant ) CREATE TABLE flight_leg ( flight_id, leg_number, leg_flight ) CREATE TABLE code_description ( code, description ) CREATE TABLE city ( city_code, city_name, state_code, country_name, time_zone_code ) CREATE TABLE restriction ( restriction_code, advance_purchase, stopovers, saturday_stay_required, minimum_stay, maximum_stay, application, no_discounts ) CREATE TABLE airport ( airport_code, airport_name, airport_location, state_code, country_name, time_zone_code, minimum_connect_time ) CREATE TABLE dual_carrier ( main_airline, low_flight_number, high_flight_number, dual_airline, service_name ) CREATE TABLE equipment_sequence ( aircraft_code_sequence, aircraft_code ) -- Using valid SQLite, answer the following questions for the tables provided above. -- list nonstop flights from HOUSTON to DALLAS which arrive before 0 SELECT### 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_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'DALLAS' AND flight.arrival_time <= 0 AND flight.to_airport = AIRPORT_SERVICE_1.airport_code) AND CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'HOUSTON' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code) AND flight.stops = 0.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE ground_service ( city_code, airport_code, transport_type, ground_fare ) CREATE TABLE flight_fare ( flight_id, fare_id ) CREATE TABLE aircraft ( aircraft_code, aircraft_description, manufacturer, basic_type, engines, propulsion, wide_body, wing_span, length, weight, capacity, pay_load, cruising_speed, range_miles, pressurized ) CREATE TABLE food_service ( meal_code, meal_number, compartment, meal_description ) CREATE TABLE compartment_class ( compartment, class_type ) CREATE TABLE fare ( fare_id, from_airport, to_airport, fare_basis_code, fare_airline, restriction_code, one_direction_cost, round_trip_cost, round_trip_required ) CREATE TABLE days ( days_code, day_name ) CREATE TABLE equipment_sequence ( aircraft_code_sequence, aircraft_code ) CREATE TABLE code_description ( code, description ) CREATE TABLE restriction ( restriction_code, advance_purchase, stopovers, saturday_stay_required, minimum_stay, maximum_stay, application, no_discounts ) CREATE TABLE city ( city_code, city_name, state_code, country_name, time_zone_code ) CREATE TABLE time_zone ( time_zone_code, time_zone_name, hours_from_gmt ) CREATE TABLE date_day ( month_number, day_number, year, day_name ) CREATE TABLE month ( month_number, month_name ) CREATE TABLE state ( state_code, state_name, country_name ) CREATE TABLE fare_basis ( fare_basis_code, booking_class, class_type, premium, economy, discounted, night, season, basis_days ) CREATE TABLE flight_leg ( flight_id, leg_number, leg_flight ) CREATE TABLE flight_stop ( flight_id, stop_number, stop_days, stop_airport, arrival_time, arrival_airline, arrival_flight_number, departure_time, departure_airline, departure_flight_number, stop_time ) CREATE TABLE flight ( aircraft_code_sequence, airline_code, airline_flight, arrival_time, connections, departure_time, dual_carrier, flight_days, flight_id, flight_number, from_airport, meal_code, stops, time_elapsed, to_airport ) CREATE TABLE class_of_service ( booking_class, rank, class_description ) CREATE TABLE airline ( airline_code, airline_name, note ) CREATE TABLE airport ( airport_code, airport_name, airport_location, state_code, country_name, time_zone_code, minimum_connect_time ) CREATE TABLE time_interval ( period, begin_time, end_time ) CREATE TABLE dual_carrier ( main_airline, low_flight_number, high_flight_number, dual_airline, service_name ) CREATE TABLE airport_service ( city_code, airport_code, miles_distant, direction, minutes_distant ) -- Using valid SQLite, answer the following questions for the tables provided above. -- show me the flights from BOSTON to ATLANTA SELECT### 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 = 'ATLANTA' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code AND flight.to_airport = AIRPORT_SERVICE_1.airport_code.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE restriction ( restriction_code, advance_purchase, stopovers, saturday_stay_required, minimum_stay, maximum_stay, application, no_discounts ) CREATE TABLE flight ( aircraft_code_sequence, airline_code, airline_flight, arrival_time, connections, departure_time, dual_carrier, flight_days, flight_id, flight_number, from_airport, meal_code, stops, time_elapsed, to_airport ) CREATE TABLE airport ( airport_code, airport_name, airport_location, state_code, country_name, time_zone_code, minimum_connect_time ) CREATE TABLE airline ( airline_code, airline_name, note ) CREATE TABLE time_interval ( period, begin_time, end_time ) CREATE TABLE month ( month_number, month_name ) CREATE TABLE flight_fare ( flight_id, fare_id ) CREATE TABLE class_of_service ( booking_class, rank, class_description ) CREATE TABLE equipment_sequence ( aircraft_code_sequence, aircraft_code ) CREATE TABLE fare ( fare_id, from_airport, to_airport, fare_basis_code, fare_airline, restriction_code, one_direction_cost, round_trip_cost, round_trip_required ) CREATE TABLE food_service ( meal_code, meal_number, compartment, meal_description ) CREATE TABLE flight_stop ( flight_id, stop_number, stop_days, stop_airport, arrival_time, arrival_airline, arrival_flight_number, departure_time, departure_airline, departure_flight_number, stop_time ) CREATE TABLE time_zone ( time_zone_code, time_zone_name, hours_from_gmt ) CREATE TABLE state ( state_code, state_name, country_name ) CREATE TABLE ground_service ( city_code, airport_code, transport_type, ground_fare ) CREATE TABLE code_description ( code, description ) CREATE TABLE dual_carrier ( main_airline, low_flight_number, high_flight_number, dual_airline, service_name ) CREATE TABLE date_day ( month_number, day_number, year, day_name ) CREATE TABLE compartment_class ( compartment, class_type ) CREATE TABLE aircraft ( aircraft_code, aircraft_description, manufacturer, basic_type, engines, propulsion, wide_body, wing_span, length, weight, capacity, pay_load, cruising_speed, range_miles, pressurized ) CREATE TABLE flight_leg ( flight_id, leg_number, leg_flight ) CREATE TABLE days ( days_code, day_name ) CREATE TABLE city ( city_code, city_name, state_code, country_name, time_zone_code ) CREATE TABLE fare_basis ( fare_basis_code, booking_class, class_type, premium, economy, discounted, night, season, basis_days ) CREATE TABLE airport_service ( city_code, airport_code, miles_distant, direction, minutes_distant ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the earliest flight on thursday from ATLANTA to WASHINGTON SELECT### 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, date_day, days, flight WHERE ((CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'WASHINGTON' AND date_day.day_number = 24 AND date_day.month_number = 5 AND date_day.year = 1991 AND days.day_name = date_day.day_name AND flight.flight_days = days.days_code AND flight.to_airport = AIRPORT_SERVICE_1.airport_code) AND CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'ATLANTA' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code) AND flight.departure_time = (SELECT MIN(FLIGHTalias1.departure_time) FROM airport_service AS AIRPORT_SERVICEalias2, airport_service AS AIRPORT_SERVICEalias3, city AS CITYalias2, city AS CITYalias3, date_day AS DATE_DAYalias1, days AS DAYSalias1, flight AS FLIGHTalias1 WHERE (CITYalias3.city_code = AIRPORT_SERVICEalias3.city_code AND CITYalias3.city_name = 'WASHINGTON' AND DATE_DAYalias1.day_number = 24 AND DATE_DAYalias1.month_number = 5 AND DATE_DAYalias1.year = 1991 AND DAYSalias1.day_name = DATE_DAYalias1.day_name AND FLIGHTalias1.flight_days = DAYSalias1.days_code AND FLIGHTalias1.to_airport = AIRPORT_SERVICEalias3.airport_code) AND CITYalias2.city_code = AIRPORT_SERVICEalias2.city_code AND CITYalias2.city_name = 'ATLANTA' AND FLIGHTalias1.from_airport = AIRPORT_SERVICEalias2.airport_code).
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE paperfield ( fieldid, paperid ) CREATE TABLE writes ( paperid, authorid ) CREATE TABLE author ( authorid, authorname ) CREATE TABLE journal ( journalid, journalname ) CREATE TABLE field ( fieldid ) CREATE TABLE keyphrase ( keyphraseid, keyphrasename ) CREATE TABLE paper ( paperid, title, venueid, year, numciting, numcitedby, journalid ) CREATE TABLE paperdataset ( paperid, datasetid ) CREATE TABLE venue ( venueid, venuename ) CREATE TABLE paperkeyphrase ( paperid, keyphraseid ) CREATE TABLE cite ( citingpaperid, citedpaperid ) CREATE TABLE dataset ( datasetid, datasetname ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which papers were accepted in acl 2013 ? SELECT### Response: SELECT DISTINCT paper.paperid FROM paper, venue WHERE paper.year = 2013 AND venue.venueid = paper.venueid AND venue.venuename = 'acl'.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE tip ( tip_id, business_id, text, user_id, likes, year, month ) CREATE TABLE user ( uid, user_id, name ) CREATE TABLE category ( id, business_id, category_name ) CREATE TABLE business ( bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state ) CREATE TABLE review ( rid, business_id, user_id, rating, text, year, month ) CREATE TABLE neighborhood ( id, business_id, neighborhood_name ) CREATE TABLE checkin ( cid, business_id, count, day ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many restaurant are there in the Hazelwood district of Dallas ? SELECT### Response: SELECT COUNT(DISTINCT (business.name)) FROM business, category, neighborhood WHERE business.city = 'Dallas' AND category.business_id = business.business_id AND category.category_name = 'restaurant' AND neighborhood.business_id = business.business_id AND neighborhood.neighborhood_name = 'Hazelwood'.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE flight_stop ( flight_id, stop_number, stop_days, stop_airport, arrival_time, arrival_airline, arrival_flight_number, departure_time, departure_airline, departure_flight_number, stop_time ) CREATE TABLE month ( month_number, month_name ) CREATE TABLE compartment_class ( compartment, class_type ) CREATE TABLE ground_service ( city_code, airport_code, transport_type, ground_fare ) CREATE TABLE food_service ( meal_code, meal_number, compartment, meal_description ) CREATE TABLE days ( days_code, day_name ) CREATE TABLE airport_service ( city_code, airport_code, miles_distant, direction, minutes_distant ) CREATE TABLE state ( state_code, state_name, country_name ) CREATE TABLE code_description ( code, description ) CREATE TABLE city ( city_code, city_name, state_code, country_name, time_zone_code ) CREATE TABLE flight_fare ( flight_id, fare_id ) CREATE TABLE time_interval ( period, begin_time, end_time ) CREATE TABLE aircraft ( aircraft_code, aircraft_description, manufacturer, basic_type, engines, propulsion, wide_body, wing_span, length, weight, capacity, pay_load, cruising_speed, range_miles, pressurized ) CREATE TABLE fare_basis ( fare_basis_code, booking_class, class_type, premium, economy, discounted, night, season, basis_days ) CREATE TABLE flight_leg ( flight_id, leg_number, leg_flight ) CREATE TABLE date_day ( month_number, day_number, year, day_name ) CREATE TABLE time_zone ( time_zone_code, time_zone_name, hours_from_gmt ) CREATE TABLE airline ( airline_code, airline_name, note ) CREATE TABLE restriction ( restriction_code, advance_purchase, stopovers, saturday_stay_required, minimum_stay, maximum_stay, application, no_discounts ) CREATE TABLE airport ( airport_code, airport_name, airport_location, state_code, country_name, time_zone_code, minimum_connect_time ) CREATE TABLE class_of_service ( booking_class, rank, class_description ) CREATE TABLE equipment_sequence ( aircraft_code_sequence, aircraft_code ) CREATE TABLE flight ( aircraft_code_sequence, airline_code, airline_flight, arrival_time, connections, departure_time, dual_carrier, flight_days, flight_id, flight_number, from_airport, meal_code, stops, time_elapsed, to_airport ) CREATE TABLE dual_carrier ( main_airline, low_flight_number, high_flight_number, dual_airline, service_name ) CREATE TABLE fare ( fare_id, from_airport, to_airport, fare_basis_code, fare_airline, restriction_code, one_direction_cost, round_trip_cost, round_trip_required ) -- Using valid SQLite, answer the following questions for the tables provided above. -- thank you for that information now i would like information on a flight on 4 16 from ATLANTA to PHILADELPHIA early in the morning SELECT### 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, date_day, days, flight WHERE (((flight.departure_time BETWEEN 0 AND 800) AND date_day.day_number = 16 AND date_day.month_number = 4 AND date_day.year = 1991 AND days.day_name = date_day.day_name AND flight.flight_days = days.days_code) AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'PHILADELPHIA' AND flight.to_airport = AIRPORT_SERVICE_1.airport_code) AND CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'ATLANTA' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE course_offering ( offering_id, course_id, semester, section_number, start_time, end_time, monday, tuesday, wednesday, thursday, friday, saturday, sunday, has_final_project, has_final_exam, textbook, class_address, allow_audit ) CREATE TABLE course_tags_count ( course_id, clear_grading, pop_quiz, group_projects, inspirational, long_lectures, extra_credit, few_tests, good_feedback, tough_tests, heavy_papers, cares_for_students, heavy_assignments, respected, participation, heavy_reading, tough_grader, hilarious, would_take_again, good_lecture, no_skip ) CREATE TABLE program_course ( program_id, course_id, workload, category ) CREATE TABLE ta ( campus_job_id, student_id, location ) CREATE TABLE instructor ( instructor_id, name, uniqname ) CREATE TABLE jobs ( job_id, job_title, description, requirement, city, state, country, zip ) CREATE TABLE semester ( semester_id, semester, year ) CREATE TABLE student ( student_id, lastname, firstname, program_id, declare_major, total_credit, total_gpa, entered_as, admit_term, predicted_graduation_semester, degree, minor, internship ) CREATE TABLE area ( course_id, area ) CREATE TABLE course_prerequisite ( pre_course_id, course_id ) CREATE TABLE gsi ( course_offering_id, student_id ) CREATE TABLE program_requirement ( program_id, category, min_credit, additional_req ) CREATE TABLE requirement ( requirement_id, requirement, college ) CREATE TABLE program ( program_id, name, college, introduction ) CREATE TABLE course ( course_id, name, department, number, credits, advisory_requirement, enforced_requirement, description, num_semesters, num_enrolled, has_discussion, has_lab, has_projects, has_exams, num_reviews, clarity_score, easiness_score, helpfulness_score ) CREATE TABLE comment_instructor ( instructor_id, student_id, score, comment_text ) CREATE TABLE student_record ( student_id, course_id, semester, grade, how, transfer_source, earn_credit, repeat_term, test_id ) CREATE TABLE offering_instructor ( offering_instructor_id, offering_id, instructor_id ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Are there courses worth 3 credits ? SELECT### Response: SELECT DISTINCT name, number FROM course WHERE credits = 3 AND department = 'EECS'.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE airport ( airport_code, airport_name, airport_location, state_code, country_name, time_zone_code, minimum_connect_time ) CREATE TABLE food_service ( meal_code, meal_number, compartment, meal_description ) CREATE TABLE fare_basis ( fare_basis_code, booking_class, class_type, premium, economy, discounted, night, season, basis_days ) CREATE TABLE airline ( airline_code, airline_name, note ) CREATE TABLE flight_leg ( flight_id, leg_number, leg_flight ) CREATE TABLE airport_service ( city_code, airport_code, miles_distant, direction, minutes_distant ) CREATE TABLE days ( days_code, day_name ) CREATE TABLE fare ( fare_id, from_airport, to_airport, fare_basis_code, fare_airline, restriction_code, one_direction_cost, round_trip_cost, round_trip_required ) CREATE TABLE compartment_class ( compartment, class_type ) CREATE TABLE restriction ( restriction_code, advance_purchase, stopovers, saturday_stay_required, minimum_stay, maximum_stay, application, no_discounts ) CREATE TABLE ground_service ( city_code, airport_code, transport_type, ground_fare ) CREATE TABLE city ( city_code, city_name, state_code, country_name, time_zone_code ) CREATE TABLE time_zone ( time_zone_code, time_zone_name, hours_from_gmt ) CREATE TABLE date_day ( month_number, day_number, year, day_name ) CREATE TABLE month ( month_number, month_name ) CREATE TABLE aircraft ( aircraft_code, aircraft_description, manufacturer, basic_type, engines, propulsion, wide_body, wing_span, length, weight, capacity, pay_load, cruising_speed, range_miles, pressurized ) CREATE TABLE code_description ( code, description ) CREATE TABLE flight_stop ( flight_id, stop_number, stop_days, stop_airport, arrival_time, arrival_airline, arrival_flight_number, departure_time, departure_airline, departure_flight_number, stop_time ) CREATE TABLE time_interval ( period, begin_time, end_time ) CREATE TABLE flight_fare ( flight_id, fare_id ) CREATE TABLE flight ( aircraft_code_sequence, airline_code, airline_flight, arrival_time, connections, departure_time, dual_carrier, flight_days, flight_id, flight_number, from_airport, meal_code, stops, time_elapsed, to_airport ) CREATE TABLE equipment_sequence ( aircraft_code_sequence, aircraft_code ) CREATE TABLE state ( state_code, state_name, country_name ) CREATE TABLE dual_carrier ( main_airline, low_flight_number, high_flight_number, dual_airline, service_name ) CREATE TABLE class_of_service ( booking_class, rank, class_description ) -- Using valid SQLite, answer the following questions for the tables provided above. -- which NW and UA flights go through DENVER before 1200 SELECT### Response: SELECT DISTINCT flight.flight_id FROM airport_service, city, flight, flight_stop WHERE ((flight.airline_code = 'NW') OR (flight.airline_code = 'UA')) AND city.city_code = airport_service.city_code AND city.city_name = 'DENVER' AND flight_stop.arrival_time < 1200 AND flight_stop.stop_airport = airport_service.airport_code AND flight.flight_id = flight_stop.flight_id.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE restaurant ( id, name, food_type, city_name, rating ) CREATE TABLE geographic ( city_name, county, region ) CREATE TABLE location ( restaurant_id, house_number, street_name, city_name ) -- Using valid SQLite, answer the following questions for the tables provided above. -- where can i eat arabic food on buchanan in san francisco ? SELECT### Response: SELECT location.house_number, restaurant.name FROM location, restaurant WHERE location.city_name = 'san francisco' AND location.street_name = 'buchanan' AND restaurant.food_type = 'arabic' AND restaurant.id = location.restaurant_id AND restaurant.rating > 2.5.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE flight_fare ( flight_id, fare_id ) CREATE TABLE city ( city_code, city_name, state_code, country_name, time_zone_code ) CREATE TABLE flight ( aircraft_code_sequence, airline_code, airline_flight, arrival_time, connections, departure_time, dual_carrier, flight_days, flight_id, flight_number, from_airport, meal_code, stops, time_elapsed, to_airport ) CREATE TABLE month ( month_number, month_name ) CREATE TABLE date_day ( month_number, day_number, year, day_name ) CREATE TABLE airport_service ( city_code, airport_code, miles_distant, direction, minutes_distant ) CREATE TABLE state ( state_code, state_name, country_name ) CREATE TABLE dual_carrier ( main_airline, low_flight_number, high_flight_number, dual_airline, service_name ) CREATE TABLE code_description ( code, description ) CREATE TABLE time_interval ( period, begin_time, end_time ) CREATE TABLE food_service ( meal_code, meal_number, compartment, meal_description ) CREATE TABLE compartment_class ( compartment, class_type ) CREATE TABLE flight_leg ( flight_id, leg_number, leg_flight ) CREATE TABLE airport ( airport_code, airport_name, airport_location, state_code, country_name, time_zone_code, minimum_connect_time ) CREATE TABLE fare_basis ( fare_basis_code, booking_class, class_type, premium, economy, discounted, night, season, basis_days ) CREATE TABLE days ( days_code, day_name ) CREATE TABLE ground_service ( city_code, airport_code, transport_type, ground_fare ) CREATE TABLE flight_stop ( flight_id, stop_number, stop_days, stop_airport, arrival_time, arrival_airline, arrival_flight_number, departure_time, departure_airline, departure_flight_number, stop_time ) CREATE TABLE equipment_sequence ( aircraft_code_sequence, aircraft_code ) CREATE TABLE restriction ( restriction_code, advance_purchase, stopovers, saturday_stay_required, minimum_stay, maximum_stay, application, no_discounts ) CREATE TABLE fare ( fare_id, from_airport, to_airport, fare_basis_code, fare_airline, restriction_code, one_direction_cost, round_trip_cost, round_trip_required ) CREATE TABLE airline ( airline_code, airline_name, note ) CREATE TABLE class_of_service ( booking_class, rank, class_description ) CREATE TABLE time_zone ( time_zone_code, time_zone_name, hours_from_gmt ) CREATE TABLE aircraft ( aircraft_code, aircraft_description, manufacturer, basic_type, engines, propulsion, wide_body, wing_span, length, weight, capacity, pay_load, cruising_speed, range_miles, pressurized ) -- Using valid SQLite, answer the following questions for the tables provided above. -- show me the flights that go from SAN DIEGO to NEWARK by way of HOUSTON SELECT### Response: SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, airport_service AS AIRPORT_SERVICE_2, city AS CITY_0, city AS CITY_1, city AS CITY_2, flight, flight_stop WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'NEWARK' AND CITY_2.city_code = AIRPORT_SERVICE_2.city_code AND CITY_2.city_name = 'HOUSTON' AND flight_stop.stop_airport = AIRPORT_SERVICE_2.airport_code AND flight.flight_id = flight_stop.flight_id AND flight.to_airport = AIRPORT_SERVICE_1.airport_code) AND CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'SAN DIEGO' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE fare ( fare_id, from_airport, to_airport, fare_basis_code, fare_airline, restriction_code, one_direction_cost, round_trip_cost, round_trip_required ) CREATE TABLE city ( city_code, city_name, state_code, country_name, time_zone_code ) CREATE TABLE state ( state_code, state_name, country_name ) CREATE TABLE month ( month_number, month_name ) CREATE TABLE airline ( airline_code, airline_name, note ) CREATE TABLE flight_leg ( flight_id, leg_number, leg_flight ) CREATE TABLE compartment_class ( compartment, class_type ) CREATE TABLE ground_service ( city_code, airport_code, transport_type, ground_fare ) CREATE TABLE date_day ( month_number, day_number, year, day_name ) CREATE TABLE airport ( airport_code, airport_name, airport_location, state_code, country_name, time_zone_code, minimum_connect_time ) CREATE TABLE airport_service ( city_code, airport_code, miles_distant, direction, minutes_distant ) CREATE TABLE flight_stop ( flight_id, stop_number, stop_days, stop_airport, arrival_time, arrival_airline, arrival_flight_number, departure_time, departure_airline, departure_flight_number, stop_time ) CREATE TABLE code_description ( code, description ) CREATE TABLE dual_carrier ( main_airline, low_flight_number, high_flight_number, dual_airline, service_name ) CREATE TABLE flight ( aircraft_code_sequence, airline_code, airline_flight, arrival_time, connections, departure_time, dual_carrier, flight_days, flight_id, flight_number, from_airport, meal_code, stops, time_elapsed, to_airport ) CREATE TABLE class_of_service ( booking_class, rank, class_description ) CREATE TABLE food_service ( meal_code, meal_number, compartment, meal_description ) CREATE TABLE restriction ( restriction_code, advance_purchase, stopovers, saturday_stay_required, minimum_stay, maximum_stay, application, no_discounts ) CREATE TABLE time_zone ( time_zone_code, time_zone_name, hours_from_gmt ) CREATE TABLE fare_basis ( fare_basis_code, booking_class, class_type, premium, economy, discounted, night, season, basis_days ) CREATE TABLE flight_fare ( flight_id, fare_id ) CREATE TABLE equipment_sequence ( aircraft_code_sequence, aircraft_code ) CREATE TABLE time_interval ( period, begin_time, end_time ) CREATE TABLE days ( days_code, day_name ) CREATE TABLE aircraft ( aircraft_code, aircraft_description, manufacturer, basic_type, engines, propulsion, wide_body, wing_span, length, weight, capacity, pay_load, cruising_speed, range_miles, pressurized ) -- Using valid SQLite, answer the following questions for the tables provided above. -- flight numbers on AA from PHOENIX to MILWAUKEE SELECT### 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 = 'MILWAUKEE' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'PHOENIX' AND flight.to_airport = AIRPORT_SERVICE_0.airport_code AND flight.from_airport = AIRPORT_SERVICE_1.airport_code) AND flight.airline_code = 'AA'.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE fare ( fare_id, from_airport, to_airport, fare_basis_code, fare_airline, restriction_code, one_direction_cost, round_trip_cost, round_trip_required ) CREATE TABLE fare_basis ( fare_basis_code, booking_class, class_type, premium, economy, discounted, night, season, basis_days ) CREATE TABLE flight_stop ( flight_id, stop_number, stop_days, stop_airport, arrival_time, arrival_airline, arrival_flight_number, departure_time, departure_airline, departure_flight_number, stop_time ) CREATE TABLE code_description ( code, description ) CREATE TABLE class_of_service ( booking_class, rank, class_description ) CREATE TABLE time_interval ( period, begin_time, end_time ) CREATE TABLE flight ( aircraft_code_sequence, airline_code, airline_flight, arrival_time, connections, departure_time, dual_carrier, flight_days, flight_id, flight_number, from_airport, meal_code, stops, time_elapsed, to_airport ) CREATE TABLE dual_carrier ( main_airline, low_flight_number, high_flight_number, dual_airline, service_name ) CREATE TABLE flight_leg ( flight_id, leg_number, leg_flight ) CREATE TABLE compartment_class ( compartment, class_type ) CREATE TABLE month ( month_number, month_name ) CREATE TABLE state ( state_code, state_name, country_name ) CREATE TABLE airport ( airport_code, airport_name, airport_location, state_code, country_name, time_zone_code, minimum_connect_time ) CREATE TABLE aircraft ( aircraft_code, aircraft_description, manufacturer, basic_type, engines, propulsion, wide_body, wing_span, length, weight, capacity, pay_load, cruising_speed, range_miles, pressurized ) CREATE TABLE equipment_sequence ( aircraft_code_sequence, aircraft_code ) CREATE TABLE ground_service ( city_code, airport_code, transport_type, ground_fare ) CREATE TABLE city ( city_code, city_name, state_code, country_name, time_zone_code ) CREATE TABLE flight_fare ( flight_id, fare_id ) CREATE TABLE food_service ( meal_code, meal_number, compartment, meal_description ) CREATE TABLE airline ( airline_code, airline_name, note ) CREATE TABLE days ( days_code, day_name ) CREATE TABLE airport_service ( city_code, airport_code, miles_distant, direction, minutes_distant ) CREATE TABLE date_day ( month_number, day_number, year, day_name ) CREATE TABLE restriction ( restriction_code, advance_purchase, stopovers, saturday_stay_required, minimum_stay, maximum_stay, application, no_discounts ) CREATE TABLE time_zone ( time_zone_code, time_zone_name, hours_from_gmt ) -- Using valid SQLite, answer the following questions for the tables provided above. -- show me all DAILY flights from MILWAUKEE to ORLANDO SELECT### 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 = 'MILWAUKEE' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'ORLANDO' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code AND flight.to_airport = AIRPORT_SERVICE_1.airport_code) AND flight.flight_days = 'DAILY'.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE airport ( airport_code, airport_name, airport_location, state_code, country_name, time_zone_code, minimum_connect_time ) CREATE TABLE flight_fare ( flight_id, fare_id ) CREATE TABLE fare_basis ( fare_basis_code, booking_class, class_type, premium, economy, discounted, night, season, basis_days ) CREATE TABLE city ( city_code, city_name, state_code, country_name, time_zone_code ) CREATE TABLE month ( month_number, month_name ) CREATE TABLE date_day ( month_number, day_number, year, day_name ) CREATE TABLE time_zone ( time_zone_code, time_zone_name, hours_from_gmt ) CREATE TABLE food_service ( meal_code, meal_number, compartment, meal_description ) CREATE TABLE airline ( airline_code, airline_name, note ) CREATE TABLE ground_service ( city_code, airport_code, transport_type, ground_fare ) CREATE TABLE airport_service ( city_code, airport_code, miles_distant, direction, minutes_distant ) CREATE TABLE compartment_class ( compartment, class_type ) CREATE TABLE days ( days_code, day_name ) CREATE TABLE dual_carrier ( main_airline, low_flight_number, high_flight_number, dual_airline, service_name ) CREATE TABLE equipment_sequence ( aircraft_code_sequence, aircraft_code ) CREATE TABLE class_of_service ( booking_class, rank, class_description ) CREATE TABLE flight ( aircraft_code_sequence, airline_code, airline_flight, arrival_time, connections, departure_time, dual_carrier, flight_days, flight_id, flight_number, from_airport, meal_code, stops, time_elapsed, to_airport ) CREATE TABLE fare ( fare_id, from_airport, to_airport, fare_basis_code, fare_airline, restriction_code, one_direction_cost, round_trip_cost, round_trip_required ) CREATE TABLE aircraft ( aircraft_code, aircraft_description, manufacturer, basic_type, engines, propulsion, wide_body, wing_span, length, weight, capacity, pay_load, cruising_speed, range_miles, pressurized ) CREATE TABLE state ( state_code, state_name, country_name ) CREATE TABLE time_interval ( period, begin_time, end_time ) CREATE TABLE code_description ( code, description ) CREATE TABLE flight_stop ( flight_id, stop_number, stop_days, stop_airport, arrival_time, arrival_airline, arrival_flight_number, departure_time, departure_airline, departure_flight_number, stop_time ) CREATE TABLE restriction ( restriction_code, advance_purchase, stopovers, saturday_stay_required, minimum_stay, maximum_stay, application, no_discounts ) CREATE TABLE flight_leg ( flight_id, leg_number, leg_flight ) -- Using valid SQLite, answer the following questions for the tables provided above. -- is there a flight on AA from BOSTON to DENVER SELECT### 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 = 'DENVER' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BOSTON' AND flight.to_airport = AIRPORT_SERVICE_0.airport_code AND flight.from_airport = AIRPORT_SERVICE_1.airport_code) AND flight.airline_code = 'AA'.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE instructor ( instructor_id, name, uniqname ) CREATE TABLE course_prerequisite ( pre_course_id, course_id ) CREATE TABLE student_record ( student_id, course_id, semester, grade, how, transfer_source, earn_credit, repeat_term, test_id ) CREATE TABLE course ( course_id, name, department, number, credits, advisory_requirement, enforced_requirement, description, num_semesters, num_enrolled, has_discussion, has_lab, has_projects, has_exams, num_reviews, clarity_score, easiness_score, helpfulness_score ) CREATE TABLE course_offering ( offering_id, course_id, semester, section_number, start_time, end_time, monday, tuesday, wednesday, thursday, friday, saturday, sunday, has_final_project, has_final_exam, textbook, class_address, allow_audit ) CREATE TABLE ta ( campus_job_id, student_id, location ) CREATE TABLE gsi ( course_offering_id, student_id ) CREATE TABLE comment_instructor ( instructor_id, student_id, score, comment_text ) CREATE TABLE program_requirement ( program_id, category, min_credit, additional_req ) CREATE TABLE offering_instructor ( offering_instructor_id, offering_id, instructor_id ) CREATE TABLE requirement ( requirement_id, requirement, college ) CREATE TABLE program_course ( program_id, course_id, workload, category ) CREATE TABLE area ( course_id, area ) CREATE TABLE course_tags_count ( course_id, clear_grading, pop_quiz, group_projects, inspirational, long_lectures, extra_credit, few_tests, good_feedback, tough_tests, heavy_papers, cares_for_students, heavy_assignments, respected, participation, heavy_reading, tough_grader, hilarious, would_take_again, good_lecture, no_skip ) CREATE TABLE program ( program_id, name, college, introduction ) CREATE TABLE student ( student_id, lastname, firstname, program_id, declare_major, total_credit, total_gpa, entered_as, admit_term, predicted_graduation_semester, degree, minor, internship ) CREATE TABLE semester ( semester_id, semester, year ) CREATE TABLE jobs ( job_id, job_title, description, requirement, city, state, country, zip ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Will I need KINESLGY 509 to graduate ? SELECT### Response: SELECT COUNT(*) > 0 FROM course, program_course WHERE course.department = 'KINESLGY' AND course.number = 509 AND program_course.category LIKE '%Core%' AND program_course.course_id = course.course_id.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE aircraft ( aircraft_code, aircraft_description, manufacturer, basic_type, engines, propulsion, wide_body, wing_span, length, weight, capacity, pay_load, cruising_speed, range_miles, pressurized ) CREATE TABLE time_interval ( period, begin_time, end_time ) CREATE TABLE equipment_sequence ( aircraft_code_sequence, aircraft_code ) CREATE TABLE days ( days_code, day_name ) CREATE TABLE time_zone ( time_zone_code, time_zone_name, hours_from_gmt ) CREATE TABLE food_service ( meal_code, meal_number, compartment, meal_description ) CREATE TABLE ground_service ( city_code, airport_code, transport_type, ground_fare ) CREATE TABLE flight_fare ( flight_id, fare_id ) CREATE TABLE month ( month_number, month_name ) CREATE TABLE airport ( airport_code, airport_name, airport_location, state_code, country_name, time_zone_code, minimum_connect_time ) CREATE TABLE class_of_service ( booking_class, rank, class_description ) CREATE TABLE dual_carrier ( main_airline, low_flight_number, high_flight_number, dual_airline, service_name ) CREATE TABLE flight_leg ( flight_id, leg_number, leg_flight ) CREATE TABLE fare_basis ( fare_basis_code, booking_class, class_type, premium, economy, discounted, night, season, basis_days ) CREATE TABLE airline ( airline_code, airline_name, note ) CREATE TABLE flight ( aircraft_code_sequence, airline_code, airline_flight, arrival_time, connections, departure_time, dual_carrier, flight_days, flight_id, flight_number, from_airport, meal_code, stops, time_elapsed, to_airport ) CREATE TABLE airport_service ( city_code, airport_code, miles_distant, direction, minutes_distant ) CREATE TABLE date_day ( month_number, day_number, year, day_name ) CREATE TABLE fare ( fare_id, from_airport, to_airport, fare_basis_code, fare_airline, restriction_code, one_direction_cost, round_trip_cost, round_trip_required ) CREATE TABLE compartment_class ( compartment, class_type ) CREATE TABLE code_description ( code, description ) CREATE TABLE flight_stop ( flight_id, stop_number, stop_days, stop_airport, arrival_time, arrival_airline, arrival_flight_number, departure_time, departure_airline, departure_flight_number, stop_time ) CREATE TABLE state ( state_code, state_name, country_name ) CREATE TABLE city ( city_code, city_name, state_code, country_name, time_zone_code ) CREATE TABLE restriction ( restriction_code, advance_purchase, stopovers, saturday_stay_required, minimum_stay, maximum_stay, application, no_discounts ) -- Using valid SQLite, answer the following questions for the tables provided above. -- flights from CLEVELAND to KANSAS CITY SELECT### 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 = 'CLEVELAND' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'KANSAS CITY' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code AND flight.to_airport = AIRPORT_SERVICE_1.airport_code.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE restaurant ( id, name, food_type, city_name, rating ) CREATE TABLE geographic ( city_name, county, region ) CREATE TABLE location ( restaurant_id, house_number, street_name, city_name ) -- Using valid SQLite, answer the following questions for the tables provided above. -- where are some good arabic -s in mountain view ? SELECT### Response: SELECT location.house_number, restaurant.name FROM location, restaurant WHERE location.city_name = 'mountain view' AND restaurant.food_type = 'arabic' AND restaurant.id = location.restaurant_id AND restaurant.rating > 2.5.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE time_zone ( time_zone_code, time_zone_name, hours_from_gmt ) CREATE TABLE class_of_service ( booking_class, rank, class_description ) CREATE TABLE airport ( airport_code, airport_name, airport_location, state_code, country_name, time_zone_code, minimum_connect_time ) CREATE TABLE restriction ( restriction_code, advance_purchase, stopovers, saturday_stay_required, minimum_stay, maximum_stay, application, no_discounts ) CREATE TABLE flight_stop ( flight_id, stop_number, stop_days, stop_airport, arrival_time, arrival_airline, arrival_flight_number, departure_time, departure_airline, departure_flight_number, stop_time ) CREATE TABLE time_interval ( period, begin_time, end_time ) CREATE TABLE ground_service ( city_code, airport_code, transport_type, ground_fare ) CREATE TABLE state ( state_code, state_name, country_name ) CREATE TABLE flight_leg ( flight_id, leg_number, leg_flight ) CREATE TABLE city ( city_code, city_name, state_code, country_name, time_zone_code ) CREATE TABLE aircraft ( aircraft_code, aircraft_description, manufacturer, basic_type, engines, propulsion, wide_body, wing_span, length, weight, capacity, pay_load, cruising_speed, range_miles, pressurized ) CREATE TABLE date_day ( month_number, day_number, year, day_name ) CREATE TABLE flight ( aircraft_code_sequence, airline_code, airline_flight, arrival_time, connections, departure_time, dual_carrier, flight_days, flight_id, flight_number, from_airport, meal_code, stops, time_elapsed, to_airport ) CREATE TABLE month ( month_number, month_name ) CREATE TABLE fare_basis ( fare_basis_code, booking_class, class_type, premium, economy, discounted, night, season, basis_days ) CREATE TABLE fare ( fare_id, from_airport, to_airport, fare_basis_code, fare_airline, restriction_code, one_direction_cost, round_trip_cost, round_trip_required ) CREATE TABLE compartment_class ( compartment, class_type ) CREATE TABLE airline ( airline_code, airline_name, note ) CREATE TABLE food_service ( meal_code, meal_number, compartment, meal_description ) CREATE TABLE airport_service ( city_code, airport_code, miles_distant, direction, minutes_distant ) CREATE TABLE code_description ( code, description ) CREATE TABLE days ( days_code, day_name ) CREATE TABLE flight_fare ( flight_id, fare_id ) CREATE TABLE equipment_sequence ( aircraft_code_sequence, aircraft_code ) CREATE TABLE dual_carrier ( main_airline, low_flight_number, high_flight_number, dual_airline, service_name ) -- Using valid SQLite, answer the following questions for the tables provided above. -- SUNDAY flights from NEW YORK to LAS VEGAS SELECT### 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, days, flight WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'LAS VEGAS' AND days.day_name = 'SUNDAY' AND flight.flight_days = days.days_code AND flight.to_airport = AIRPORT_SERVICE_1.airport_code) AND CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'NEW YORK' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE flight_leg ( flight_id, leg_number, leg_flight ) CREATE TABLE equipment_sequence ( aircraft_code_sequence, aircraft_code ) CREATE TABLE fare_basis ( fare_basis_code, booking_class, class_type, premium, economy, discounted, night, season, basis_days ) CREATE TABLE airline ( airline_code, airline_name, note ) CREATE TABLE state ( state_code, state_name, country_name ) CREATE TABLE days ( days_code, day_name ) CREATE TABLE time_zone ( time_zone_code, time_zone_name, hours_from_gmt ) CREATE TABLE fare ( fare_id, from_airport, to_airport, fare_basis_code, fare_airline, restriction_code, one_direction_cost, round_trip_cost, round_trip_required ) CREATE TABLE aircraft ( aircraft_code, aircraft_description, manufacturer, basic_type, engines, propulsion, wide_body, wing_span, length, weight, capacity, pay_load, cruising_speed, range_miles, pressurized ) CREATE TABLE code_description ( code, description ) CREATE TABLE class_of_service ( booking_class, rank, class_description ) CREATE TABLE month ( month_number, month_name ) CREATE TABLE date_day ( month_number, day_number, year, day_name ) CREATE TABLE flight ( aircraft_code_sequence, airline_code, airline_flight, arrival_time, connections, departure_time, dual_carrier, flight_days, flight_id, flight_number, from_airport, meal_code, stops, time_elapsed, to_airport ) CREATE TABLE city ( city_code, city_name, state_code, country_name, time_zone_code ) CREATE TABLE dual_carrier ( main_airline, low_flight_number, high_flight_number, dual_airline, service_name ) CREATE TABLE ground_service ( city_code, airport_code, transport_type, ground_fare ) CREATE TABLE flight_fare ( flight_id, fare_id ) CREATE TABLE food_service ( meal_code, meal_number, compartment, meal_description ) CREATE TABLE airport_service ( city_code, airport_code, miles_distant, direction, minutes_distant ) CREATE TABLE time_interval ( period, begin_time, end_time ) CREATE TABLE airport ( airport_code, airport_name, airport_location, state_code, country_name, time_zone_code, minimum_connect_time ) CREATE TABLE flight_stop ( flight_id, stop_number, stop_days, stop_airport, arrival_time, arrival_airline, arrival_flight_number, departure_time, departure_airline, departure_flight_number, stop_time ) CREATE TABLE compartment_class ( compartment, class_type ) CREATE TABLE restriction ( restriction_code, advance_purchase, stopovers, saturday_stay_required, minimum_stay, maximum_stay, application, no_discounts ) -- Using valid SQLite, answer the following questions for the tables provided above. -- show the flights from DENVER to SAN FRANCISCO SELECT### 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 = 'DENVER' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'SAN FRANCISCO' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code AND flight.to_airport = AIRPORT_SERVICE_1.airport_code.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE flight ( aircraft_code_sequence, airline_code, airline_flight, arrival_time, connections, departure_time, dual_carrier, flight_days, flight_id, flight_number, from_airport, meal_code, stops, time_elapsed, to_airport ) CREATE TABLE ground_service ( city_code, airport_code, transport_type, ground_fare ) CREATE TABLE time_zone ( time_zone_code, time_zone_name, hours_from_gmt ) CREATE TABLE airport_service ( city_code, airport_code, miles_distant, direction, minutes_distant ) CREATE TABLE fare ( fare_id, from_airport, to_airport, fare_basis_code, fare_airline, restriction_code, one_direction_cost, round_trip_cost, round_trip_required ) CREATE TABLE state ( state_code, state_name, country_name ) CREATE TABLE month ( month_number, month_name ) CREATE TABLE flight_stop ( flight_id, stop_number, stop_days, stop_airport, arrival_time, arrival_airline, arrival_flight_number, departure_time, departure_airline, departure_flight_number, stop_time ) CREATE TABLE code_description ( code, description ) CREATE TABLE airport ( airport_code, airport_name, airport_location, state_code, country_name, time_zone_code, minimum_connect_time ) CREATE TABLE dual_carrier ( main_airline, low_flight_number, high_flight_number, dual_airline, service_name ) CREATE TABLE class_of_service ( booking_class, rank, class_description ) CREATE TABLE flight_fare ( flight_id, fare_id ) CREATE TABLE days ( days_code, day_name ) CREATE TABLE airline ( airline_code, airline_name, note ) CREATE TABLE restriction ( restriction_code, advance_purchase, stopovers, saturday_stay_required, minimum_stay, maximum_stay, application, no_discounts ) CREATE TABLE fare_basis ( fare_basis_code, booking_class, class_type, premium, economy, discounted, night, season, basis_days ) CREATE TABLE equipment_sequence ( aircraft_code_sequence, aircraft_code ) CREATE TABLE aircraft ( aircraft_code, aircraft_description, manufacturer, basic_type, engines, propulsion, wide_body, wing_span, length, weight, capacity, pay_load, cruising_speed, range_miles, pressurized ) CREATE TABLE time_interval ( period, begin_time, end_time ) CREATE TABLE flight_leg ( flight_id, leg_number, leg_flight ) CREATE TABLE date_day ( month_number, day_number, year, day_name ) CREATE TABLE compartment_class ( compartment, class_type ) CREATE TABLE city ( city_code, city_name, state_code, country_name, time_zone_code ) CREATE TABLE food_service ( meal_code, meal_number, compartment, meal_description ) -- Using valid SQLite, answer the following questions for the tables provided above. -- i need to go from BOSTON to DENVER and then to SAN FRANCISCO SELECT### 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) OR (CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'DENVER' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'SAN FRANCISCO' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code AND flight.to_airport = AIRPORT_SERVICE_1.airport_code).
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE offering_instructor ( offering_instructor_id, offering_id, instructor_id ) CREATE TABLE requirement ( requirement_id, requirement, college ) CREATE TABLE instructor ( instructor_id, name, uniqname ) CREATE TABLE program ( program_id, name, college, introduction ) CREATE TABLE semester ( semester_id, semester, year ) CREATE TABLE course_prerequisite ( pre_course_id, course_id ) CREATE TABLE program_course ( program_id, course_id, workload, category ) CREATE TABLE student_record ( student_id, course_id, semester, grade, how, transfer_source, earn_credit, repeat_term, test_id ) CREATE TABLE program_requirement ( program_id, category, min_credit, additional_req ) CREATE TABLE ta ( campus_job_id, student_id, location ) CREATE TABLE course_tags_count ( course_id, clear_grading, pop_quiz, group_projects, inspirational, long_lectures, extra_credit, few_tests, good_feedback, tough_tests, heavy_papers, cares_for_students, heavy_assignments, respected, participation, heavy_reading, tough_grader, hilarious, would_take_again, good_lecture, no_skip ) CREATE TABLE jobs ( job_id, job_title, description, requirement, city, state, country, zip ) CREATE TABLE course ( course_id, name, department, number, credits, advisory_requirement, enforced_requirement, description, num_semesters, num_enrolled, has_discussion, has_lab, has_projects, has_exams, num_reviews, clarity_score, easiness_score, helpfulness_score ) CREATE TABLE course_offering ( offering_id, course_id, semester, section_number, start_time, end_time, monday, tuesday, wednesday, thursday, friday, saturday, sunday, has_final_project, has_final_exam, textbook, class_address, allow_audit ) CREATE TABLE area ( course_id, area ) CREATE TABLE student ( student_id, lastname, firstname, program_id, declare_major, total_credit, total_gpa, entered_as, admit_term, predicted_graduation_semester, degree, minor, internship ) CREATE TABLE comment_instructor ( instructor_id, student_id, score, comment_text ) CREATE TABLE gsi ( course_offering_id, student_id ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What has Dr. India Plough taught in the past ? SELECT### Response: SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, instructor, offering_instructor WHERE course_offering.semester < (SELECT SEMESTERalias0.semester_id FROM semester AS SEMESTERalias0 WHERE SEMESTERalias0.semester = 'WN' AND SEMESTERalias0.year = 2016) AND course.course_id = course_offering.course_id AND instructor.name LIKE '%India Plough%' AND offering_instructor.instructor_id = instructor.instructor_id AND offering_instructor.offering_id = course_offering.offering_id.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE business ( bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state ) CREATE TABLE user ( uid, user_id, name ) CREATE TABLE checkin ( cid, business_id, count, day ) CREATE TABLE category ( id, business_id, category_name ) CREATE TABLE review ( rid, business_id, user_id, rating, text, year, month ) CREATE TABLE neighborhood ( id, business_id, neighborhood_name ) CREATE TABLE tip ( tip_id, business_id, text, user_id, likes, year, month ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Find all Apple Store in ' Los Angeles SELECT### Response: SELECT business_id FROM business WHERE city = 'Los Angeles' AND name = 'Apple Store'.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE river ( river_name, length, traverse, country_name ) CREATE TABLE lake ( lake_name, area, state_name, country_name ) CREATE TABLE mountain ( mountain_name, mountain_altitude, state_name, country_name ) CREATE TABLE city ( city_name, state_name, population, country_name ) CREATE TABLE border_info ( state_name, border ) CREATE TABLE state ( state_name, capital, population, area, country_name, density ) CREATE TABLE highlow ( state_name, highest_point, highest_elevation, lowest_point, lowest_elevation ) CREATE TABLE road ( road_name, state_name ) -- Using valid SQLite, answer the following questions for the tables provided above. -- people in boulder SELECT### Response: SELECT population FROM city WHERE city_name = 'boulder'.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE offering_instructor ( offering_instructor_id, offering_id, instructor_id ) CREATE TABLE requirement ( requirement_id, requirement, college ) CREATE TABLE program ( program_id, name, college, introduction ) CREATE TABLE course_tags_count ( course_id, clear_grading, pop_quiz, group_projects, inspirational, long_lectures, extra_credit, few_tests, good_feedback, tough_tests, heavy_papers, cares_for_students, heavy_assignments, respected, participation, heavy_reading, tough_grader, hilarious, would_take_again, good_lecture, no_skip ) CREATE TABLE course_offering ( offering_id, course_id, semester, section_number, start_time, end_time, monday, tuesday, wednesday, thursday, friday, saturday, sunday, has_final_project, has_final_exam, textbook, class_address, allow_audit ) CREATE TABLE ta ( campus_job_id, student_id, location ) CREATE TABLE student ( student_id, lastname, firstname, program_id, declare_major, total_credit, total_gpa, entered_as, admit_term, predicted_graduation_semester, degree, minor, internship ) CREATE TABLE comment_instructor ( instructor_id, student_id, score, comment_text ) CREATE TABLE course_prerequisite ( pre_course_id, course_id ) CREATE TABLE gsi ( course_offering_id, student_id ) CREATE TABLE course ( course_id, name, department, number, credits, advisory_requirement, enforced_requirement, description, num_semesters, num_enrolled, has_discussion, has_lab, has_projects, has_exams, num_reviews, clarity_score, easiness_score, helpfulness_score ) CREATE TABLE program_course ( program_id, course_id, workload, category ) CREATE TABLE instructor ( instructor_id, name, uniqname ) CREATE TABLE jobs ( job_id, job_title, description, requirement, city, state, country, zip ) CREATE TABLE student_record ( student_id, course_id, semester, grade, how, transfer_source, earn_credit, repeat_term, test_id ) CREATE TABLE semester ( semester_id, semester, year ) CREATE TABLE program_requirement ( program_id, category, min_credit, additional_req ) CREATE TABLE area ( course_id, area ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Is NERS 518 always required before NERS 299 ? SELECT### Response: SELECT COUNT(*) > 0 FROM course AS COURSE_0, course AS COURSE_1, course_prerequisite WHERE COURSE_0.course_id = course_prerequisite.pre_course_id AND COURSE_0.department = 'NERS' AND COURSE_0.number = 518 AND COURSE_1.course_id = course_prerequisite.course_id AND COURSE_1.department = 'NERS' AND COURSE_1.number = 299.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE domain_keyword ( did, kid ) CREATE TABLE organization ( continent, homepage, name, oid ) CREATE TABLE domain_conference ( cid, did ) CREATE TABLE domain_journal ( did, jid ) CREATE TABLE writes ( aid, pid ) CREATE TABLE conference ( cid, homepage, name ) CREATE TABLE domain_author ( aid, did ) CREATE TABLE journal ( homepage, jid, name ) CREATE TABLE cite ( cited, citing ) CREATE TABLE publication_keyword ( kid, pid ) CREATE TABLE domain_publication ( did, pid ) CREATE TABLE keyword ( keyword, kid ) CREATE TABLE domain ( did, name ) CREATE TABLE author ( aid, homepage, name, oid ) CREATE TABLE publication ( abstract, cid, citation_num, jid, pid, reference_num, title, year ) -- Using valid SQLite, answer the following questions for the tables provided above. -- return me the papers written by ' H. V. Jagadish ' and ' Divesh Srivastava ' with the most number of citations . SELECT### Response: SELECT publication.title FROM author AS AUTHOR_0, author AS AUTHOR_1, publication, writes AS WRITES_0, writes AS WRITES_1 WHERE AUTHOR_0.name = 'Divesh Srivastava' AND AUTHOR_1.name = 'H. V. Jagadish' AND WRITES_0.aid = AUTHOR_0.aid AND WRITES_0.pid = publication.pid AND WRITES_1.aid = AUTHOR_1.aid AND WRITES_1.pid = publication.pid ORDER BY publication.citation_num DESC LIMIT 1.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE student ( student_id, lastname, firstname, program_id, declare_major, total_credit, total_gpa, entered_as, admit_term, predicted_graduation_semester, degree, minor, internship ) CREATE TABLE requirement ( requirement_id, requirement, college ) CREATE TABLE program ( program_id, name, college, introduction ) CREATE TABLE course_tags_count ( course_id, clear_grading, pop_quiz, group_projects, inspirational, long_lectures, extra_credit, few_tests, good_feedback, tough_tests, heavy_papers, cares_for_students, heavy_assignments, respected, participation, heavy_reading, tough_grader, hilarious, would_take_again, good_lecture, no_skip ) CREATE TABLE area ( course_id, area ) CREATE TABLE course_offering ( offering_id, course_id, semester, section_number, start_time, end_time, monday, tuesday, wednesday, thursday, friday, saturday, sunday, has_final_project, has_final_exam, textbook, class_address, allow_audit ) CREATE TABLE course ( course_id, name, department, number, credits, advisory_requirement, enforced_requirement, description, num_semesters, num_enrolled, has_discussion, has_lab, has_projects, has_exams, num_reviews, clarity_score, easiness_score, helpfulness_score ) CREATE TABLE program_requirement ( program_id, category, min_credit, additional_req ) CREATE TABLE offering_instructor ( offering_instructor_id, offering_id, instructor_id ) CREATE TABLE gsi ( course_offering_id, student_id ) CREATE TABLE comment_instructor ( instructor_id, student_id, score, comment_text ) CREATE TABLE course_prerequisite ( pre_course_id, course_id ) CREATE TABLE ta ( campus_job_id, student_id, location ) CREATE TABLE semester ( semester_id, semester, year ) CREATE TABLE instructor ( instructor_id, name, uniqname ) CREATE TABLE jobs ( job_id, job_title, description, requirement, city, state, country, zip ) CREATE TABLE student_record ( student_id, course_id, semester, grade, how, transfer_source, earn_credit, repeat_term, test_id ) CREATE TABLE program_course ( program_id, course_id, workload, category ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which class is the easiest way to fulfill the MDE requirement ? SELECT### Response: SELECT DISTINCT course.department, course.name, course.number, program_course.workload, program_course.workload FROM course, program_course WHERE program_course.category LIKE '%MDE%' AND program_course.course_id = course.course_id AND program_course.workload = (SELECT MIN(PROGRAM_COURSEalias1.workload) FROM program_course AS PROGRAM_COURSEalias1 WHERE PROGRAM_COURSEalias1.category LIKE '%MDE%').
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE state ( state_code, state_name, country_name ) CREATE TABLE code_description ( code, description ) CREATE TABLE date_day ( month_number, day_number, year, day_name ) CREATE TABLE fare_basis ( fare_basis_code, booking_class, class_type, premium, economy, discounted, night, season, basis_days ) CREATE TABLE food_service ( meal_code, meal_number, compartment, meal_description ) CREATE TABLE days ( days_code, day_name ) CREATE TABLE aircraft ( aircraft_code, aircraft_description, manufacturer, basic_type, engines, propulsion, wide_body, wing_span, length, weight, capacity, pay_load, cruising_speed, range_miles, pressurized ) CREATE TABLE city ( city_code, city_name, state_code, country_name, time_zone_code ) CREATE TABLE equipment_sequence ( aircraft_code_sequence, aircraft_code ) CREATE TABLE ground_service ( city_code, airport_code, transport_type, ground_fare ) CREATE TABLE dual_carrier ( main_airline, low_flight_number, high_flight_number, dual_airline, service_name ) CREATE TABLE month ( month_number, month_name ) CREATE TABLE flight_stop ( flight_id, stop_number, stop_days, stop_airport, arrival_time, arrival_airline, arrival_flight_number, departure_time, departure_airline, departure_flight_number, stop_time ) CREATE TABLE class_of_service ( booking_class, rank, class_description ) CREATE TABLE airport ( airport_code, airport_name, airport_location, state_code, country_name, time_zone_code, minimum_connect_time ) CREATE TABLE airline ( airline_code, airline_name, note ) CREATE TABLE flight ( aircraft_code_sequence, airline_code, airline_flight, arrival_time, connections, departure_time, dual_carrier, flight_days, flight_id, flight_number, from_airport, meal_code, stops, time_elapsed, to_airport ) CREATE TABLE fare ( fare_id, from_airport, to_airport, fare_basis_code, fare_airline, restriction_code, one_direction_cost, round_trip_cost, round_trip_required ) CREATE TABLE flight_fare ( flight_id, fare_id ) CREATE TABLE compartment_class ( compartment, class_type ) CREATE TABLE time_interval ( period, begin_time, end_time ) CREATE TABLE airport_service ( city_code, airport_code, miles_distant, direction, minutes_distant ) CREATE TABLE flight_leg ( flight_id, leg_number, leg_flight ) CREATE TABLE restriction ( restriction_code, advance_purchase, stopovers, saturday_stay_required, minimum_stay, maximum_stay, application, no_discounts ) CREATE TABLE time_zone ( time_zone_code, time_zone_name, hours_from_gmt ) -- Using valid SQLite, answer the following questions for the tables provided above. -- i want to fly from BOSTON to ATLANTA i would like the cheapest fare please SELECT### Response: SELECT DISTINCT fare.fare_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, fare, flight, flight_fare 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 = 'ATLANTA' AND fare.one_direction_cost = (SELECT MIN(FAREalias1.one_direction_cost) FROM airport_service AS AIRPORT_SERVICEalias2, airport_service AS AIRPORT_SERVICEalias3, city AS CITYalias2, city AS CITYalias3, fare AS FAREalias1, flight AS FLIGHTalias1, flight_fare AS FLIGHT_FAREalias1 WHERE CITYalias2.city_code = AIRPORT_SERVICEalias2.city_code AND CITYalias2.city_name = 'BOSTON' AND CITYalias3.city_code = AIRPORT_SERVICEalias3.city_code AND CITYalias3.city_name = 'ATLANTA' AND FLIGHT_FAREalias1.fare_id = FAREalias1.fare_id AND FLIGHTalias1.flight_id = FLIGHT_FAREalias1.flight_id AND FLIGHTalias1.from_airport = AIRPORT_SERVICEalias2.airport_code AND FLIGHTalias1.to_airport = AIRPORT_SERVICEalias3.airport_code) AND flight_fare.fare_id = fare.fare_id AND flight.flight_id = flight_fare.flight_id AND flight.from_airport = AIRPORT_SERVICE_0.airport_code AND flight.to_airport = AIRPORT_SERVICE_1.airport_code.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE fare_basis ( fare_basis_code, booking_class, class_type, premium, economy, discounted, night, season, basis_days ) CREATE TABLE code_description ( code, description ) CREATE TABLE state ( state_code, state_name, country_name ) CREATE TABLE compartment_class ( compartment, class_type ) CREATE TABLE flight_fare ( flight_id, fare_id ) CREATE TABLE date_day ( month_number, day_number, year, day_name ) CREATE TABLE city ( city_code, city_name, state_code, country_name, time_zone_code ) CREATE TABLE days ( days_code, day_name ) CREATE TABLE time_zone ( time_zone_code, time_zone_name, hours_from_gmt ) CREATE TABLE airport ( airport_code, airport_name, airport_location, state_code, country_name, time_zone_code, minimum_connect_time ) CREATE TABLE time_interval ( period, begin_time, end_time ) CREATE TABLE flight ( aircraft_code_sequence, airline_code, airline_flight, arrival_time, connections, departure_time, dual_carrier, flight_days, flight_id, flight_number, from_airport, meal_code, stops, time_elapsed, to_airport ) CREATE TABLE aircraft ( aircraft_code, aircraft_description, manufacturer, basic_type, engines, propulsion, wide_body, wing_span, length, weight, capacity, pay_load, cruising_speed, range_miles, pressurized ) CREATE TABLE restriction ( restriction_code, advance_purchase, stopovers, saturday_stay_required, minimum_stay, maximum_stay, application, no_discounts ) CREATE TABLE dual_carrier ( main_airline, low_flight_number, high_flight_number, dual_airline, service_name ) CREATE TABLE flight_leg ( flight_id, leg_number, leg_flight ) CREATE TABLE flight_stop ( flight_id, stop_number, stop_days, stop_airport, arrival_time, arrival_airline, arrival_flight_number, departure_time, departure_airline, departure_flight_number, stop_time ) CREATE TABLE food_service ( meal_code, meal_number, compartment, meal_description ) CREATE TABLE equipment_sequence ( aircraft_code_sequence, aircraft_code ) CREATE TABLE class_of_service ( booking_class, rank, class_description ) CREATE TABLE airline ( airline_code, airline_name, note ) CREATE TABLE airport_service ( city_code, airport_code, miles_distant, direction, minutes_distant ) CREATE TABLE ground_service ( city_code, airport_code, transport_type, ground_fare ) CREATE TABLE month ( month_number, month_name ) CREATE TABLE fare ( fare_id, from_airport, to_airport, fare_basis_code, fare_airline, restriction_code, one_direction_cost, round_trip_cost, round_trip_required ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what economy flights are available from DALLAS to BALTIMORE on 7 25 1991 SELECT### 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, date_day AS DATE_DAY_0, date_day AS DATE_DAY_1, days AS DAYS_0, days AS DAYS_1, fare, fare_basis AS FARE_BASIS_0, fare_basis AS FARE_BASIS_1, flight, flight_fare WHERE ((DATE_DAY_0.day_number = 25 AND DATE_DAY_0.month_number = 7 AND DATE_DAY_0.year = 1991 AND DATE_DAY_1.day_number = 25 AND DATE_DAY_1.month_number = 7 AND DATE_DAY_1.year = 1991 AND DAYS_0.day_name = DATE_DAY_0.day_name AND DAYS_1.day_name = DATE_DAY_1.day_name AND FARE_BASIS_0.economy = 'YES' AND FARE_BASIS_1.basis_days = DAYS_1.days_code AND fare.fare_basis_code = FARE_BASIS_0.fare_basis_code AND fare.fare_basis_code = FARE_BASIS_1.fare_basis_code AND flight_fare.fare_id = fare.fare_id AND flight.flight_days = DAYS_0.days_code AND flight.flight_id = flight_fare.flight_id) AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BALTIMORE' AND flight.to_airport = AIRPORT_SERVICE_1.airport_code) AND CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'DALLAS' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE course_tags_count ( course_id, clear_grading, pop_quiz, group_projects, inspirational, long_lectures, extra_credit, few_tests, good_feedback, tough_tests, heavy_papers, cares_for_students, heavy_assignments, respected, participation, heavy_reading, tough_grader, hilarious, would_take_again, good_lecture, no_skip ) CREATE TABLE course ( course_id, name, department, number, credits, advisory_requirement, enforced_requirement, description, num_semesters, num_enrolled, has_discussion, has_lab, has_projects, has_exams, num_reviews, clarity_score, easiness_score, helpfulness_score ) CREATE TABLE area ( course_id, area ) CREATE TABLE ta ( campus_job_id, student_id, location ) CREATE TABLE program_course ( program_id, course_id, workload, category ) CREATE TABLE jobs ( job_id, job_title, description, requirement, city, state, country, zip ) CREATE TABLE course_offering ( offering_id, course_id, semester, section_number, start_time, end_time, monday, tuesday, wednesday, thursday, friday, saturday, sunday, has_final_project, has_final_exam, textbook, class_address, allow_audit ) CREATE TABLE gsi ( course_offering_id, student_id ) CREATE TABLE program ( program_id, name, college, introduction ) CREATE TABLE student_record ( student_id, course_id, semester, grade, how, transfer_source, earn_credit, repeat_term, test_id ) CREATE TABLE requirement ( requirement_id, requirement, college ) CREATE TABLE semester ( semester_id, semester, year ) CREATE TABLE program_requirement ( program_id, category, min_credit, additional_req ) CREATE TABLE comment_instructor ( instructor_id, student_id, score, comment_text ) CREATE TABLE offering_instructor ( offering_instructor_id, offering_id, instructor_id ) CREATE TABLE course_prerequisite ( pre_course_id, course_id ) CREATE TABLE student ( student_id, lastname, firstname, program_id, declare_major, total_credit, total_gpa, entered_as, admit_term, predicted_graduation_semester, degree, minor, internship ) CREATE TABLE instructor ( instructor_id, name, uniqname ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Is there , in Summer 2002 , a 4 -credit upper level class ? SELECT### Response: SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, program_course, semester WHERE course.course_id = course_offering.course_id AND course.credits = 4 AND program_course.category LIKE '%ULCS%' AND program_course.course_id = course.course_id AND semester.semester = 'Summer' AND semester.semester_id = course_offering.semester AND semester.year = 2002.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE cite ( citingpaperid, citedpaperid ) CREATE TABLE author ( authorid, authorname ) CREATE TABLE dataset ( datasetid, datasetname ) CREATE TABLE paper ( paperid, title, venueid, year, numciting, numcitedby, journalid ) CREATE TABLE writes ( paperid, authorid ) CREATE TABLE journal ( journalid, journalname ) CREATE TABLE paperkeyphrase ( paperid, keyphraseid ) CREATE TABLE paperdataset ( paperid, datasetid ) CREATE TABLE field ( fieldid ) CREATE TABLE keyphrase ( keyphraseid, keyphrasename ) CREATE TABLE paperfield ( fieldid, paperid ) CREATE TABLE venue ( venueid, venuename ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many times was alex snoeren cited ? SELECT### Response: SELECT DISTINCT COUNT(cite.citedpaperid) FROM author, cite, paper, writes WHERE author.authorname = 'alex snoeren' AND paper.paperid = cite.citedpaperid AND writes.authorid = author.authorid AND writes.paperid = paper.paperid.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE airport_service ( city_code, airport_code, miles_distant, direction, minutes_distant ) CREATE TABLE city ( city_code, city_name, state_code, country_name, time_zone_code ) CREATE TABLE dual_carrier ( main_airline, low_flight_number, high_flight_number, dual_airline, service_name ) CREATE TABLE days ( days_code, day_name ) CREATE TABLE aircraft ( aircraft_code, aircraft_description, manufacturer, basic_type, engines, propulsion, wide_body, wing_span, length, weight, capacity, pay_load, cruising_speed, range_miles, pressurized ) CREATE TABLE airline ( airline_code, airline_name, note ) CREATE TABLE time_zone ( time_zone_code, time_zone_name, hours_from_gmt ) CREATE TABLE ground_service ( city_code, airport_code, transport_type, ground_fare ) CREATE TABLE restriction ( restriction_code, advance_purchase, stopovers, saturday_stay_required, minimum_stay, maximum_stay, application, no_discounts ) CREATE TABLE fare_basis ( fare_basis_code, booking_class, class_type, premium, economy, discounted, night, season, basis_days ) CREATE TABLE fare ( fare_id, from_airport, to_airport, fare_basis_code, fare_airline, restriction_code, one_direction_cost, round_trip_cost, round_trip_required ) CREATE TABLE flight_leg ( flight_id, leg_number, leg_flight ) CREATE TABLE food_service ( meal_code, meal_number, compartment, meal_description ) CREATE TABLE airport ( airport_code, airport_name, airport_location, state_code, country_name, time_zone_code, minimum_connect_time ) CREATE TABLE class_of_service ( booking_class, rank, class_description ) CREATE TABLE equipment_sequence ( aircraft_code_sequence, aircraft_code ) CREATE TABLE month ( month_number, month_name ) CREATE TABLE time_interval ( period, begin_time, end_time ) CREATE TABLE flight_stop ( flight_id, stop_number, stop_days, stop_airport, arrival_time, arrival_airline, arrival_flight_number, departure_time, departure_airline, departure_flight_number, stop_time ) CREATE TABLE date_day ( month_number, day_number, year, day_name ) CREATE TABLE code_description ( code, description ) CREATE TABLE flight_fare ( flight_id, fare_id ) CREATE TABLE compartment_class ( compartment, class_type ) CREATE TABLE flight ( aircraft_code_sequence, airline_code, airline_flight, arrival_time, connections, departure_time, dual_carrier, flight_days, flight_id, flight_number, from_airport, meal_code, stops, time_elapsed, to_airport ) CREATE TABLE state ( state_code, state_name, country_name ) -- Using valid SQLite, answer the following questions for the tables provided above. -- may i see all nonstop flights from ST. PETERSBURG to CHARLOTTE SELECT### 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 = 'ST. PETERSBURG' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'CHARLOTTE' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code AND flight.to_airport = AIRPORT_SERVICE_1.airport_code) AND flight.stops = 0.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE keyphrase ( keyphraseid, keyphrasename ) CREATE TABLE field ( fieldid ) CREATE TABLE cite ( citingpaperid, citedpaperid ) CREATE TABLE paperdataset ( paperid, datasetid ) CREATE TABLE writes ( paperid, authorid ) CREATE TABLE venue ( venueid, venuename ) CREATE TABLE paper ( paperid, title, venueid, year, numciting, numcitedby, journalid ) CREATE TABLE author ( authorid, authorname ) CREATE TABLE journal ( journalid, journalname ) CREATE TABLE paperfield ( fieldid, paperid ) CREATE TABLE dataset ( datasetid, datasetname ) CREATE TABLE paperkeyphrase ( paperid, keyphraseid ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how is the most prolific author in ACL ? SELECT### Response: SELECT DISTINCT COUNT(DISTINCT paper.paperid), writes.authorid FROM paper, venue, writes WHERE venue.venueid = paper.venueid AND venue.venuename = 'ACL' AND writes.paperid = paper.paperid GROUP BY writes.authorid ORDER BY COUNT(DISTINCT paper.paperid) DESC.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE days ( days_code, day_name ) CREATE TABLE restriction ( restriction_code, advance_purchase, stopovers, saturday_stay_required, minimum_stay, maximum_stay, application, no_discounts ) CREATE TABLE airport ( airport_code, airport_name, airport_location, state_code, country_name, time_zone_code, minimum_connect_time ) CREATE TABLE city ( city_code, city_name, state_code, country_name, time_zone_code ) CREATE TABLE month ( month_number, month_name ) CREATE TABLE flight_stop ( flight_id, stop_number, stop_days, stop_airport, arrival_time, arrival_airline, arrival_flight_number, departure_time, departure_airline, departure_flight_number, stop_time ) CREATE TABLE time_interval ( period, begin_time, end_time ) CREATE TABLE airline ( airline_code, airline_name, note ) CREATE TABLE code_description ( code, description ) CREATE TABLE flight_leg ( flight_id, leg_number, leg_flight ) CREATE TABLE aircraft ( aircraft_code, aircraft_description, manufacturer, basic_type, engines, propulsion, wide_body, wing_span, length, weight, capacity, pay_load, cruising_speed, range_miles, pressurized ) CREATE TABLE food_service ( meal_code, meal_number, compartment, meal_description ) CREATE TABLE fare ( fare_id, from_airport, to_airport, fare_basis_code, fare_airline, restriction_code, one_direction_cost, round_trip_cost, round_trip_required ) CREATE TABLE equipment_sequence ( aircraft_code_sequence, aircraft_code ) CREATE TABLE state ( state_code, state_name, country_name ) CREATE TABLE dual_carrier ( main_airline, low_flight_number, high_flight_number, dual_airline, service_name ) CREATE TABLE fare_basis ( fare_basis_code, booking_class, class_type, premium, economy, discounted, night, season, basis_days ) CREATE TABLE ground_service ( city_code, airport_code, transport_type, ground_fare ) CREATE TABLE flight_fare ( flight_id, fare_id ) CREATE TABLE flight ( aircraft_code_sequence, airline_code, airline_flight, arrival_time, connections, departure_time, dual_carrier, flight_days, flight_id, flight_number, from_airport, meal_code, stops, time_elapsed, to_airport ) CREATE TABLE time_zone ( time_zone_code, time_zone_name, hours_from_gmt ) CREATE TABLE airport_service ( city_code, airport_code, miles_distant, direction, minutes_distant ) CREATE TABLE class_of_service ( booking_class, rank, class_description ) CREATE TABLE compartment_class ( compartment, class_type ) CREATE TABLE date_day ( month_number, day_number, year, day_name ) -- Using valid SQLite, answer the following questions for the tables provided above. -- i want a flight from HOUSTON to MEMPHIS on tuesday morning SELECT### 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, date_day, days, flight WHERE (((flight.departure_time BETWEEN 0 AND 1200) AND date_day.day_number = 22 AND date_day.month_number = 3 AND date_day.year = 1991 AND days.day_name = date_day.day_name AND flight.flight_days = days.days_code) AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'MEMPHIS' AND flight.to_airport = AIRPORT_SERVICE_1.airport_code) AND CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'HOUSTON' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE program_course ( program_id, course_id, workload, category ) CREATE TABLE course_offering ( offering_id, course_id, semester, section_number, start_time, end_time, monday, tuesday, wednesday, thursday, friday, saturday, sunday, has_final_project, has_final_exam, textbook, class_address, allow_audit ) CREATE TABLE offering_instructor ( offering_instructor_id, offering_id, instructor_id ) CREATE TABLE program_requirement ( program_id, category, min_credit, additional_req ) CREATE TABLE gsi ( course_offering_id, student_id ) CREATE TABLE program ( program_id, name, college, introduction ) CREATE TABLE jobs ( job_id, job_title, description, requirement, city, state, country, zip ) CREATE TABLE student_record ( student_id, course_id, semester, grade, how, transfer_source, earn_credit, repeat_term, test_id ) CREATE TABLE ta ( campus_job_id, student_id, location ) CREATE TABLE requirement ( requirement_id, requirement, college ) CREATE TABLE course_prerequisite ( pre_course_id, course_id ) CREATE TABLE student ( student_id, lastname, firstname, program_id, declare_major, total_credit, total_gpa, entered_as, admit_term, predicted_graduation_semester, degree, minor, internship ) CREATE TABLE semester ( semester_id, semester, year ) CREATE TABLE course_tags_count ( course_id, clear_grading, pop_quiz, group_projects, inspirational, long_lectures, extra_credit, few_tests, good_feedback, tough_tests, heavy_papers, cares_for_students, heavy_assignments, respected, participation, heavy_reading, tough_grader, hilarious, would_take_again, good_lecture, no_skip ) CREATE TABLE comment_instructor ( instructor_id, student_id, score, comment_text ) CREATE TABLE course ( course_id, name, department, number, credits, advisory_requirement, enforced_requirement, description, num_semesters, num_enrolled, has_discussion, has_lab, has_projects, has_exams, num_reviews, clarity_score, easiness_score, helpfulness_score ) CREATE TABLE instructor ( instructor_id, name, uniqname ) CREATE TABLE area ( course_id, area ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which classes do I have to take for me to declare a major in LING ? SELECT### Response: SELECT DISTINCT course.department, course.name, course.number FROM course, program_course WHERE course.department LIKE '%LING%' AND program_course.category LIKE 'PreMajor' AND program_course.course_id = course.course_id.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE flight_stop ( flight_id, stop_number, stop_days, stop_airport, arrival_time, arrival_airline, arrival_flight_number, departure_time, departure_airline, departure_flight_number, stop_time ) CREATE TABLE date_day ( month_number, day_number, year, day_name ) CREATE TABLE flight_leg ( flight_id, leg_number, leg_flight ) CREATE TABLE equipment_sequence ( aircraft_code_sequence, aircraft_code ) CREATE TABLE flight ( aircraft_code_sequence, airline_code, airline_flight, arrival_time, connections, departure_time, dual_carrier, flight_days, flight_id, flight_number, from_airport, meal_code, stops, time_elapsed, to_airport ) CREATE TABLE airport ( airport_code, airport_name, airport_location, state_code, country_name, time_zone_code, minimum_connect_time ) CREATE TABLE fare_basis ( fare_basis_code, booking_class, class_type, premium, economy, discounted, night, season, basis_days ) CREATE TABLE aircraft ( aircraft_code, aircraft_description, manufacturer, basic_type, engines, propulsion, wide_body, wing_span, length, weight, capacity, pay_load, cruising_speed, range_miles, pressurized ) CREATE TABLE time_zone ( time_zone_code, time_zone_name, hours_from_gmt ) CREATE TABLE time_interval ( period, begin_time, end_time ) CREATE TABLE food_service ( meal_code, meal_number, compartment, meal_description ) CREATE TABLE month ( month_number, month_name ) CREATE TABLE state ( state_code, state_name, country_name ) CREATE TABLE dual_carrier ( main_airline, low_flight_number, high_flight_number, dual_airline, service_name ) CREATE TABLE days ( days_code, day_name ) CREATE TABLE compartment_class ( compartment, class_type ) CREATE TABLE ground_service ( city_code, airport_code, transport_type, ground_fare ) CREATE TABLE code_description ( code, description ) CREATE TABLE airline ( airline_code, airline_name, note ) CREATE TABLE restriction ( restriction_code, advance_purchase, stopovers, saturday_stay_required, minimum_stay, maximum_stay, application, no_discounts ) CREATE TABLE city ( city_code, city_name, state_code, country_name, time_zone_code ) CREATE TABLE fare ( fare_id, from_airport, to_airport, fare_basis_code, fare_airline, restriction_code, one_direction_cost, round_trip_cost, round_trip_required ) CREATE TABLE class_of_service ( booking_class, rank, class_description ) CREATE TABLE flight_fare ( flight_id, fare_id ) CREATE TABLE airport_service ( city_code, airport_code, miles_distant, direction, minutes_distant ) -- Using valid SQLite, answer the following questions for the tables provided above. -- fare code Y what does that mean SELECT### Response: SELECT DISTINCT booking_class FROM class_of_service WHERE booking_class = 'Y'.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE cite ( cited, citing ) CREATE TABLE journal ( homepage, jid, name ) CREATE TABLE domain_author ( aid, did ) CREATE TABLE publication ( abstract, cid, citation_num, jid, pid, reference_num, title, year ) CREATE TABLE domain_publication ( did, pid ) CREATE TABLE domain_journal ( did, jid ) CREATE TABLE domain_conference ( cid, did ) CREATE TABLE conference ( cid, homepage, name ) CREATE TABLE publication_keyword ( kid, pid ) CREATE TABLE author ( aid, homepage, name, oid ) CREATE TABLE keyword ( keyword, kid ) CREATE TABLE organization ( continent, homepage, name, oid ) CREATE TABLE writes ( aid, pid ) CREATE TABLE domain ( did, name ) CREATE TABLE domain_keyword ( did, kid ) -- Using valid SQLite, answer the following questions for the tables provided above. -- return me the keywords of ' Making database systems usable ' . SELECT### Response: SELECT keyword.keyword FROM keyword, publication, publication_keyword WHERE publication_keyword.kid = keyword.kid AND publication.pid = publication_keyword.pid AND publication.title = 'Making database systems usable'.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE comment_instructor ( instructor_id, student_id, score, comment_text ) CREATE TABLE semester ( semester_id, semester, year ) CREATE TABLE program ( program_id, name, college, introduction ) CREATE TABLE instructor ( instructor_id, name, uniqname ) CREATE TABLE ta ( campus_job_id, student_id, location ) CREATE TABLE program_course ( program_id, course_id, workload, category ) CREATE TABLE requirement ( requirement_id, requirement, college ) CREATE TABLE program_requirement ( program_id, category, min_credit, additional_req ) CREATE TABLE jobs ( job_id, job_title, description, requirement, city, state, country, zip ) CREATE TABLE course_tags_count ( course_id, clear_grading, pop_quiz, group_projects, inspirational, long_lectures, extra_credit, few_tests, good_feedback, tough_tests, heavy_papers, cares_for_students, heavy_assignments, respected, participation, heavy_reading, tough_grader, hilarious, would_take_again, good_lecture, no_skip ) CREATE TABLE course_offering ( offering_id, course_id, semester, section_number, start_time, end_time, monday, tuesday, wednesday, thursday, friday, saturday, sunday, has_final_project, has_final_exam, textbook, class_address, allow_audit ) CREATE TABLE student ( student_id, lastname, firstname, program_id, declare_major, total_credit, total_gpa, entered_as, admit_term, predicted_graduation_semester, degree, minor, internship ) CREATE TABLE area ( course_id, area ) CREATE TABLE student_record ( student_id, course_id, semester, grade, how, transfer_source, earn_credit, repeat_term, test_id ) CREATE TABLE gsi ( course_offering_id, student_id ) CREATE TABLE course ( course_id, name, department, number, credits, advisory_requirement, enforced_requirement, description, num_semesters, num_enrolled, has_discussion, has_lab, has_projects, has_exams, num_reviews, clarity_score, easiness_score, helpfulness_score ) CREATE TABLE course_prerequisite ( pre_course_id, course_id ) CREATE TABLE offering_instructor ( offering_instructor_id, offering_id, instructor_id ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who will teach upper-level classes ? SELECT### Response: SELECT DISTINCT instructor.name FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN offering_instructor ON offering_instructor.offering_id = course_offering.offering_id INNER JOIN instructor ON offering_instructor.instructor_id = instructor.instructor_id INNER JOIN program_course ON program_course.course_id = course.course_id WHERE program_course.category LIKE '%ULCS%'.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE cite ( citingpaperid, citedpaperid ) CREATE TABLE paperfield ( fieldid, paperid ) CREATE TABLE journal ( journalid, journalname ) CREATE TABLE keyphrase ( keyphraseid, keyphrasename ) CREATE TABLE paperdataset ( paperid, datasetid ) CREATE TABLE paper ( paperid, title, venueid, year, numciting, numcitedby, journalid ) CREATE TABLE venue ( venueid, venuename ) CREATE TABLE author ( authorid, authorname ) CREATE TABLE dataset ( datasetid, datasetname ) CREATE TABLE paperkeyphrase ( paperid, keyphraseid ) CREATE TABLE writes ( paperid, authorid ) CREATE TABLE field ( fieldid ) -- Using valid SQLite, answer the following questions for the tables provided above. -- papers that use WordNet or Dbpedia SELECT### Response: SELECT DISTINCT paper.paperid FROM dataset, paper, paperdataset WHERE dataset.datasetname IN ('WordNet', 'Dbpedia') AND paperdataset.datasetid = dataset.datasetid AND paper.paperid = paperdataset.paperid GROUP BY paper.paperid.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE keyword ( id, keyword ) CREATE TABLE written_by ( id, msid, wid ) CREATE TABLE copyright ( id, msid, cid ) CREATE TABLE classification ( id, msid, gid ) CREATE TABLE director ( did, gender, name, nationality, birth_city, birth_year ) CREATE TABLE made_by ( id, msid, pid ) CREATE TABLE actor ( aid, gender, name, nationality, birth_city, birth_year ) CREATE TABLE tv_series ( sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget ) CREATE TABLE genre ( gid, genre ) CREATE TABLE directed_by ( id, msid, did ) CREATE TABLE producer ( pid, gender, name, nationality, birth_city, birth_year ) CREATE TABLE cast ( id, msid, aid, role ) CREATE TABLE movie ( mid, title, release_year, title_aka, budget ) CREATE TABLE tags ( id, msid, kid ) CREATE TABLE company ( id, name, country_code ) CREATE TABLE writer ( wid, gender, name, nationality, birth_city, birth_year ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What are the major roles in the movie ' Daddy Long Legs SELECT### Response: SELECT cast.role FROM actor, cast, movie WHERE cast.aid = actor.aid AND movie.mid = cast.msid AND movie.title = 'Daddy Long Legs'.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE dual_carrier ( main_airline, low_flight_number, high_flight_number, dual_airline, service_name ) CREATE TABLE flight_leg ( flight_id, leg_number, leg_flight ) CREATE TABLE airline ( airline_code, airline_name, note ) CREATE TABLE time_zone ( time_zone_code, time_zone_name, hours_from_gmt ) CREATE TABLE fare_basis ( fare_basis_code, booking_class, class_type, premium, economy, discounted, night, season, basis_days ) CREATE TABLE food_service ( meal_code, meal_number, compartment, meal_description ) CREATE TABLE state ( state_code, state_name, country_name ) CREATE TABLE fare ( fare_id, from_airport, to_airport, fare_basis_code, fare_airline, restriction_code, one_direction_cost, round_trip_cost, round_trip_required ) CREATE TABLE equipment_sequence ( aircraft_code_sequence, aircraft_code ) CREATE TABLE code_description ( code, description ) CREATE TABLE date_day ( month_number, day_number, year, day_name ) CREATE TABLE airport_service ( city_code, airport_code, miles_distant, direction, minutes_distant ) CREATE TABLE restriction ( restriction_code, advance_purchase, stopovers, saturday_stay_required, minimum_stay, maximum_stay, application, no_discounts ) CREATE TABLE city ( city_code, city_name, state_code, country_name, time_zone_code ) CREATE TABLE ground_service ( city_code, airport_code, transport_type, ground_fare ) CREATE TABLE compartment_class ( compartment, class_type ) CREATE TABLE aircraft ( aircraft_code, aircraft_description, manufacturer, basic_type, engines, propulsion, wide_body, wing_span, length, weight, capacity, pay_load, cruising_speed, range_miles, pressurized ) CREATE TABLE days ( days_code, day_name ) CREATE TABLE flight_stop ( flight_id, stop_number, stop_days, stop_airport, arrival_time, arrival_airline, arrival_flight_number, departure_time, departure_airline, departure_flight_number, stop_time ) CREATE TABLE flight_fare ( flight_id, fare_id ) CREATE TABLE airport ( airport_code, airport_name, airport_location, state_code, country_name, time_zone_code, minimum_connect_time ) CREATE TABLE time_interval ( period, begin_time, end_time ) CREATE TABLE class_of_service ( booking_class, rank, class_description ) CREATE TABLE flight ( aircraft_code_sequence, airline_code, airline_flight, arrival_time, connections, departure_time, dual_carrier, flight_days, flight_id, flight_number, from_airport, meal_code, stops, time_elapsed, to_airport ) CREATE TABLE month ( month_number, month_name ) -- Using valid SQLite, answer the following questions for the tables provided above. -- flights that go from OAKLAND to PHILADELPHIA on friday SELECT### 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, date_day, days, flight WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'PHILADELPHIA' AND date_day.day_number = 25 AND date_day.month_number = 6 AND date_day.year = 1991 AND days.day_name = date_day.day_name AND flight.flight_days = days.days_code AND flight.to_airport = AIRPORT_SERVICE_1.airport_code) AND CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'OAKLAND' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE lake ( lake_name, area, state_name, country_name ) CREATE TABLE city ( city_name, state_name, population, country_name ) CREATE TABLE highlow ( state_name, highest_point, highest_elevation, lowest_point, lowest_elevation ) CREATE TABLE border_info ( state_name, border ) CREATE TABLE mountain ( mountain_name, mountain_altitude, state_name, country_name ) CREATE TABLE state ( state_name, capital, population, area, country_name, density ) CREATE TABLE river ( river_name, length, traverse, country_name ) CREATE TABLE road ( road_name, state_name ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what are the neighboring states for michigan SELECT### Response: SELECT border FROM border_info WHERE state_name = 'michigan'.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE month ( month_number, month_name ) CREATE TABLE restriction ( restriction_code, advance_purchase, stopovers, saturday_stay_required, minimum_stay, maximum_stay, application, no_discounts ) CREATE TABLE city ( city_code, city_name, state_code, country_name, time_zone_code ) CREATE TABLE time_interval ( period, begin_time, end_time ) CREATE TABLE dual_carrier ( main_airline, low_flight_number, high_flight_number, dual_airline, service_name ) CREATE TABLE flight_fare ( flight_id, fare_id ) CREATE TABLE class_of_service ( booking_class, rank, class_description ) CREATE TABLE compartment_class ( compartment, class_type ) CREATE TABLE date_day ( month_number, day_number, year, day_name ) CREATE TABLE airport ( airport_code, airport_name, airport_location, state_code, country_name, time_zone_code, minimum_connect_time ) CREATE TABLE food_service ( meal_code, meal_number, compartment, meal_description ) CREATE TABLE flight_stop ( flight_id, stop_number, stop_days, stop_airport, arrival_time, arrival_airline, arrival_flight_number, departure_time, departure_airline, departure_flight_number, stop_time ) CREATE TABLE flight_leg ( flight_id, leg_number, leg_flight ) CREATE TABLE days ( days_code, day_name ) CREATE TABLE flight ( aircraft_code_sequence, airline_code, airline_flight, arrival_time, connections, departure_time, dual_carrier, flight_days, flight_id, flight_number, from_airport, meal_code, stops, time_elapsed, to_airport ) CREATE TABLE fare ( fare_id, from_airport, to_airport, fare_basis_code, fare_airline, restriction_code, one_direction_cost, round_trip_cost, round_trip_required ) CREATE TABLE airport_service ( city_code, airport_code, miles_distant, direction, minutes_distant ) CREATE TABLE fare_basis ( fare_basis_code, booking_class, class_type, premium, economy, discounted, night, season, basis_days ) CREATE TABLE aircraft ( aircraft_code, aircraft_description, manufacturer, basic_type, engines, propulsion, wide_body, wing_span, length, weight, capacity, pay_load, cruising_speed, range_miles, pressurized ) CREATE TABLE airline ( airline_code, airline_name, note ) CREATE TABLE code_description ( code, description ) CREATE TABLE ground_service ( city_code, airport_code, transport_type, ground_fare ) CREATE TABLE state ( state_code, state_name, country_name ) CREATE TABLE time_zone ( time_zone_code, time_zone_name, hours_from_gmt ) CREATE TABLE equipment_sequence ( aircraft_code_sequence, aircraft_code ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what flights are there from PHOENIX to MILWAUKEE SELECT### 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 = 'PHOENIX' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'MILWAUKEE' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code AND flight.to_airport = AIRPORT_SERVICE_1.airport_code.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE compartment_class ( compartment, class_type ) CREATE TABLE month ( month_number, month_name ) CREATE TABLE airport_service ( city_code, airport_code, miles_distant, direction, minutes_distant ) CREATE TABLE days ( days_code, day_name ) CREATE TABLE time_zone ( time_zone_code, time_zone_name, hours_from_gmt ) CREATE TABLE flight_fare ( flight_id, fare_id ) CREATE TABLE restriction ( restriction_code, advance_purchase, stopovers, saturday_stay_required, minimum_stay, maximum_stay, application, no_discounts ) CREATE TABLE food_service ( meal_code, meal_number, compartment, meal_description ) CREATE TABLE fare_basis ( fare_basis_code, booking_class, class_type, premium, economy, discounted, night, season, basis_days ) CREATE TABLE state ( state_code, state_name, country_name ) CREATE TABLE aircraft ( aircraft_code, aircraft_description, manufacturer, basic_type, engines, propulsion, wide_body, wing_span, length, weight, capacity, pay_load, cruising_speed, range_miles, pressurized ) CREATE TABLE time_interval ( period, begin_time, end_time ) CREATE TABLE flight_leg ( flight_id, leg_number, leg_flight ) CREATE TABLE city ( city_code, city_name, state_code, country_name, time_zone_code ) CREATE TABLE airline ( airline_code, airline_name, note ) CREATE TABLE airport ( airport_code, airport_name, airport_location, state_code, country_name, time_zone_code, minimum_connect_time ) CREATE TABLE code_description ( code, description ) CREATE TABLE equipment_sequence ( aircraft_code_sequence, aircraft_code ) CREATE TABLE dual_carrier ( main_airline, low_flight_number, high_flight_number, dual_airline, service_name ) CREATE TABLE fare ( fare_id, from_airport, to_airport, fare_basis_code, fare_airline, restriction_code, one_direction_cost, round_trip_cost, round_trip_required ) CREATE TABLE date_day ( month_number, day_number, year, day_name ) CREATE TABLE flight ( aircraft_code_sequence, airline_code, airline_flight, arrival_time, connections, departure_time, dual_carrier, flight_days, flight_id, flight_number, from_airport, meal_code, stops, time_elapsed, to_airport ) CREATE TABLE class_of_service ( booking_class, rank, class_description ) CREATE TABLE flight_stop ( flight_id, stop_number, stop_days, stop_airport, arrival_time, arrival_airline, arrival_flight_number, departure_time, departure_airline, departure_flight_number, stop_time ) CREATE TABLE ground_service ( city_code, airport_code, transport_type, ground_fare ) -- Using valid SQLite, answer the following questions for the tables provided above. -- PHILADELPHIA to BOSTON monday SELECT### 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, date_day, days, flight WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BOSTON' AND date_day.day_number = 21 AND date_day.month_number = 2 AND date_day.year = 1991 AND days.day_name = date_day.day_name AND flight.flight_days = days.days_code AND flight.to_airport = AIRPORT_SERVICE_1.airport_code) AND CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'PHILADELPHIA' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE instructor ( instructor_id, name, uniqname ) CREATE TABLE program_course ( program_id, course_id, workload, category ) CREATE TABLE jobs ( job_id, job_title, description, requirement, city, state, country, zip ) CREATE TABLE requirement ( requirement_id, requirement, college ) CREATE TABLE program ( program_id, name, college, introduction ) CREATE TABLE program_requirement ( program_id, category, min_credit, additional_req ) CREATE TABLE gsi ( course_offering_id, student_id ) CREATE TABLE course_prerequisite ( pre_course_id, course_id ) CREATE TABLE comment_instructor ( instructor_id, student_id, score, comment_text ) CREATE TABLE ta ( campus_job_id, student_id, location ) CREATE TABLE area ( course_id, area ) CREATE TABLE course ( course_id, name, department, number, credits, advisory_requirement, enforced_requirement, description, num_semesters, num_enrolled, has_discussion, has_lab, has_projects, has_exams, num_reviews, clarity_score, easiness_score, helpfulness_score ) CREATE TABLE course_tags_count ( course_id, clear_grading, pop_quiz, group_projects, inspirational, long_lectures, extra_credit, few_tests, good_feedback, tough_tests, heavy_papers, cares_for_students, heavy_assignments, respected, participation, heavy_reading, tough_grader, hilarious, would_take_again, good_lecture, no_skip ) CREATE TABLE course_offering ( offering_id, course_id, semester, section_number, start_time, end_time, monday, tuesday, wednesday, thursday, friday, saturday, sunday, has_final_project, has_final_exam, textbook, class_address, allow_audit ) CREATE TABLE offering_instructor ( offering_instructor_id, offering_id, instructor_id ) CREATE TABLE student_record ( student_id, course_id, semester, grade, how, transfer_source, earn_credit, repeat_term, test_id ) CREATE TABLE student ( student_id, lastname, firstname, program_id, declare_major, total_credit, total_gpa, entered_as, admit_term, predicted_graduation_semester, degree, minor, internship ) CREATE TABLE semester ( semester_id, semester, year ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How much sections are there for 518 BA ? SELECT### Response: SELECT COUNT(DISTINCT course_offering.section_number) FROM course INNER JOIN program_course ON program_course.course_id = course.course_id INNER JOIN course_offering ON course.course_id = course_offering.course_id WHERE course.department = 'BA' AND course.number = 518.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE aircraft ( aircraft_code, aircraft_description, manufacturer, basic_type, engines, propulsion, wide_body, wing_span, length, weight, capacity, pay_load, cruising_speed, range_miles, pressurized ) CREATE TABLE time_zone ( time_zone_code, time_zone_name, hours_from_gmt ) CREATE TABLE restriction ( restriction_code, advance_purchase, stopovers, saturday_stay_required, minimum_stay, maximum_stay, application, no_discounts ) CREATE TABLE state ( state_code, state_name, country_name ) CREATE TABLE fare_basis ( fare_basis_code, booking_class, class_type, premium, economy, discounted, night, season, basis_days ) CREATE TABLE code_description ( code, description ) CREATE TABLE fare ( fare_id, from_airport, to_airport, fare_basis_code, fare_airline, restriction_code, one_direction_cost, round_trip_cost, round_trip_required ) CREATE TABLE month ( month_number, month_name ) CREATE TABLE flight_stop ( flight_id, stop_number, stop_days, stop_airport, arrival_time, arrival_airline, arrival_flight_number, departure_time, departure_airline, departure_flight_number, stop_time ) CREATE TABLE ground_service ( city_code, airport_code, transport_type, ground_fare ) CREATE TABLE class_of_service ( booking_class, rank, class_description ) CREATE TABLE dual_carrier ( main_airline, low_flight_number, high_flight_number, dual_airline, service_name ) CREATE TABLE time_interval ( period, begin_time, end_time ) CREATE TABLE date_day ( month_number, day_number, year, day_name ) CREATE TABLE food_service ( meal_code, meal_number, compartment, meal_description ) CREATE TABLE airline ( airline_code, airline_name, note ) CREATE TABLE flight_fare ( flight_id, fare_id ) CREATE TABLE flight_leg ( flight_id, leg_number, leg_flight ) CREATE TABLE flight ( aircraft_code_sequence, airline_code, airline_flight, arrival_time, connections, departure_time, dual_carrier, flight_days, flight_id, flight_number, from_airport, meal_code, stops, time_elapsed, to_airport ) CREATE TABLE compartment_class ( compartment, class_type ) CREATE TABLE airport_service ( city_code, airport_code, miles_distant, direction, minutes_distant ) CREATE TABLE airport ( airport_code, airport_name, airport_location, state_code, country_name, time_zone_code, minimum_connect_time ) CREATE TABLE equipment_sequence ( aircraft_code_sequence, aircraft_code ) CREATE TABLE days ( days_code, day_name ) CREATE TABLE city ( city_code, city_name, state_code, country_name, time_zone_code ) -- Using valid SQLite, answer the following questions for the tables provided above. -- show me a list of flights from PITTSBURGH to BALTIMORE on 8 3 SELECT### 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, date_day, days, flight WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BALTIMORE' AND date_day.day_number = 3 AND date_day.month_number = 8 AND date_day.year = 1991 AND days.day_name = date_day.day_name AND flight.flight_days = days.days_code AND flight.to_airport = AIRPORT_SERVICE_1.airport_code) AND CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'PITTSBURGH' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE keyphrase ( keyphraseid, keyphrasename ) CREATE TABLE paperdataset ( paperid, datasetid ) CREATE TABLE paper ( paperid, title, venueid, year, numciting, numcitedby, journalid ) CREATE TABLE paperfield ( fieldid, paperid ) CREATE TABLE cite ( citingpaperid, citedpaperid ) CREATE TABLE venue ( venueid, venuename ) CREATE TABLE author ( authorid, authorname ) CREATE TABLE field ( fieldid ) CREATE TABLE journal ( journalid, journalname ) CREATE TABLE dataset ( datasetid, datasetname ) CREATE TABLE writes ( paperid, authorid ) CREATE TABLE paperkeyphrase ( paperid, keyphraseid ) -- Using valid SQLite, answer the following questions for the tables provided above. -- pldi 2015 list of papers SELECT### Response: SELECT DISTINCT paper.paperid FROM paper, venue WHERE paper.year = 2015 AND venue.venueid = paper.venueid AND venue.venuename = 'pldi'.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE dual_carrier ( main_airline, low_flight_number, high_flight_number, dual_airline, service_name ) CREATE TABLE flight ( aircraft_code_sequence, airline_code, airline_flight, arrival_time, connections, departure_time, dual_carrier, flight_days, flight_id, flight_number, from_airport, meal_code, stops, time_elapsed, to_airport ) CREATE TABLE equipment_sequence ( aircraft_code_sequence, aircraft_code ) CREATE TABLE state ( state_code, state_name, country_name ) CREATE TABLE time_interval ( period, begin_time, end_time ) CREATE TABLE days ( days_code, day_name ) CREATE TABLE airport_service ( city_code, airport_code, miles_distant, direction, minutes_distant ) CREATE TABLE fare_basis ( fare_basis_code, booking_class, class_type, premium, economy, discounted, night, season, basis_days ) CREATE TABLE time_zone ( time_zone_code, time_zone_name, hours_from_gmt ) CREATE TABLE month ( month_number, month_name ) CREATE TABLE aircraft ( aircraft_code, aircraft_description, manufacturer, basic_type, engines, propulsion, wide_body, wing_span, length, weight, capacity, pay_load, cruising_speed, range_miles, pressurized ) CREATE TABLE airline ( airline_code, airline_name, note ) CREATE TABLE flight_fare ( flight_id, fare_id ) CREATE TABLE flight_stop ( flight_id, stop_number, stop_days, stop_airport, arrival_time, arrival_airline, arrival_flight_number, departure_time, departure_airline, departure_flight_number, stop_time ) CREATE TABLE restriction ( restriction_code, advance_purchase, stopovers, saturday_stay_required, minimum_stay, maximum_stay, application, no_discounts ) CREATE TABLE class_of_service ( booking_class, rank, class_description ) CREATE TABLE airport ( airport_code, airport_name, airport_location, state_code, country_name, time_zone_code, minimum_connect_time ) CREATE TABLE food_service ( meal_code, meal_number, compartment, meal_description ) CREATE TABLE compartment_class ( compartment, class_type ) CREATE TABLE fare ( fare_id, from_airport, to_airport, fare_basis_code, fare_airline, restriction_code, one_direction_cost, round_trip_cost, round_trip_required ) CREATE TABLE city ( city_code, city_name, state_code, country_name, time_zone_code ) CREATE TABLE ground_service ( city_code, airport_code, transport_type, ground_fare ) CREATE TABLE flight_leg ( flight_id, leg_number, leg_flight ) CREATE TABLE code_description ( code, description ) CREATE TABLE date_day ( month_number, day_number, year, day_name ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what are the flights available after 1800 between SAN FRANCISCO and BOSTON SELECT### 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_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BOSTON' AND flight.departure_time > 1800 AND flight.to_airport = AIRPORT_SERVICE_1.airport_code) AND CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'SAN FRANCISCO' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE state ( state_code, state_name, country_name ) CREATE TABLE date_day ( month_number, day_number, year, day_name ) CREATE TABLE dual_carrier ( main_airline, low_flight_number, high_flight_number, dual_airline, service_name ) CREATE TABLE city ( city_code, city_name, state_code, country_name, time_zone_code ) CREATE TABLE code_description ( code, description ) CREATE TABLE ground_service ( city_code, airport_code, transport_type, ground_fare ) CREATE TABLE days ( days_code, day_name ) CREATE TABLE month ( month_number, month_name ) CREATE TABLE flight_stop ( flight_id, stop_number, stop_days, stop_airport, arrival_time, arrival_airline, arrival_flight_number, departure_time, departure_airline, departure_flight_number, stop_time ) CREATE TABLE aircraft ( aircraft_code, aircraft_description, manufacturer, basic_type, engines, propulsion, wide_body, wing_span, length, weight, capacity, pay_load, cruising_speed, range_miles, pressurized ) CREATE TABLE compartment_class ( compartment, class_type ) CREATE TABLE fare_basis ( fare_basis_code, booking_class, class_type, premium, economy, discounted, night, season, basis_days ) CREATE TABLE time_zone ( time_zone_code, time_zone_name, hours_from_gmt ) CREATE TABLE restriction ( restriction_code, advance_purchase, stopovers, saturday_stay_required, minimum_stay, maximum_stay, application, no_discounts ) CREATE TABLE equipment_sequence ( aircraft_code_sequence, aircraft_code ) CREATE TABLE time_interval ( period, begin_time, end_time ) CREATE TABLE food_service ( meal_code, meal_number, compartment, meal_description ) CREATE TABLE flight ( aircraft_code_sequence, airline_code, airline_flight, arrival_time, connections, departure_time, dual_carrier, flight_days, flight_id, flight_number, from_airport, meal_code, stops, time_elapsed, to_airport ) CREATE TABLE airline ( airline_code, airline_name, note ) CREATE TABLE airport ( airport_code, airport_name, airport_location, state_code, country_name, time_zone_code, minimum_connect_time ) CREATE TABLE flight_fare ( flight_id, fare_id ) CREATE TABLE flight_leg ( flight_id, leg_number, leg_flight ) CREATE TABLE airport_service ( city_code, airport_code, miles_distant, direction, minutes_distant ) CREATE TABLE class_of_service ( booking_class, rank, class_description ) CREATE TABLE fare ( fare_id, from_airport, to_airport, fare_basis_code, fare_airline, restriction_code, one_direction_cost, round_trip_cost, round_trip_required ) -- Using valid SQLite, answer the following questions for the tables provided above. -- show me the flights leaving from DAL SELECT### Response: SELECT DISTINCT flight.flight_id FROM airport, flight WHERE airport.airport_code = 'DAL' AND flight.from_airport = airport.airport_code.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE time_interval ( period, begin_time, end_time ) CREATE TABLE date_day ( month_number, day_number, year, day_name ) CREATE TABLE days ( days_code, day_name ) CREATE TABLE airport ( airport_code, airport_name, airport_location, state_code, country_name, time_zone_code, minimum_connect_time ) CREATE TABLE ground_service ( city_code, airport_code, transport_type, ground_fare ) CREATE TABLE flight_leg ( flight_id, leg_number, leg_flight ) CREATE TABLE flight ( aircraft_code_sequence, airline_code, airline_flight, arrival_time, connections, departure_time, dual_carrier, flight_days, flight_id, flight_number, from_airport, meal_code, stops, time_elapsed, to_airport ) CREATE TABLE airline ( airline_code, airline_name, note ) CREATE TABLE compartment_class ( compartment, class_type ) CREATE TABLE state ( state_code, state_name, country_name ) CREATE TABLE aircraft ( aircraft_code, aircraft_description, manufacturer, basic_type, engines, propulsion, wide_body, wing_span, length, weight, capacity, pay_load, cruising_speed, range_miles, pressurized ) CREATE TABLE restriction ( restriction_code, advance_purchase, stopovers, saturday_stay_required, minimum_stay, maximum_stay, application, no_discounts ) CREATE TABLE city ( city_code, city_name, state_code, country_name, time_zone_code ) CREATE TABLE time_zone ( time_zone_code, time_zone_name, hours_from_gmt ) CREATE TABLE class_of_service ( booking_class, rank, class_description ) CREATE TABLE food_service ( meal_code, meal_number, compartment, meal_description ) CREATE TABLE airport_service ( city_code, airport_code, miles_distant, direction, minutes_distant ) CREATE TABLE dual_carrier ( main_airline, low_flight_number, high_flight_number, dual_airline, service_name ) CREATE TABLE month ( month_number, month_name ) CREATE TABLE equipment_sequence ( aircraft_code_sequence, aircraft_code ) CREATE TABLE code_description ( code, description ) CREATE TABLE flight_fare ( flight_id, fare_id ) CREATE TABLE fare_basis ( fare_basis_code, booking_class, class_type, premium, economy, discounted, night, season, basis_days ) CREATE TABLE fare ( fare_id, from_airport, to_airport, fare_basis_code, fare_airline, restriction_code, one_direction_cost, round_trip_cost, round_trip_required ) CREATE TABLE flight_stop ( flight_id, stop_number, stop_days, stop_airport, arrival_time, arrival_airline, arrival_flight_number, departure_time, departure_airline, departure_flight_number, stop_time ) -- Using valid SQLite, answer the following questions for the tables provided above. -- show me airlines between BOSTON and SAN FRANCISCO SELECT### Response: SELECT DISTINCT airline.airline_code FROM airline, 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 = 'SAN FRANCISCO' AND flight.airline_code = airline.airline_code AND flight.from_airport = AIRPORT_SERVICE_0.airport_code AND flight.to_airport = AIRPORT_SERVICE_1.airport_code.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE days ( days_code, day_name ) CREATE TABLE flight ( aircraft_code_sequence, airline_code, airline_flight, arrival_time, connections, departure_time, dual_carrier, flight_days, flight_id, flight_number, from_airport, meal_code, stops, time_elapsed, to_airport ) CREATE TABLE airport_service ( city_code, airport_code, miles_distant, direction, minutes_distant ) CREATE TABLE food_service ( meal_code, meal_number, compartment, meal_description ) CREATE TABLE equipment_sequence ( aircraft_code_sequence, aircraft_code ) CREATE TABLE ground_service ( city_code, airport_code, transport_type, ground_fare ) CREATE TABLE airline ( airline_code, airline_name, note ) CREATE TABLE restriction ( restriction_code, advance_purchase, stopovers, saturday_stay_required, minimum_stay, maximum_stay, application, no_discounts ) CREATE TABLE state ( state_code, state_name, country_name ) CREATE TABLE time_interval ( period, begin_time, end_time ) CREATE TABLE month ( month_number, month_name ) CREATE TABLE code_description ( code, description ) CREATE TABLE compartment_class ( compartment, class_type ) CREATE TABLE flight_fare ( flight_id, fare_id ) CREATE TABLE date_day ( month_number, day_number, year, day_name ) CREATE TABLE time_zone ( time_zone_code, time_zone_name, hours_from_gmt ) CREATE TABLE fare_basis ( fare_basis_code, booking_class, class_type, premium, economy, discounted, night, season, basis_days ) CREATE TABLE aircraft ( aircraft_code, aircraft_description, manufacturer, basic_type, engines, propulsion, wide_body, wing_span, length, weight, capacity, pay_load, cruising_speed, range_miles, pressurized ) CREATE TABLE fare ( fare_id, from_airport, to_airport, fare_basis_code, fare_airline, restriction_code, one_direction_cost, round_trip_cost, round_trip_required ) CREATE TABLE flight_stop ( flight_id, stop_number, stop_days, stop_airport, arrival_time, arrival_airline, arrival_flight_number, departure_time, departure_airline, departure_flight_number, stop_time ) CREATE TABLE flight_leg ( flight_id, leg_number, leg_flight ) CREATE TABLE class_of_service ( booking_class, rank, class_description ) CREATE TABLE dual_carrier ( main_airline, low_flight_number, high_flight_number, dual_airline, service_name ) CREATE TABLE airport ( airport_code, airport_name, airport_location, state_code, country_name, time_zone_code, minimum_connect_time ) CREATE TABLE city ( city_code, city_name, state_code, country_name, time_zone_code ) -- Using valid SQLite, answer the following questions for the tables provided above. -- could you tell me what the abbreviation US stands for SELECT### Response: SELECT DISTINCT airline_code FROM airline WHERE airline_code = 'US'.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE keyword ( id, keyword ) CREATE TABLE producer ( pid, gender, name, nationality, birth_city, birth_year ) CREATE TABLE company ( id, name, country_code ) CREATE TABLE classification ( id, msid, gid ) CREATE TABLE actor ( aid, gender, name, nationality, birth_city, birth_year ) CREATE TABLE copyright ( id, msid, cid ) CREATE TABLE movie ( mid, title, release_year, title_aka, budget ) CREATE TABLE genre ( gid, genre ) CREATE TABLE tv_series ( sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget ) CREATE TABLE directed_by ( id, msid, did ) CREATE TABLE made_by ( id, msid, pid ) CREATE TABLE writer ( wid, gender, name, nationality, birth_city, birth_year ) CREATE TABLE written_by ( id, msid, wid ) CREATE TABLE cast ( id, msid, aid, role ) CREATE TABLE director ( did, gender, name, nationality, birth_city, birth_year ) CREATE TABLE tags ( id, msid, kid ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which actors were born in Tehran SELECT### Response: SELECT name FROM actor WHERE birth_city = 'Tehran'.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE date_day ( month_number, day_number, year, day_name ) CREATE TABLE state ( state_code, state_name, country_name ) CREATE TABLE city ( city_code, city_name, state_code, country_name, time_zone_code ) CREATE TABLE flight_leg ( flight_id, leg_number, leg_flight ) CREATE TABLE compartment_class ( compartment, class_type ) CREATE TABLE equipment_sequence ( aircraft_code_sequence, aircraft_code ) CREATE TABLE fare_basis ( fare_basis_code, booking_class, class_type, premium, economy, discounted, night, season, basis_days ) CREATE TABLE code_description ( code, description ) CREATE TABLE fare ( fare_id, from_airport, to_airport, fare_basis_code, fare_airline, restriction_code, one_direction_cost, round_trip_cost, round_trip_required ) CREATE TABLE airline ( airline_code, airline_name, note ) CREATE TABLE flight_fare ( flight_id, fare_id ) CREATE TABLE month ( month_number, month_name ) CREATE TABLE ground_service ( city_code, airport_code, transport_type, ground_fare ) CREATE TABLE aircraft ( aircraft_code, aircraft_description, manufacturer, basic_type, engines, propulsion, wide_body, wing_span, length, weight, capacity, pay_load, cruising_speed, range_miles, pressurized ) CREATE TABLE time_zone ( time_zone_code, time_zone_name, hours_from_gmt ) CREATE TABLE restriction ( restriction_code, advance_purchase, stopovers, saturday_stay_required, minimum_stay, maximum_stay, application, no_discounts ) CREATE TABLE flight ( aircraft_code_sequence, airline_code, airline_flight, arrival_time, connections, departure_time, dual_carrier, flight_days, flight_id, flight_number, from_airport, meal_code, stops, time_elapsed, to_airport ) CREATE TABLE airport_service ( city_code, airport_code, miles_distant, direction, minutes_distant ) CREATE TABLE dual_carrier ( main_airline, low_flight_number, high_flight_number, dual_airline, service_name ) CREATE TABLE days ( days_code, day_name ) CREATE TABLE food_service ( meal_code, meal_number, compartment, meal_description ) CREATE TABLE class_of_service ( booking_class, rank, class_description ) CREATE TABLE airport ( airport_code, airport_name, airport_location, state_code, country_name, time_zone_code, minimum_connect_time ) CREATE TABLE flight_stop ( flight_id, stop_number, stop_days, stop_airport, arrival_time, arrival_airline, arrival_flight_number, departure_time, departure_airline, departure_flight_number, stop_time ) CREATE TABLE time_interval ( period, begin_time, end_time ) -- Using valid SQLite, answer the following questions for the tables provided above. -- i need an early flight from DENVER to SAN FRANCISCO please and i would like BREAKFAST served on that SELECT### 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, food_service WHERE (((flight.departure_time <= 1000 AND flight.departure_time >= 0) AND food_service.meal_code = flight.meal_code AND food_service.meal_description = 'BREAKFAST') AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'SAN FRANCISCO' AND flight.to_airport = AIRPORT_SERVICE_1.airport_code) AND CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'DENVER' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE company ( id, name, country_code ) CREATE TABLE writer ( wid, gender, name, nationality, birth_city, birth_year ) CREATE TABLE directed_by ( id, msid, did ) CREATE TABLE copyright ( id, msid, cid ) CREATE TABLE genre ( gid, genre ) CREATE TABLE director ( did, gender, name, nationality, birth_city, birth_year ) CREATE TABLE classification ( id, msid, gid ) CREATE TABLE cast ( id, msid, aid, role ) CREATE TABLE made_by ( id, msid, pid ) CREATE TABLE tv_series ( sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget ) CREATE TABLE tags ( id, msid, kid ) CREATE TABLE movie ( mid, title, release_year, title_aka, budget ) CREATE TABLE producer ( pid, gender, name, nationality, birth_city, birth_year ) CREATE TABLE keyword ( id, keyword ) CREATE TABLE written_by ( id, msid, wid ) CREATE TABLE actor ( aid, gender, name, nationality, birth_city, birth_year ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the latest movie by ' Jim Jarmusch SELECT### Response: SELECT movie.title FROM directed_by, director, movie WHERE director.did = directed_by.did AND director.name = 'Jim Jarmusch' AND movie.mid = directed_by.msid ORDER BY movie.release_year DESC LIMIT 1.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE city ( city_code, city_name, state_code, country_name, time_zone_code ) CREATE TABLE time_interval ( period, begin_time, end_time ) CREATE TABLE airline ( airline_code, airline_name, note ) CREATE TABLE compartment_class ( compartment, class_type ) CREATE TABLE flight_leg ( flight_id, leg_number, leg_flight ) CREATE TABLE flight_stop ( flight_id, stop_number, stop_days, stop_airport, arrival_time, arrival_airline, arrival_flight_number, departure_time, departure_airline, departure_flight_number, stop_time ) CREATE TABLE dual_carrier ( main_airline, low_flight_number, high_flight_number, dual_airline, service_name ) CREATE TABLE flight_fare ( flight_id, fare_id ) CREATE TABLE time_zone ( time_zone_code, time_zone_name, hours_from_gmt ) CREATE TABLE restriction ( restriction_code, advance_purchase, stopovers, saturday_stay_required, minimum_stay, maximum_stay, application, no_discounts ) CREATE TABLE fare ( fare_id, from_airport, to_airport, fare_basis_code, fare_airline, restriction_code, one_direction_cost, round_trip_cost, round_trip_required ) CREATE TABLE code_description ( code, description ) CREATE TABLE ground_service ( city_code, airport_code, transport_type, ground_fare ) CREATE TABLE flight ( aircraft_code_sequence, airline_code, airline_flight, arrival_time, connections, departure_time, dual_carrier, flight_days, flight_id, flight_number, from_airport, meal_code, stops, time_elapsed, to_airport ) CREATE TABLE date_day ( month_number, day_number, year, day_name ) CREATE TABLE class_of_service ( booking_class, rank, class_description ) CREATE TABLE airport ( airport_code, airport_name, airport_location, state_code, country_name, time_zone_code, minimum_connect_time ) CREATE TABLE airport_service ( city_code, airport_code, miles_distant, direction, minutes_distant ) CREATE TABLE fare_basis ( fare_basis_code, booking_class, class_type, premium, economy, discounted, night, season, basis_days ) CREATE TABLE aircraft ( aircraft_code, aircraft_description, manufacturer, basic_type, engines, propulsion, wide_body, wing_span, length, weight, capacity, pay_load, cruising_speed, range_miles, pressurized ) CREATE TABLE days ( days_code, day_name ) CREATE TABLE equipment_sequence ( aircraft_code_sequence, aircraft_code ) CREATE TABLE month ( month_number, month_name ) CREATE TABLE state ( state_code, state_name, country_name ) CREATE TABLE food_service ( meal_code, meal_number, compartment, meal_description ) -- Using valid SQLite, answer the following questions for the tables provided above. -- display flights from DALLAS to ATLANTA which depart between 1400 and 1800 SELECT### 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 ((flight.departure_time <= 1800 AND flight.departure_time >= 1400) AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'ATLANTA' AND flight.to_airport = AIRPORT_SERVICE_1.airport_code) AND CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'DALLAS' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE airport_service ( city_code, airport_code, miles_distant, direction, minutes_distant ) CREATE TABLE compartment_class ( compartment, class_type ) CREATE TABLE flight_fare ( flight_id, fare_id ) CREATE TABLE flight ( aircraft_code_sequence, airline_code, airline_flight, arrival_time, connections, departure_time, dual_carrier, flight_days, flight_id, flight_number, from_airport, meal_code, stops, time_elapsed, to_airport ) CREATE TABLE flight_leg ( flight_id, leg_number, leg_flight ) CREATE TABLE fare_basis ( fare_basis_code, booking_class, class_type, premium, economy, discounted, night, season, basis_days ) CREATE TABLE ground_service ( city_code, airport_code, transport_type, ground_fare ) CREATE TABLE class_of_service ( booking_class, rank, class_description ) CREATE TABLE food_service ( meal_code, meal_number, compartment, meal_description ) CREATE TABLE airline ( airline_code, airline_name, note ) CREATE TABLE equipment_sequence ( aircraft_code_sequence, aircraft_code ) CREATE TABLE days ( days_code, day_name ) CREATE TABLE airport ( airport_code, airport_name, airport_location, state_code, country_name, time_zone_code, minimum_connect_time ) CREATE TABLE flight_stop ( flight_id, stop_number, stop_days, stop_airport, arrival_time, arrival_airline, arrival_flight_number, departure_time, departure_airline, departure_flight_number, stop_time ) CREATE TABLE month ( month_number, month_name ) CREATE TABLE state ( state_code, state_name, country_name ) CREATE TABLE time_zone ( time_zone_code, time_zone_name, hours_from_gmt ) CREATE TABLE date_day ( month_number, day_number, year, day_name ) CREATE TABLE restriction ( restriction_code, advance_purchase, stopovers, saturday_stay_required, minimum_stay, maximum_stay, application, no_discounts ) CREATE TABLE fare ( fare_id, from_airport, to_airport, fare_basis_code, fare_airline, restriction_code, one_direction_cost, round_trip_cost, round_trip_required ) CREATE TABLE city ( city_code, city_name, state_code, country_name, time_zone_code ) CREATE TABLE dual_carrier ( main_airline, low_flight_number, high_flight_number, dual_airline, service_name ) CREATE TABLE code_description ( code, description ) CREATE TABLE aircraft ( aircraft_code, aircraft_description, manufacturer, basic_type, engines, propulsion, wide_body, wing_span, length, weight, capacity, pay_load, cruising_speed, range_miles, pressurized ) CREATE TABLE time_interval ( period, begin_time, end_time ) -- Using valid SQLite, answer the following questions for the tables provided above. -- show me the airlines between BOSTON and TORONTO SELECT### Response: SELECT DISTINCT airline.airline_code FROM airline, 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 = 'TORONTO' AND flight.airline_code = airline.airline_code AND flight.from_airport = AIRPORT_SERVICE_0.airport_code AND flight.to_airport = AIRPORT_SERVICE_1.airport_code.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE code_description ( code, description ) CREATE TABLE month ( month_number, month_name ) CREATE TABLE fare ( fare_id, from_airport, to_airport, fare_basis_code, fare_airline, restriction_code, one_direction_cost, round_trip_cost, round_trip_required ) CREATE TABLE city ( city_code, city_name, state_code, country_name, time_zone_code ) CREATE TABLE time_zone ( time_zone_code, time_zone_name, hours_from_gmt ) CREATE TABLE flight ( aircraft_code_sequence, airline_code, airline_flight, arrival_time, connections, departure_time, dual_carrier, flight_days, flight_id, flight_number, from_airport, meal_code, stops, time_elapsed, to_airport ) CREATE TABLE airline ( airline_code, airline_name, note ) CREATE TABLE airport_service ( city_code, airport_code, miles_distant, direction, minutes_distant ) CREATE TABLE ground_service ( city_code, airport_code, transport_type, ground_fare ) CREATE TABLE equipment_sequence ( aircraft_code_sequence, aircraft_code ) CREATE TABLE fare_basis ( fare_basis_code, booking_class, class_type, premium, economy, discounted, night, season, basis_days ) CREATE TABLE class_of_service ( booking_class, rank, class_description ) CREATE TABLE state ( state_code, state_name, country_name ) CREATE TABLE aircraft ( aircraft_code, aircraft_description, manufacturer, basic_type, engines, propulsion, wide_body, wing_span, length, weight, capacity, pay_load, cruising_speed, range_miles, pressurized ) CREATE TABLE days ( days_code, day_name ) CREATE TABLE compartment_class ( compartment, class_type ) CREATE TABLE airport ( airport_code, airport_name, airport_location, state_code, country_name, time_zone_code, minimum_connect_time ) CREATE TABLE flight_leg ( flight_id, leg_number, leg_flight ) CREATE TABLE restriction ( restriction_code, advance_purchase, stopovers, saturday_stay_required, minimum_stay, maximum_stay, application, no_discounts ) CREATE TABLE flight_stop ( flight_id, stop_number, stop_days, stop_airport, arrival_time, arrival_airline, arrival_flight_number, departure_time, departure_airline, departure_flight_number, stop_time ) CREATE TABLE date_day ( month_number, day_number, year, day_name ) CREATE TABLE food_service ( meal_code, meal_number, compartment, meal_description ) CREATE TABLE dual_carrier ( main_airline, low_flight_number, high_flight_number, dual_airline, service_name ) CREATE TABLE time_interval ( period, begin_time, end_time ) CREATE TABLE flight_fare ( flight_id, fare_id ) -- Using valid SQLite, answer the following questions for the tables provided above. -- show me all flights from PHOENIX to MILWAUKEE next wednesday SELECT### 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, date_day, days, flight WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'MILWAUKEE' AND date_day.day_number = 23 AND date_day.month_number = 4 AND date_day.year = 1991 AND days.day_name = date_day.day_name AND flight.flight_days = days.days_code AND flight.to_airport = AIRPORT_SERVICE_1.airport_code) AND CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'PHOENIX' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE airport_service ( city_code, airport_code, miles_distant, direction, minutes_distant ) CREATE TABLE equipment_sequence ( aircraft_code_sequence, aircraft_code ) CREATE TABLE flight_stop ( flight_id, stop_number, stop_days, stop_airport, arrival_time, arrival_airline, arrival_flight_number, departure_time, departure_airline, departure_flight_number, stop_time ) CREATE TABLE fare ( fare_id, from_airport, to_airport, fare_basis_code, fare_airline, restriction_code, one_direction_cost, round_trip_cost, round_trip_required ) CREATE TABLE time_zone ( time_zone_code, time_zone_name, hours_from_gmt ) CREATE TABLE food_service ( meal_code, meal_number, compartment, meal_description ) CREATE TABLE flight ( aircraft_code_sequence, airline_code, airline_flight, arrival_time, connections, departure_time, dual_carrier, flight_days, flight_id, flight_number, from_airport, meal_code, stops, time_elapsed, to_airport ) CREATE TABLE fare_basis ( fare_basis_code, booking_class, class_type, premium, economy, discounted, night, season, basis_days ) CREATE TABLE ground_service ( city_code, airport_code, transport_type, ground_fare ) CREATE TABLE aircraft ( aircraft_code, aircraft_description, manufacturer, basic_type, engines, propulsion, wide_body, wing_span, length, weight, capacity, pay_load, cruising_speed, range_miles, pressurized ) CREATE TABLE airline ( airline_code, airline_name, note ) CREATE TABLE code_description ( code, description ) CREATE TABLE class_of_service ( booking_class, rank, class_description ) CREATE TABLE date_day ( month_number, day_number, year, day_name ) CREATE TABLE airport ( airport_code, airport_name, airport_location, state_code, country_name, time_zone_code, minimum_connect_time ) CREATE TABLE flight_fare ( flight_id, fare_id ) CREATE TABLE time_interval ( period, begin_time, end_time ) CREATE TABLE city ( city_code, city_name, state_code, country_name, time_zone_code ) CREATE TABLE flight_leg ( flight_id, leg_number, leg_flight ) CREATE TABLE days ( days_code, day_name ) CREATE TABLE month ( month_number, month_name ) CREATE TABLE compartment_class ( compartment, class_type ) CREATE TABLE restriction ( restriction_code, advance_purchase, stopovers, saturday_stay_required, minimum_stay, maximum_stay, application, no_discounts ) CREATE TABLE state ( state_code, state_name, country_name ) CREATE TABLE dual_carrier ( main_airline, low_flight_number, high_flight_number, dual_airline, service_name ) -- Using valid SQLite, answer the following questions for the tables provided above. -- define airline US SELECT### Response: SELECT DISTINCT airline_code FROM airline WHERE airline_code = 'US'.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE aircraft ( aircraft_code, aircraft_description, manufacturer, basic_type, engines, propulsion, wide_body, wing_span, length, weight, capacity, pay_load, cruising_speed, range_miles, pressurized ) CREATE TABLE days ( days_code, day_name ) CREATE TABLE code_description ( code, description ) CREATE TABLE ground_service ( city_code, airport_code, transport_type, ground_fare ) CREATE TABLE food_service ( meal_code, meal_number, compartment, meal_description ) CREATE TABLE state ( state_code, state_name, country_name ) CREATE TABLE flight_leg ( flight_id, leg_number, leg_flight ) CREATE TABLE month ( month_number, month_name ) CREATE TABLE airport ( airport_code, airport_name, airport_location, state_code, country_name, time_zone_code, minimum_connect_time ) CREATE TABLE date_day ( month_number, day_number, year, day_name ) CREATE TABLE class_of_service ( booking_class, rank, class_description ) CREATE TABLE compartment_class ( compartment, class_type ) CREATE TABLE fare ( fare_id, from_airport, to_airport, fare_basis_code, fare_airline, restriction_code, one_direction_cost, round_trip_cost, round_trip_required ) CREATE TABLE fare_basis ( fare_basis_code, booking_class, class_type, premium, economy, discounted, night, season, basis_days ) CREATE TABLE city ( city_code, city_name, state_code, country_name, time_zone_code ) CREATE TABLE flight_fare ( flight_id, fare_id ) CREATE TABLE restriction ( restriction_code, advance_purchase, stopovers, saturday_stay_required, minimum_stay, maximum_stay, application, no_discounts ) CREATE TABLE equipment_sequence ( aircraft_code_sequence, aircraft_code ) CREATE TABLE flight_stop ( flight_id, stop_number, stop_days, stop_airport, arrival_time, arrival_airline, arrival_flight_number, departure_time, departure_airline, departure_flight_number, stop_time ) CREATE TABLE airline ( airline_code, airline_name, note ) CREATE TABLE dual_carrier ( main_airline, low_flight_number, high_flight_number, dual_airline, service_name ) CREATE TABLE airport_service ( city_code, airport_code, miles_distant, direction, minutes_distant ) CREATE TABLE flight ( aircraft_code_sequence, airline_code, airline_flight, arrival_time, connections, departure_time, dual_carrier, flight_days, flight_id, flight_number, from_airport, meal_code, stops, time_elapsed, to_airport ) CREATE TABLE time_interval ( period, begin_time, end_time ) CREATE TABLE time_zone ( time_zone_code, time_zone_name, hours_from_gmt ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how many FIRST class flights does UA have departing from BOSTON today SELECT### Response: SELECT COUNT(DISTINCT flight.flight_id) FROM airport_service, city, date_day AS DATE_DAY_0, date_day AS DATE_DAY_1, days AS DAYS_0, days AS DAYS_1, fare, fare_basis AS FARE_BASIS_0, fare_basis AS FARE_BASIS_1, flight, flight_fare WHERE ((city.city_code = airport_service.city_code AND city.city_name = 'BOSTON' AND DATE_DAY_1.day_number = 29 AND DATE_DAY_1.month_number = 4 AND DATE_DAY_1.year = 1991 AND DAYS_1.day_name = DATE_DAY_1.day_name AND FARE_BASIS_0.class_type = 'FIRST' AND FARE_BASIS_1.basis_days = DAYS_1.days_code AND fare.fare_basis_code = FARE_BASIS_0.fare_basis_code AND fare.fare_basis_code = FARE_BASIS_1.fare_basis_code AND flight_fare.fare_id = fare.fare_id AND flight.flight_id = flight_fare.flight_id AND flight.from_airport = airport_service.airport_code) AND DATE_DAY_0.day_number = 29 AND DATE_DAY_0.month_number = 4 AND DATE_DAY_0.year = 1991 AND DAYS_0.day_name = DATE_DAY_0.day_name AND flight.flight_days = DAYS_0.days_code) AND flight.airline_code = 'UA'.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE checkin ( cid, business_id, count, day ) CREATE TABLE category ( id, business_id, category_name ) CREATE TABLE review ( rid, business_id, user_id, rating, text, year, month ) CREATE TABLE neighborhood ( id, business_id, neighborhood_name ) CREATE TABLE business ( bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state ) CREATE TABLE user ( uid, user_id, name ) CREATE TABLE tip ( tip_id, business_id, text, user_id, likes, year, month ) -- Using valid SQLite, answer the following questions for the tables provided above. -- find all cities which has a ' Taj Mahal ' restaurant SELECT### Response: SELECT business.city FROM business, category WHERE business.name = 'Taj Mahal' AND category.business_id = business.business_id AND category.category_name = 'restaurant'.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE compartment_class ( compartment, class_type ) CREATE TABLE flight_fare ( flight_id, fare_id ) CREATE TABLE flight_stop ( flight_id, stop_number, stop_days, stop_airport, arrival_time, arrival_airline, arrival_flight_number, departure_time, departure_airline, departure_flight_number, stop_time ) CREATE TABLE equipment_sequence ( aircraft_code_sequence, aircraft_code ) CREATE TABLE time_interval ( period, begin_time, end_time ) CREATE TABLE flight ( aircraft_code_sequence, airline_code, airline_flight, arrival_time, connections, departure_time, dual_carrier, flight_days, flight_id, flight_number, from_airport, meal_code, stops, time_elapsed, to_airport ) CREATE TABLE state ( state_code, state_name, country_name ) CREATE TABLE flight_leg ( flight_id, leg_number, leg_flight ) CREATE TABLE restriction ( restriction_code, advance_purchase, stopovers, saturday_stay_required, minimum_stay, maximum_stay, application, no_discounts ) CREATE TABLE class_of_service ( booking_class, rank, class_description ) CREATE TABLE food_service ( meal_code, meal_number, compartment, meal_description ) CREATE TABLE date_day ( month_number, day_number, year, day_name ) CREATE TABLE dual_carrier ( main_airline, low_flight_number, high_flight_number, dual_airline, service_name ) CREATE TABLE airport ( airport_code, airport_name, airport_location, state_code, country_name, time_zone_code, minimum_connect_time ) CREATE TABLE code_description ( code, description ) CREATE TABLE fare ( fare_id, from_airport, to_airport, fare_basis_code, fare_airline, restriction_code, one_direction_cost, round_trip_cost, round_trip_required ) CREATE TABLE ground_service ( city_code, airport_code, transport_type, ground_fare ) CREATE TABLE airline ( airline_code, airline_name, note ) CREATE TABLE time_zone ( time_zone_code, time_zone_name, hours_from_gmt ) CREATE TABLE airport_service ( city_code, airport_code, miles_distant, direction, minutes_distant ) CREATE TABLE month ( month_number, month_name ) CREATE TABLE aircraft ( aircraft_code, aircraft_description, manufacturer, basic_type, engines, propulsion, wide_body, wing_span, length, weight, capacity, pay_load, cruising_speed, range_miles, pressurized ) CREATE TABLE days ( days_code, day_name ) CREATE TABLE fare_basis ( fare_basis_code, booking_class, class_type, premium, economy, discounted, night, season, basis_days ) CREATE TABLE city ( city_code, city_name, state_code, country_name, time_zone_code ) -- Using valid SQLite, answer the following questions for the tables provided above. -- show me the earliest nonstop flight from DALLAS to HOUSTON SELECT### 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 (((flight.stops = 0) AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'HOUSTON' AND flight.to_airport = AIRPORT_SERVICE_1.airport_code) AND CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'DALLAS' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code) AND flight.departure_time = (SELECT MIN(FLIGHTalias1.departure_time) FROM airport_service AS AIRPORT_SERVICEalias2, airport_service AS AIRPORT_SERVICEalias3, city AS CITYalias2, city AS CITYalias3, flight AS FLIGHTalias1 WHERE ((FLIGHTalias1.stops = 0) AND CITYalias3.city_code = AIRPORT_SERVICEalias3.city_code AND CITYalias3.city_name = 'HOUSTON' AND FLIGHTalias1.to_airport = AIRPORT_SERVICEalias3.airport_code) AND CITYalias2.city_code = AIRPORT_SERVICEalias2.city_code AND CITYalias2.city_name = 'DALLAS' AND FLIGHTalias1.from_airport = AIRPORT_SERVICEalias2.airport_code).
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE days ( days_code, day_name ) CREATE TABLE fare_basis ( fare_basis_code, booking_class, class_type, premium, economy, discounted, night, season, basis_days ) CREATE TABLE fare ( fare_id, from_airport, to_airport, fare_basis_code, fare_airline, restriction_code, one_direction_cost, round_trip_cost, round_trip_required ) CREATE TABLE flight_stop ( flight_id, stop_number, stop_days, stop_airport, arrival_time, arrival_airline, arrival_flight_number, departure_time, departure_airline, departure_flight_number, stop_time ) CREATE TABLE ground_service ( city_code, airport_code, transport_type, ground_fare ) CREATE TABLE city ( city_code, city_name, state_code, country_name, time_zone_code ) CREATE TABLE code_description ( code, description ) CREATE TABLE dual_carrier ( main_airline, low_flight_number, high_flight_number, dual_airline, service_name ) CREATE TABLE airport ( airport_code, airport_name, airport_location, state_code, country_name, time_zone_code, minimum_connect_time ) CREATE TABLE month ( month_number, month_name ) CREATE TABLE flight_fare ( flight_id, fare_id ) CREATE TABLE flight_leg ( flight_id, leg_number, leg_flight ) CREATE TABLE restriction ( restriction_code, advance_purchase, stopovers, saturday_stay_required, minimum_stay, maximum_stay, application, no_discounts ) CREATE TABLE equipment_sequence ( aircraft_code_sequence, aircraft_code ) CREATE TABLE state ( state_code, state_name, country_name ) CREATE TABLE aircraft ( aircraft_code, aircraft_description, manufacturer, basic_type, engines, propulsion, wide_body, wing_span, length, weight, capacity, pay_load, cruising_speed, range_miles, pressurized ) CREATE TABLE date_day ( month_number, day_number, year, day_name ) CREATE TABLE class_of_service ( booking_class, rank, class_description ) CREATE TABLE time_zone ( time_zone_code, time_zone_name, hours_from_gmt ) CREATE TABLE airline ( airline_code, airline_name, note ) CREATE TABLE food_service ( meal_code, meal_number, compartment, meal_description ) CREATE TABLE compartment_class ( compartment, class_type ) CREATE TABLE flight ( aircraft_code_sequence, airline_code, airline_flight, arrival_time, connections, departure_time, dual_carrier, flight_days, flight_id, flight_number, from_airport, meal_code, stops, time_elapsed, to_airport ) CREATE TABLE time_interval ( period, begin_time, end_time ) CREATE TABLE airport_service ( city_code, airport_code, miles_distant, direction, minutes_distant ) -- Using valid SQLite, answer the following questions for the tables provided above. -- i'd like to get a flight leaving SAN FRANCISCO and arriving at PHILADELPHIA pennsylvania SELECT### 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 = 'SAN FRANCISCO' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'PHILADELPHIA' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code AND flight.to_airport = AIRPORT_SERVICE_1.airport_code.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE fare ( fare_id, from_airport, to_airport, fare_basis_code, fare_airline, restriction_code, one_direction_cost, round_trip_cost, round_trip_required ) CREATE TABLE compartment_class ( compartment, class_type ) CREATE TABLE city ( city_code, city_name, state_code, country_name, time_zone_code ) CREATE TABLE flight_fare ( flight_id, fare_id ) CREATE TABLE class_of_service ( booking_class, rank, class_description ) CREATE TABLE airline ( airline_code, airline_name, note ) CREATE TABLE flight_leg ( flight_id, leg_number, leg_flight ) CREATE TABLE equipment_sequence ( aircraft_code_sequence, aircraft_code ) CREATE TABLE flight_stop ( flight_id, stop_number, stop_days, stop_airport, arrival_time, arrival_airline, arrival_flight_number, departure_time, departure_airline, departure_flight_number, stop_time ) CREATE TABLE ground_service ( city_code, airport_code, transport_type, ground_fare ) CREATE TABLE restriction ( restriction_code, advance_purchase, stopovers, saturday_stay_required, minimum_stay, maximum_stay, application, no_discounts ) CREATE TABLE days ( days_code, day_name ) CREATE TABLE time_zone ( time_zone_code, time_zone_name, hours_from_gmt ) CREATE TABLE month ( month_number, month_name ) CREATE TABLE time_interval ( period, begin_time, end_time ) CREATE TABLE dual_carrier ( main_airline, low_flight_number, high_flight_number, dual_airline, service_name ) CREATE TABLE aircraft ( aircraft_code, aircraft_description, manufacturer, basic_type, engines, propulsion, wide_body, wing_span, length, weight, capacity, pay_load, cruising_speed, range_miles, pressurized ) CREATE TABLE date_day ( month_number, day_number, year, day_name ) CREATE TABLE code_description ( code, description ) CREATE TABLE airport_service ( city_code, airport_code, miles_distant, direction, minutes_distant ) CREATE TABLE state ( state_code, state_name, country_name ) CREATE TABLE flight ( aircraft_code_sequence, airline_code, airline_flight, arrival_time, connections, departure_time, dual_carrier, flight_days, flight_id, flight_number, from_airport, meal_code, stops, time_elapsed, to_airport ) CREATE TABLE airport ( airport_code, airport_name, airport_location, state_code, country_name, time_zone_code, minimum_connect_time ) CREATE TABLE food_service ( meal_code, meal_number, compartment, meal_description ) CREATE TABLE fare_basis ( fare_basis_code, booking_class, class_type, premium, economy, discounted, night, season, basis_days ) -- Using valid SQLite, answer the following questions for the tables provided above. -- are there any early flights from ATLANTA to WASHINGTON on THURSDAY mornings SELECT### 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, days, flight WHERE (((days.day_name = 'THURSDAY' AND flight.departure_time < 1000 AND flight.flight_days = days.days_code) AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'WASHINGTON' AND flight.to_airport = AIRPORT_SERVICE_1.airport_code) AND CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'ATLANTA' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code) AND flight.departure_time BETWEEN 0 AND 1200.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE mountain ( mountain_name, mountain_altitude, state_name, country_name ) CREATE TABLE highlow ( state_name, highest_point, highest_elevation, lowest_point, lowest_elevation ) CREATE TABLE road ( road_name, state_name ) CREATE TABLE city ( city_name, state_name, population, country_name ) CREATE TABLE state ( state_name, capital, population, area, country_name, density ) CREATE TABLE river ( river_name, length, traverse, country_name ) CREATE TABLE border_info ( state_name, border ) CREATE TABLE lake ( lake_name, area, state_name, country_name ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what are the populations of states through which the mississippi river runs SELECT### Response: SELECT population FROM state WHERE state_name IN (SELECT RIVERalias0.traverse FROM river AS RIVERalias0 WHERE RIVERalias0.river_name = 'mississippi').
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE writes ( paperid, authorid ) CREATE TABLE field ( fieldid ) CREATE TABLE author ( authorid, authorname ) CREATE TABLE dataset ( datasetid, datasetname ) CREATE TABLE paperfield ( fieldid, paperid ) CREATE TABLE journal ( journalid, journalname ) CREATE TABLE paperkeyphrase ( paperid, keyphraseid ) CREATE TABLE paperdataset ( paperid, datasetid ) CREATE TABLE keyphrase ( keyphraseid, keyphrasename ) CREATE TABLE cite ( citingpaperid, citedpaperid ) CREATE TABLE paper ( paperid, title, venueid, year, numciting, numcitedby, journalid ) CREATE TABLE venue ( venueid, venuename ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how many ACL 2012 papers have more than 7 citations ? SELECT### Response: SELECT DISTINCT (paper.paperid), COUNT(cite.citingpaperid) FROM cite, paper, venue WHERE paper.paperid = cite.citedpaperid AND paper.year = 2012 AND venue.venueid = paper.venueid AND venue.venuename = 'ACL' GROUP BY paper.paperid HAVING COUNT(cite.citingpaperid) > 7.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE location ( restaurant_id, house_number, street_name, city_name ) CREATE TABLE geographic ( city_name, county, region ) CREATE TABLE restaurant ( id, name, food_type, city_name, rating ) -- Using valid SQLite, answer the following questions for the tables provided above. -- where is jamerican cuisine ? SELECT### Response: SELECT location.house_number, restaurant.name FROM location, restaurant WHERE restaurant.id = location.restaurant_id AND restaurant.name = 'jamerican cuisine'.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE airline ( airline_code, airline_name, note ) CREATE TABLE food_service ( meal_code, meal_number, compartment, meal_description ) CREATE TABLE fare ( fare_id, from_airport, to_airport, fare_basis_code, fare_airline, restriction_code, one_direction_cost, round_trip_cost, round_trip_required ) CREATE TABLE code_description ( code, description ) CREATE TABLE class_of_service ( booking_class, rank, class_description ) CREATE TABLE state ( state_code, state_name, country_name ) CREATE TABLE airport ( airport_code, airport_name, airport_location, state_code, country_name, time_zone_code, minimum_connect_time ) CREATE TABLE ground_service ( city_code, airport_code, transport_type, ground_fare ) CREATE TABLE aircraft ( aircraft_code, aircraft_description, manufacturer, basic_type, engines, propulsion, wide_body, wing_span, length, weight, capacity, pay_load, cruising_speed, range_miles, pressurized ) CREATE TABLE flight_leg ( flight_id, leg_number, leg_flight ) CREATE TABLE city ( city_code, city_name, state_code, country_name, time_zone_code ) CREATE TABLE flight_fare ( flight_id, fare_id ) CREATE TABLE airport_service ( city_code, airport_code, miles_distant, direction, minutes_distant ) CREATE TABLE compartment_class ( compartment, class_type ) CREATE TABLE restriction ( restriction_code, advance_purchase, stopovers, saturday_stay_required, minimum_stay, maximum_stay, application, no_discounts ) CREATE TABLE fare_basis ( fare_basis_code, booking_class, class_type, premium, economy, discounted, night, season, basis_days ) CREATE TABLE time_interval ( period, begin_time, end_time ) CREATE TABLE dual_carrier ( main_airline, low_flight_number, high_flight_number, dual_airline, service_name ) CREATE TABLE days ( days_code, day_name ) CREATE TABLE month ( month_number, month_name ) CREATE TABLE equipment_sequence ( aircraft_code_sequence, aircraft_code ) CREATE TABLE flight_stop ( flight_id, stop_number, stop_days, stop_airport, arrival_time, arrival_airline, arrival_flight_number, departure_time, departure_airline, departure_flight_number, stop_time ) CREATE TABLE date_day ( month_number, day_number, year, day_name ) CREATE TABLE time_zone ( time_zone_code, time_zone_name, hours_from_gmt ) CREATE TABLE flight ( aircraft_code_sequence, airline_code, airline_flight, arrival_time, connections, departure_time, dual_carrier, flight_days, flight_id, flight_number, from_airport, meal_code, stops, time_elapsed, to_airport ) -- Using valid SQLite, answer the following questions for the tables provided above. -- SAN FRANCISCO to DENVER SELECT### 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 = 'SAN FRANCISCO' 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.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE airport_service ( city_code, airport_code, miles_distant, direction, minutes_distant ) CREATE TABLE time_interval ( period, begin_time, end_time ) CREATE TABLE food_service ( meal_code, meal_number, compartment, meal_description ) CREATE TABLE ground_service ( city_code, airport_code, transport_type, ground_fare ) CREATE TABLE code_description ( code, description ) CREATE TABLE flight_fare ( flight_id, fare_id ) CREATE TABLE class_of_service ( booking_class, rank, class_description ) CREATE TABLE fare ( fare_id, from_airport, to_airport, fare_basis_code, fare_airline, restriction_code, one_direction_cost, round_trip_cost, round_trip_required ) CREATE TABLE city ( city_code, city_name, state_code, country_name, time_zone_code ) CREATE TABLE flight_leg ( flight_id, leg_number, leg_flight ) CREATE TABLE restriction ( restriction_code, advance_purchase, stopovers, saturday_stay_required, minimum_stay, maximum_stay, application, no_discounts ) CREATE TABLE airline ( airline_code, airline_name, note ) CREATE TABLE days ( days_code, day_name ) CREATE TABLE dual_carrier ( main_airline, low_flight_number, high_flight_number, dual_airline, service_name ) CREATE TABLE fare_basis ( fare_basis_code, booking_class, class_type, premium, economy, discounted, night, season, basis_days ) CREATE TABLE time_zone ( time_zone_code, time_zone_name, hours_from_gmt ) CREATE TABLE flight ( aircraft_code_sequence, airline_code, airline_flight, arrival_time, connections, departure_time, dual_carrier, flight_days, flight_id, flight_number, from_airport, meal_code, stops, time_elapsed, to_airport ) CREATE TABLE flight_stop ( flight_id, stop_number, stop_days, stop_airport, arrival_time, arrival_airline, arrival_flight_number, departure_time, departure_airline, departure_flight_number, stop_time ) CREATE TABLE airport ( airport_code, airport_name, airport_location, state_code, country_name, time_zone_code, minimum_connect_time ) CREATE TABLE date_day ( month_number, day_number, year, day_name ) CREATE TABLE compartment_class ( compartment, class_type ) CREATE TABLE month ( month_number, month_name ) CREATE TABLE equipment_sequence ( aircraft_code_sequence, aircraft_code ) CREATE TABLE aircraft ( aircraft_code, aircraft_description, manufacturer, basic_type, engines, propulsion, wide_body, wing_span, length, weight, capacity, pay_load, cruising_speed, range_miles, pressurized ) CREATE TABLE state ( state_code, state_name, country_name ) -- Using valid SQLite, answer the following questions for the tables provided above. -- okay how about a flight on sunday from TAMPA to CHARLOTTE SELECT### 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, date_day, days, flight WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'CHARLOTTE' AND date_day.day_number = 27 AND date_day.month_number = 8 AND date_day.year = 1991 AND days.day_name = date_day.day_name AND flight.flight_days = days.days_code AND flight.to_airport = AIRPORT_SERVICE_1.airport_code) AND CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'TAMPA' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE aircraft ( aircraft_code, aircraft_description, manufacturer, basic_type, engines, propulsion, wide_body, wing_span, length, weight, capacity, pay_load, cruising_speed, range_miles, pressurized ) CREATE TABLE time_interval ( period, begin_time, end_time ) CREATE TABLE fare_basis ( fare_basis_code, booking_class, class_type, premium, economy, discounted, night, season, basis_days ) CREATE TABLE date_day ( month_number, day_number, year, day_name ) CREATE TABLE days ( days_code, day_name ) CREATE TABLE airline ( airline_code, airline_name, note ) CREATE TABLE city ( city_code, city_name, state_code, country_name, time_zone_code ) CREATE TABLE restriction ( restriction_code, advance_purchase, stopovers, saturday_stay_required, minimum_stay, maximum_stay, application, no_discounts ) CREATE TABLE class_of_service ( booking_class, rank, class_description ) CREATE TABLE airport_service ( city_code, airport_code, miles_distant, direction, minutes_distant ) CREATE TABLE airport ( airport_code, airport_name, airport_location, state_code, country_name, time_zone_code, minimum_connect_time ) CREATE TABLE flight_leg ( flight_id, leg_number, leg_flight ) CREATE TABLE code_description ( code, description ) CREATE TABLE flight ( aircraft_code_sequence, airline_code, airline_flight, arrival_time, connections, departure_time, dual_carrier, flight_days, flight_id, flight_number, from_airport, meal_code, stops, time_elapsed, to_airport ) CREATE TABLE month ( month_number, month_name ) CREATE TABLE equipment_sequence ( aircraft_code_sequence, aircraft_code ) CREATE TABLE food_service ( meal_code, meal_number, compartment, meal_description ) CREATE TABLE time_zone ( time_zone_code, time_zone_name, hours_from_gmt ) CREATE TABLE flight_stop ( flight_id, stop_number, stop_days, stop_airport, arrival_time, arrival_airline, arrival_flight_number, departure_time, departure_airline, departure_flight_number, stop_time ) CREATE TABLE flight_fare ( flight_id, fare_id ) CREATE TABLE dual_carrier ( main_airline, low_flight_number, high_flight_number, dual_airline, service_name ) CREATE TABLE compartment_class ( compartment, class_type ) CREATE TABLE fare ( fare_id, from_airport, to_airport, fare_basis_code, fare_airline, restriction_code, one_direction_cost, round_trip_cost, round_trip_required ) CREATE TABLE state ( state_code, state_name, country_name ) CREATE TABLE ground_service ( city_code, airport_code, transport_type, ground_fare ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what ground transportation is there in DALLAS SELECT### Response: SELECT DISTINCT ground_service.transport_type FROM city, ground_service WHERE city.city_name = 'DALLAS' AND ground_service.city_code = city.city_code.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE ground_service ( city_code, airport_code, transport_type, ground_fare ) CREATE TABLE fare_basis ( fare_basis_code, booking_class, class_type, premium, economy, discounted, night, season, basis_days ) CREATE TABLE state ( state_code, state_name, country_name ) CREATE TABLE flight_fare ( flight_id, fare_id ) CREATE TABLE flight ( aircraft_code_sequence, airline_code, airline_flight, arrival_time, connections, departure_time, dual_carrier, flight_days, flight_id, flight_number, from_airport, meal_code, stops, time_elapsed, to_airport ) CREATE TABLE time_interval ( period, begin_time, end_time ) CREATE TABLE code_description ( code, description ) CREATE TABLE date_day ( month_number, day_number, year, day_name ) CREATE TABLE food_service ( meal_code, meal_number, compartment, meal_description ) CREATE TABLE time_zone ( time_zone_code, time_zone_name, hours_from_gmt ) CREATE TABLE month ( month_number, month_name ) CREATE TABLE flight_leg ( flight_id, leg_number, leg_flight ) CREATE TABLE city ( city_code, city_name, state_code, country_name, time_zone_code ) CREATE TABLE dual_carrier ( main_airline, low_flight_number, high_flight_number, dual_airline, service_name ) CREATE TABLE class_of_service ( booking_class, rank, class_description ) CREATE TABLE fare ( fare_id, from_airport, to_airport, fare_basis_code, fare_airline, restriction_code, one_direction_cost, round_trip_cost, round_trip_required ) CREATE TABLE flight_stop ( flight_id, stop_number, stop_days, stop_airport, arrival_time, arrival_airline, arrival_flight_number, departure_time, departure_airline, departure_flight_number, stop_time ) CREATE TABLE equipment_sequence ( aircraft_code_sequence, aircraft_code ) CREATE TABLE airport ( airport_code, airport_name, airport_location, state_code, country_name, time_zone_code, minimum_connect_time ) CREATE TABLE airport_service ( city_code, airport_code, miles_distant, direction, minutes_distant ) CREATE TABLE airline ( airline_code, airline_name, note ) CREATE TABLE days ( days_code, day_name ) CREATE TABLE compartment_class ( compartment, class_type ) CREATE TABLE restriction ( restriction_code, advance_purchase, stopovers, saturday_stay_required, minimum_stay, maximum_stay, application, no_discounts ) CREATE TABLE aircraft ( aircraft_code, aircraft_description, manufacturer, basic_type, engines, propulsion, wide_body, wing_span, length, weight, capacity, pay_load, cruising_speed, range_miles, pressurized ) -- Using valid SQLite, answer the following questions for the tables provided above. -- please list all flights on UA out of DENVER before 1200 SELECT### Response: SELECT DISTINCT flight.flight_id FROM airport_service, city, flight WHERE (city.city_code = airport_service.city_code AND city.city_name = 'DENVER' AND flight.departure_time < 1200 AND flight.from_airport = airport_service.airport_code) AND flight.airline_code = 'UA'.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE food_service ( meal_code, meal_number, compartment, meal_description ) CREATE TABLE state ( state_code, state_name, country_name ) CREATE TABLE time_interval ( period, begin_time, end_time ) CREATE TABLE code_description ( code, description ) CREATE TABLE airport_service ( city_code, airport_code, miles_distant, direction, minutes_distant ) CREATE TABLE fare_basis ( fare_basis_code, booking_class, class_type, premium, economy, discounted, night, season, basis_days ) CREATE TABLE flight_fare ( flight_id, fare_id ) CREATE TABLE month ( month_number, month_name ) CREATE TABLE time_zone ( time_zone_code, time_zone_name, hours_from_gmt ) CREATE TABLE dual_carrier ( main_airline, low_flight_number, high_flight_number, dual_airline, service_name ) CREATE TABLE airline ( airline_code, airline_name, note ) CREATE TABLE fare ( fare_id, from_airport, to_airport, fare_basis_code, fare_airline, restriction_code, one_direction_cost, round_trip_cost, round_trip_required ) CREATE TABLE class_of_service ( booking_class, rank, class_description ) CREATE TABLE restriction ( restriction_code, advance_purchase, stopovers, saturday_stay_required, minimum_stay, maximum_stay, application, no_discounts ) CREATE TABLE airport ( airport_code, airport_name, airport_location, state_code, country_name, time_zone_code, minimum_connect_time ) CREATE TABLE flight_stop ( flight_id, stop_number, stop_days, stop_airport, arrival_time, arrival_airline, arrival_flight_number, departure_time, departure_airline, departure_flight_number, stop_time ) CREATE TABLE days ( days_code, day_name ) CREATE TABLE equipment_sequence ( aircraft_code_sequence, aircraft_code ) CREATE TABLE flight_leg ( flight_id, leg_number, leg_flight ) CREATE TABLE date_day ( month_number, day_number, year, day_name ) CREATE TABLE aircraft ( aircraft_code, aircraft_description, manufacturer, basic_type, engines, propulsion, wide_body, wing_span, length, weight, capacity, pay_load, cruising_speed, range_miles, pressurized ) CREATE TABLE flight ( aircraft_code_sequence, airline_code, airline_flight, arrival_time, connections, departure_time, dual_carrier, flight_days, flight_id, flight_number, from_airport, meal_code, stops, time_elapsed, to_airport ) CREATE TABLE city ( city_code, city_name, state_code, country_name, time_zone_code ) CREATE TABLE compartment_class ( compartment, class_type ) CREATE TABLE ground_service ( city_code, airport_code, transport_type, ground_fare ) -- Using valid SQLite, answer the following questions for the tables provided above. -- show me the cheapest flights from ATLANTA to DENVER SELECT### 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, fare, flight, flight_fare WHERE (CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'ATLANTA' 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 fare.one_direction_cost = (SELECT MIN(FAREalias1.one_direction_cost) FROM airport_service AS AIRPORT_SERVICEalias2, airport_service AS AIRPORT_SERVICEalias3, city AS CITYalias2, city AS CITYalias3, fare AS FAREalias1, flight AS FLIGHTalias1, flight_fare AS FLIGHT_FAREalias1 WHERE CITYalias2.city_code = AIRPORT_SERVICEalias2.city_code AND CITYalias2.city_name = 'ATLANTA' AND CITYalias3.city_code = AIRPORT_SERVICEalias3.city_code AND CITYalias3.city_name = 'DENVER' AND FLIGHT_FAREalias1.fare_id = FAREalias1.fare_id AND FLIGHTalias1.flight_id = FLIGHT_FAREalias1.flight_id AND FLIGHTalias1.from_airport = AIRPORT_SERVICEalias2.airport_code AND FLIGHTalias1.to_airport = AIRPORT_SERVICEalias3.airport_code) AND flight_fare.fare_id = fare.fare_id AND flight.flight_id = flight_fare.flight_id.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE airport ( airport_code, airport_name, airport_location, state_code, country_name, time_zone_code, minimum_connect_time ) CREATE TABLE flight_stop ( flight_id, stop_number, stop_days, stop_airport, arrival_time, arrival_airline, arrival_flight_number, departure_time, departure_airline, departure_flight_number, stop_time ) CREATE TABLE airport_service ( city_code, airport_code, miles_distant, direction, minutes_distant ) CREATE TABLE ground_service ( city_code, airport_code, transport_type, ground_fare ) CREATE TABLE city ( city_code, city_name, state_code, country_name, time_zone_code ) CREATE TABLE time_zone ( time_zone_code, time_zone_name, hours_from_gmt ) CREATE TABLE days ( days_code, day_name ) CREATE TABLE time_interval ( period, begin_time, end_time ) CREATE TABLE month ( month_number, month_name ) CREATE TABLE date_day ( month_number, day_number, year, day_name ) CREATE TABLE class_of_service ( booking_class, rank, class_description ) CREATE TABLE fare_basis ( fare_basis_code, booking_class, class_type, premium, economy, discounted, night, season, basis_days ) CREATE TABLE fare ( fare_id, from_airport, to_airport, fare_basis_code, fare_airline, restriction_code, one_direction_cost, round_trip_cost, round_trip_required ) CREATE TABLE flight_fare ( flight_id, fare_id ) CREATE TABLE food_service ( meal_code, meal_number, compartment, meal_description ) CREATE TABLE equipment_sequence ( aircraft_code_sequence, aircraft_code ) CREATE TABLE aircraft ( aircraft_code, aircraft_description, manufacturer, basic_type, engines, propulsion, wide_body, wing_span, length, weight, capacity, pay_load, cruising_speed, range_miles, pressurized ) CREATE TABLE airline ( airline_code, airline_name, note ) CREATE TABLE code_description ( code, description ) CREATE TABLE compartment_class ( compartment, class_type ) CREATE TABLE flight ( aircraft_code_sequence, airline_code, airline_flight, arrival_time, connections, departure_time, dual_carrier, flight_days, flight_id, flight_number, from_airport, meal_code, stops, time_elapsed, to_airport ) CREATE TABLE state ( state_code, state_name, country_name ) CREATE TABLE dual_carrier ( main_airline, low_flight_number, high_flight_number, dual_airline, service_name ) CREATE TABLE flight_leg ( flight_id, leg_number, leg_flight ) CREATE TABLE restriction ( restriction_code, advance_purchase, stopovers, saturday_stay_required, minimum_stay, maximum_stay, application, no_discounts ) -- Using valid SQLite, answer the following questions for the tables provided above. -- show me the flights from BOSTON to ATLANTA SELECT### 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 = 'ATLANTA' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code AND flight.to_airport = AIRPORT_SERVICE_1.airport_code.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE course_tags_count ( course_id, clear_grading, pop_quiz, group_projects, inspirational, long_lectures, extra_credit, few_tests, good_feedback, tough_tests, heavy_papers, cares_for_students, heavy_assignments, respected, participation, heavy_reading, tough_grader, hilarious, would_take_again, good_lecture, no_skip ) CREATE TABLE gsi ( course_offering_id, student_id ) CREATE TABLE offering_instructor ( offering_instructor_id, offering_id, instructor_id ) CREATE TABLE course_offering ( offering_id, course_id, semester, section_number, start_time, end_time, monday, tuesday, wednesday, thursday, friday, saturday, sunday, has_final_project, has_final_exam, textbook, class_address, allow_audit ) CREATE TABLE program_course ( program_id, course_id, workload, category ) CREATE TABLE course ( course_id, name, department, number, credits, advisory_requirement, enforced_requirement, description, num_semesters, num_enrolled, has_discussion, has_lab, has_projects, has_exams, num_reviews, clarity_score, easiness_score, helpfulness_score ) CREATE TABLE ta ( campus_job_id, student_id, location ) CREATE TABLE area ( course_id, area ) CREATE TABLE student_record ( student_id, course_id, semester, grade, how, transfer_source, earn_credit, repeat_term, test_id ) CREATE TABLE jobs ( job_id, job_title, description, requirement, city, state, country, zip ) CREATE TABLE instructor ( instructor_id, name, uniqname ) CREATE TABLE program_requirement ( program_id, category, min_credit, additional_req ) CREATE TABLE semester ( semester_id, semester, year ) CREATE TABLE program ( program_id, name, college, introduction ) CREATE TABLE course_prerequisite ( pre_course_id, course_id ) CREATE TABLE student ( student_id, lastname, firstname, program_id, declare_major, total_credit, total_gpa, entered_as, admit_term, predicted_graduation_semester, degree, minor, internship ) CREATE TABLE comment_instructor ( instructor_id, student_id, score, comment_text ) CREATE TABLE requirement ( requirement_id, requirement, college ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What are the offerings for intelligent systems courses in Spring or Summer 2001 ? SELECT### Response: SELECT DISTINCT course.department, course.name, course.number, semester.semester FROM course INNER JOIN area ON course.course_id = area.course_id INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN semester ON semester.semester_id = course_offering.semester WHERE area.area LIKE '%intelligent systems%' AND semester.semester IN ('SP', 'SU', 'SS') AND semester.year = 2001.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE days ( days_code, day_name ) CREATE TABLE month ( month_number, month_name ) CREATE TABLE airline ( airline_code, airline_name, note ) CREATE TABLE date_day ( month_number, day_number, year, day_name ) CREATE TABLE flight ( aircraft_code_sequence, airline_code, airline_flight, arrival_time, connections, departure_time, dual_carrier, flight_days, flight_id, flight_number, from_airport, meal_code, stops, time_elapsed, to_airport ) CREATE TABLE airport ( airport_code, airport_name, airport_location, state_code, country_name, time_zone_code, minimum_connect_time ) CREATE TABLE aircraft ( aircraft_code, aircraft_description, manufacturer, basic_type, engines, propulsion, wide_body, wing_span, length, weight, capacity, pay_load, cruising_speed, range_miles, pressurized ) CREATE TABLE flight_leg ( flight_id, leg_number, leg_flight ) CREATE TABLE equipment_sequence ( aircraft_code_sequence, aircraft_code ) CREATE TABLE flight_fare ( flight_id, fare_id ) CREATE TABLE time_interval ( period, begin_time, end_time ) CREATE TABLE ground_service ( city_code, airport_code, transport_type, ground_fare ) CREATE TABLE flight_stop ( flight_id, stop_number, stop_days, stop_airport, arrival_time, arrival_airline, arrival_flight_number, departure_time, departure_airline, departure_flight_number, stop_time ) CREATE TABLE class_of_service ( booking_class, rank, class_description ) CREATE TABLE fare_basis ( fare_basis_code, booking_class, class_type, premium, economy, discounted, night, season, basis_days ) CREATE TABLE airport_service ( city_code, airport_code, miles_distant, direction, minutes_distant ) CREATE TABLE food_service ( meal_code, meal_number, compartment, meal_description ) CREATE TABLE compartment_class ( compartment, class_type ) CREATE TABLE fare ( fare_id, from_airport, to_airport, fare_basis_code, fare_airline, restriction_code, one_direction_cost, round_trip_cost, round_trip_required ) CREATE TABLE code_description ( code, description ) CREATE TABLE state ( state_code, state_name, country_name ) CREATE TABLE time_zone ( time_zone_code, time_zone_name, hours_from_gmt ) CREATE TABLE restriction ( restriction_code, advance_purchase, stopovers, saturday_stay_required, minimum_stay, maximum_stay, application, no_discounts ) CREATE TABLE dual_carrier ( main_airline, low_flight_number, high_flight_number, dual_airline, service_name ) CREATE TABLE city ( city_code, city_name, state_code, country_name, time_zone_code ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the meaning of restriction ap80 SELECT### Response: SELECT DISTINCT advance_purchase, application, maximum_stay, minimum_stay, no_discounts, restriction_code, saturday_stay_required, stopovers FROM restriction WHERE restriction_code = 'AP/80'.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE compartment_class ( compartment, class_type ) CREATE TABLE flight_fare ( flight_id, fare_id ) CREATE TABLE flight ( aircraft_code_sequence, airline_code, airline_flight, arrival_time, connections, departure_time, dual_carrier, flight_days, flight_id, flight_number, from_airport, meal_code, stops, time_elapsed, to_airport ) CREATE TABLE time_zone ( time_zone_code, time_zone_name, hours_from_gmt ) CREATE TABLE aircraft ( aircraft_code, aircraft_description, manufacturer, basic_type, engines, propulsion, wide_body, wing_span, length, weight, capacity, pay_load, cruising_speed, range_miles, pressurized ) CREATE TABLE airline ( airline_code, airline_name, note ) CREATE TABLE code_description ( code, description ) CREATE TABLE fare_basis ( fare_basis_code, booking_class, class_type, premium, economy, discounted, night, season, basis_days ) CREATE TABLE days ( days_code, day_name ) CREATE TABLE ground_service ( city_code, airport_code, transport_type, ground_fare ) CREATE TABLE date_day ( month_number, day_number, year, day_name ) CREATE TABLE food_service ( meal_code, meal_number, compartment, meal_description ) CREATE TABLE airport ( airport_code, airport_name, airport_location, state_code, country_name, time_zone_code, minimum_connect_time ) CREATE TABLE time_interval ( period, begin_time, end_time ) CREATE TABLE city ( city_code, city_name, state_code, country_name, time_zone_code ) CREATE TABLE flight_stop ( flight_id, stop_number, stop_days, stop_airport, arrival_time, arrival_airline, arrival_flight_number, departure_time, departure_airline, departure_flight_number, stop_time ) CREATE TABLE state ( state_code, state_name, country_name ) CREATE TABLE month ( month_number, month_name ) CREATE TABLE fare ( fare_id, from_airport, to_airport, fare_basis_code, fare_airline, restriction_code, one_direction_cost, round_trip_cost, round_trip_required ) CREATE TABLE class_of_service ( booking_class, rank, class_description ) CREATE TABLE dual_carrier ( main_airline, low_flight_number, high_flight_number, dual_airline, service_name ) CREATE TABLE flight_leg ( flight_id, leg_number, leg_flight ) CREATE TABLE airport_service ( city_code, airport_code, miles_distant, direction, minutes_distant ) CREATE TABLE equipment_sequence ( aircraft_code_sequence, aircraft_code ) CREATE TABLE restriction ( restriction_code, advance_purchase, stopovers, saturday_stay_required, minimum_stay, maximum_stay, application, no_discounts ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what 's the cheapest flight from DENVER to PITTSBURGH for both one way and round trip flights SELECT### 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, fare, flight, flight_fare WHERE (CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'DENVER' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'PITTSBURGH' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code AND flight.to_airport = AIRPORT_SERVICE_1.airport_code) AND fare.one_direction_cost = (SELECT MIN(FAREalias1.one_direction_cost) FROM airport_service AS AIRPORT_SERVICEalias2, airport_service AS AIRPORT_SERVICEalias3, city AS CITYalias2, city AS CITYalias3, fare AS FAREalias1, flight AS FLIGHTalias1, flight_fare AS FLIGHT_FAREalias1 WHERE CITYalias2.city_code = AIRPORT_SERVICEalias2.city_code AND CITYalias2.city_name = 'DENVER' AND CITYalias3.city_code = AIRPORT_SERVICEalias3.city_code AND CITYalias3.city_name = 'PITTSBURGH' AND FLIGHT_FAREalias1.fare_id = FAREalias1.fare_id AND FLIGHTalias1.flight_id = FLIGHT_FAREalias1.flight_id AND FLIGHTalias1.from_airport = AIRPORT_SERVICEalias2.airport_code AND FLIGHTalias1.to_airport = AIRPORT_SERVICEalias3.airport_code) AND flight_fare.fare_id = fare.fare_id AND flight.flight_id = flight_fare.flight_id.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE state ( state_name, capital, population, area, country_name, density ) CREATE TABLE highlow ( state_name, highest_point, highest_elevation, lowest_point, lowest_elevation ) CREATE TABLE border_info ( state_name, border ) CREATE TABLE river ( river_name, length, traverse, country_name ) CREATE TABLE mountain ( mountain_name, mountain_altitude, state_name, country_name ) CREATE TABLE road ( road_name, state_name ) CREATE TABLE lake ( lake_name, area, state_name, country_name ) CREATE TABLE city ( city_name, state_name, population, country_name ) -- Using valid SQLite, answer the following questions for the tables provided above. -- which states border the longest river in the usa SELECT### Response: SELECT border FROM border_info WHERE state_name IN (SELECT RIVERalias0.traverse FROM river AS RIVERalias0 WHERE RIVERalias0.length = (SELECT MAX(RIVERalias1.length) FROM river AS RIVERalias1)).
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE time_interval ( period, begin_time, end_time ) CREATE TABLE flight ( aircraft_code_sequence, airline_code, airline_flight, arrival_time, connections, departure_time, dual_carrier, flight_days, flight_id, flight_number, from_airport, meal_code, stops, time_elapsed, to_airport ) CREATE TABLE class_of_service ( booking_class, rank, class_description ) CREATE TABLE fare_basis ( fare_basis_code, booking_class, class_type, premium, economy, discounted, night, season, basis_days ) CREATE TABLE ground_service ( city_code, airport_code, transport_type, ground_fare ) CREATE TABLE airport ( airport_code, airport_name, airport_location, state_code, country_name, time_zone_code, minimum_connect_time ) CREATE TABLE state ( state_code, state_name, country_name ) CREATE TABLE time_zone ( time_zone_code, time_zone_name, hours_from_gmt ) CREATE TABLE days ( days_code, day_name ) CREATE TABLE airline ( airline_code, airline_name, note ) CREATE TABLE aircraft ( aircraft_code, aircraft_description, manufacturer, basic_type, engines, propulsion, wide_body, wing_span, length, weight, capacity, pay_load, cruising_speed, range_miles, pressurized ) CREATE TABLE flight_fare ( flight_id, fare_id ) CREATE TABLE flight_leg ( flight_id, leg_number, leg_flight ) CREATE TABLE flight_stop ( flight_id, stop_number, stop_days, stop_airport, arrival_time, arrival_airline, arrival_flight_number, departure_time, departure_airline, departure_flight_number, stop_time ) CREATE TABLE fare ( fare_id, from_airport, to_airport, fare_basis_code, fare_airline, restriction_code, one_direction_cost, round_trip_cost, round_trip_required ) CREATE TABLE airport_service ( city_code, airport_code, miles_distant, direction, minutes_distant ) CREATE TABLE code_description ( code, description ) CREATE TABLE date_day ( month_number, day_number, year, day_name ) CREATE TABLE compartment_class ( compartment, class_type ) CREATE TABLE food_service ( meal_code, meal_number, compartment, meal_description ) CREATE TABLE restriction ( restriction_code, advance_purchase, stopovers, saturday_stay_required, minimum_stay, maximum_stay, application, no_discounts ) CREATE TABLE city ( city_code, city_name, state_code, country_name, time_zone_code ) CREATE TABLE equipment_sequence ( aircraft_code_sequence, aircraft_code ) CREATE TABLE dual_carrier ( main_airline, low_flight_number, high_flight_number, dual_airline, service_name ) CREATE TABLE month ( month_number, month_name ) -- Using valid SQLite, answer the following questions for the tables provided above. -- i'd like to book a flight from CINCINNATI to NEW YORK on UA for next saturday SELECT### 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, date_day, days, flight WHERE ((CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'NEW YORK' AND CITY_1.state_code = 'state_code0' AND date_day.day_number = 26 AND date_day.month_number = 7 AND date_day.year = 1991 AND days.day_name = date_day.day_name AND flight.flight_days = days.days_code AND flight.to_airport = AIRPORT_SERVICE_1.airport_code) AND CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'CINCINNATI' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code) AND flight.airline_code = 'UA'.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE time_interval ( period, begin_time, end_time ) CREATE TABLE date_day ( month_number, day_number, year, day_name ) CREATE TABLE flight_fare ( flight_id, fare_id ) CREATE TABLE aircraft ( aircraft_code, aircraft_description, manufacturer, basic_type, engines, propulsion, wide_body, wing_span, length, weight, capacity, pay_load, cruising_speed, range_miles, pressurized ) CREATE TABLE airline ( airline_code, airline_name, note ) CREATE TABLE ground_service ( city_code, airport_code, transport_type, ground_fare ) CREATE TABLE airport_service ( city_code, airport_code, miles_distant, direction, minutes_distant ) CREATE TABLE days ( days_code, day_name ) CREATE TABLE state ( state_code, state_name, country_name ) CREATE TABLE flight_leg ( flight_id, leg_number, leg_flight ) CREATE TABLE city ( city_code, city_name, state_code, country_name, time_zone_code ) CREATE TABLE code_description ( code, description ) CREATE TABLE flight ( aircraft_code_sequence, airline_code, airline_flight, arrival_time, connections, departure_time, dual_carrier, flight_days, flight_id, flight_number, from_airport, meal_code, stops, time_elapsed, to_airport ) CREATE TABLE month ( month_number, month_name ) CREATE TABLE restriction ( restriction_code, advance_purchase, stopovers, saturday_stay_required, minimum_stay, maximum_stay, application, no_discounts ) CREATE TABLE class_of_service ( booking_class, rank, class_description ) CREATE TABLE time_zone ( time_zone_code, time_zone_name, hours_from_gmt ) CREATE TABLE food_service ( meal_code, meal_number, compartment, meal_description ) CREATE TABLE fare ( fare_id, from_airport, to_airport, fare_basis_code, fare_airline, restriction_code, one_direction_cost, round_trip_cost, round_trip_required ) CREATE TABLE airport ( airport_code, airport_name, airport_location, state_code, country_name, time_zone_code, minimum_connect_time ) CREATE TABLE dual_carrier ( main_airline, low_flight_number, high_flight_number, dual_airline, service_name ) CREATE TABLE compartment_class ( compartment, class_type ) CREATE TABLE fare_basis ( fare_basis_code, booking_class, class_type, premium, economy, discounted, night, season, basis_days ) CREATE TABLE flight_stop ( flight_id, stop_number, stop_days, stop_airport, arrival_time, arrival_airline, arrival_flight_number, departure_time, departure_airline, departure_flight_number, stop_time ) CREATE TABLE equipment_sequence ( aircraft_code_sequence, aircraft_code ) -- Using valid SQLite, answer the following questions for the tables provided above. -- could you tell me what flights you have that run DAILY from BOSTON to SAN FRANCISCO please SELECT### 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 = 'SAN FRANCISCO' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code AND flight.to_airport = AIRPORT_SERVICE_1.airport_code) AND flight.flight_days = 'DAILY'.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE state ( state_code, state_name, country_name ) CREATE TABLE restriction ( restriction_code, advance_purchase, stopovers, saturday_stay_required, minimum_stay, maximum_stay, application, no_discounts ) CREATE TABLE equipment_sequence ( aircraft_code_sequence, aircraft_code ) CREATE TABLE compartment_class ( compartment, class_type ) CREATE TABLE airport ( airport_code, airport_name, airport_location, state_code, country_name, time_zone_code, minimum_connect_time ) CREATE TABLE time_zone ( time_zone_code, time_zone_name, hours_from_gmt ) CREATE TABLE food_service ( meal_code, meal_number, compartment, meal_description ) CREATE TABLE airport_service ( city_code, airport_code, miles_distant, direction, minutes_distant ) CREATE TABLE time_interval ( period, begin_time, end_time ) CREATE TABLE flight_leg ( flight_id, leg_number, leg_flight ) CREATE TABLE days ( days_code, day_name ) CREATE TABLE flight_fare ( flight_id, fare_id ) CREATE TABLE fare ( fare_id, from_airport, to_airport, fare_basis_code, fare_airline, restriction_code, one_direction_cost, round_trip_cost, round_trip_required ) CREATE TABLE flight ( aircraft_code_sequence, airline_code, airline_flight, arrival_time, connections, departure_time, dual_carrier, flight_days, flight_id, flight_number, from_airport, meal_code, stops, time_elapsed, to_airport ) CREATE TABLE fare_basis ( fare_basis_code, booking_class, class_type, premium, economy, discounted, night, season, basis_days ) CREATE TABLE flight_stop ( flight_id, stop_number, stop_days, stop_airport, arrival_time, arrival_airline, arrival_flight_number, departure_time, departure_airline, departure_flight_number, stop_time ) CREATE TABLE date_day ( month_number, day_number, year, day_name ) CREATE TABLE airline ( airline_code, airline_name, note ) CREATE TABLE aircraft ( aircraft_code, aircraft_description, manufacturer, basic_type, engines, propulsion, wide_body, wing_span, length, weight, capacity, pay_load, cruising_speed, range_miles, pressurized ) CREATE TABLE city ( city_code, city_name, state_code, country_name, time_zone_code ) CREATE TABLE code_description ( code, description ) CREATE TABLE ground_service ( city_code, airport_code, transport_type, ground_fare ) CREATE TABLE month ( month_number, month_name ) CREATE TABLE class_of_service ( booking_class, rank, class_description ) CREATE TABLE dual_carrier ( main_airline, low_flight_number, high_flight_number, dual_airline, service_name ) -- Using valid SQLite, answer the following questions for the tables provided above. -- i need flight and fare information for thursday departing prior to 900 from OAKLAND going to SALT LAKE CITY SELECT### Response: SELECT DISTINCT flight.flight_id FROM fare, flight, flight_fare WHERE (((flight.departure_time < 900 AND flight.flight_days IN (SELECT DAYSalias0.days_code FROM days AS DAYSalias0 WHERE DAYSalias0.day_name IN (SELECT DATE_DAYalias0.day_name FROM date_day AS DATE_DAYalias0 WHERE DATE_DAYalias0.day_number = 24 AND DATE_DAYalias0.month_number = 5 AND DATE_DAYalias0.year = 1991))) AND flight.to_airport IN (SELECT AIRPORT_SERVICEalias1.airport_code FROM airport_service AS AIRPORT_SERVICEalias1 WHERE AIRPORT_SERVICEalias1.city_code IN (SELECT CITYalias1.city_code FROM city AS CITYalias1 WHERE CITYalias1.city_name = 'SALT LAKE CITY'))) AND flight.from_airport IN (SELECT AIRPORT_SERVICEalias0.airport_code FROM airport_service AS AIRPORT_SERVICEalias0 WHERE AIRPORT_SERVICEalias0.city_code IN (SELECT CITYalias0.city_code FROM city AS CITYalias0 WHERE CITYalias0.city_name = 'OAKLAND'))) AND fare.fare_basis_code IN (SELECT FARE_BASISalias0.fare_basis_code FROM fare_basis AS FARE_BASISalias0 WHERE FARE_BASISalias0.basis_days IN (SELECT DAYSalias1.days_code FROM days AS DAYSalias1 WHERE DAYSalias1.day_name IN (SELECT DATE_DAYalias1.day_name FROM date_day AS DATE_DAYalias1 WHERE DATE_DAYalias1.day_number = 24 AND DATE_DAYalias1.month_number = 5 AND DATE_DAYalias1.year = 1991))) AND flight_fare.fare_id = fare.fare_id AND flight.flight_id = flight_fare.flight_id.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE compartment_class ( compartment, class_type ) CREATE TABLE airport_service ( city_code, airport_code, miles_distant, direction, minutes_distant ) CREATE TABLE date_day ( month_number, day_number, year, day_name ) CREATE TABLE days ( days_code, day_name ) CREATE TABLE flight_fare ( flight_id, fare_id ) CREATE TABLE time_interval ( period, begin_time, end_time ) CREATE TABLE class_of_service ( booking_class, rank, class_description ) CREATE TABLE aircraft ( aircraft_code, aircraft_description, manufacturer, basic_type, engines, propulsion, wide_body, wing_span, length, weight, capacity, pay_load, cruising_speed, range_miles, pressurized ) CREATE TABLE fare ( fare_id, from_airport, to_airport, fare_basis_code, fare_airline, restriction_code, one_direction_cost, round_trip_cost, round_trip_required ) CREATE TABLE fare_basis ( fare_basis_code, booking_class, class_type, premium, economy, discounted, night, season, basis_days ) CREATE TABLE airline ( airline_code, airline_name, note ) CREATE TABLE airport ( airport_code, airport_name, airport_location, state_code, country_name, time_zone_code, minimum_connect_time ) CREATE TABLE restriction ( restriction_code, advance_purchase, stopovers, saturday_stay_required, minimum_stay, maximum_stay, application, no_discounts ) CREATE TABLE flight_leg ( flight_id, leg_number, leg_flight ) CREATE TABLE flight_stop ( flight_id, stop_number, stop_days, stop_airport, arrival_time, arrival_airline, arrival_flight_number, departure_time, departure_airline, departure_flight_number, stop_time ) CREATE TABLE ground_service ( city_code, airport_code, transport_type, ground_fare ) CREATE TABLE flight ( aircraft_code_sequence, airline_code, airline_flight, arrival_time, connections, departure_time, dual_carrier, flight_days, flight_id, flight_number, from_airport, meal_code, stops, time_elapsed, to_airport ) CREATE TABLE state ( state_code, state_name, country_name ) CREATE TABLE city ( city_code, city_name, state_code, country_name, time_zone_code ) CREATE TABLE food_service ( meal_code, meal_number, compartment, meal_description ) CREATE TABLE code_description ( code, description ) CREATE TABLE month ( month_number, month_name ) CREATE TABLE time_zone ( time_zone_code, time_zone_name, hours_from_gmt ) CREATE TABLE dual_carrier ( main_airline, low_flight_number, high_flight_number, dual_airline, service_name ) CREATE TABLE equipment_sequence ( aircraft_code_sequence, aircraft_code ) -- Using valid SQLite, answer the following questions for the tables provided above. -- list the flights on sunday afternoon from OAKLAND to DALLAS SELECT### 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, date_day, days, flight WHERE (((flight.departure_time BETWEEN 1200 AND 1800) AND date_day.day_number = 27 AND date_day.month_number = 8 AND date_day.year = 1991 AND days.day_name = date_day.day_name AND flight.flight_days = days.days_code) AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'DALLAS' AND flight.to_airport = AIRPORT_SERVICE_1.airport_code) AND CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'OAKLAND' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE code_description ( code, description ) CREATE TABLE date_day ( month_number, day_number, year, day_name ) CREATE TABLE compartment_class ( compartment, class_type ) CREATE TABLE fare ( fare_id, from_airport, to_airport, fare_basis_code, fare_airline, restriction_code, one_direction_cost, round_trip_cost, round_trip_required ) CREATE TABLE flight_leg ( flight_id, leg_number, leg_flight ) CREATE TABLE food_service ( meal_code, meal_number, compartment, meal_description ) CREATE TABLE fare_basis ( fare_basis_code, booking_class, class_type, premium, economy, discounted, night, season, basis_days ) CREATE TABLE time_zone ( time_zone_code, time_zone_name, hours_from_gmt ) CREATE TABLE flight ( aircraft_code_sequence, airline_code, airline_flight, arrival_time, connections, departure_time, dual_carrier, flight_days, flight_id, flight_number, from_airport, meal_code, stops, time_elapsed, to_airport ) CREATE TABLE flight_stop ( flight_id, stop_number, stop_days, stop_airport, arrival_time, arrival_airline, arrival_flight_number, departure_time, departure_airline, departure_flight_number, stop_time ) CREATE TABLE city ( city_code, city_name, state_code, country_name, time_zone_code ) CREATE TABLE flight_fare ( flight_id, fare_id ) CREATE TABLE dual_carrier ( main_airline, low_flight_number, high_flight_number, dual_airline, service_name ) CREATE TABLE equipment_sequence ( aircraft_code_sequence, aircraft_code ) CREATE TABLE airport_service ( city_code, airport_code, miles_distant, direction, minutes_distant ) CREATE TABLE time_interval ( period, begin_time, end_time ) CREATE TABLE ground_service ( city_code, airport_code, transport_type, ground_fare ) CREATE TABLE state ( state_code, state_name, country_name ) CREATE TABLE month ( month_number, month_name ) CREATE TABLE restriction ( restriction_code, advance_purchase, stopovers, saturday_stay_required, minimum_stay, maximum_stay, application, no_discounts ) CREATE TABLE airline ( airline_code, airline_name, note ) CREATE TABLE aircraft ( aircraft_code, aircraft_description, manufacturer, basic_type, engines, propulsion, wide_body, wing_span, length, weight, capacity, pay_load, cruising_speed, range_miles, pressurized ) CREATE TABLE airport ( airport_code, airport_name, airport_location, state_code, country_name, time_zone_code, minimum_connect_time ) CREATE TABLE days ( days_code, day_name ) CREATE TABLE class_of_service ( booking_class, rank, class_description ) -- Using valid SQLite, answer the following questions for the tables provided above. -- show me all flights from ATLANTA to DALLAS round trip less than 1100 dollars SELECT### 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, fare, flight, flight_fare WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'DALLAS' AND fare.round_trip_cost < 1100 AND flight_fare.fare_id = fare.fare_id AND flight.flight_id = flight_fare.flight_id AND flight.to_airport = AIRPORT_SERVICE_1.airport_code) AND CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'ATLANTA' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE highlow ( state_name, highest_point, highest_elevation, lowest_point, lowest_elevation ) CREATE TABLE mountain ( mountain_name, mountain_altitude, state_name, country_name ) CREATE TABLE lake ( lake_name, area, state_name, country_name ) CREATE TABLE border_info ( state_name, border ) CREATE TABLE city ( city_name, state_name, population, country_name ) CREATE TABLE state ( state_name, capital, population, area, country_name, density ) CREATE TABLE road ( road_name, state_name ) CREATE TABLE river ( river_name, length, traverse, country_name ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the largest city in california SELECT### Response: SELECT city_name FROM city WHERE population = (SELECT MAX(CITYalias1.population) FROM city AS CITYalias1 WHERE CITYalias1.state_name = 'california') AND state_name = 'california'.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE area ( course_id, area ) CREATE TABLE program_course ( program_id, course_id, workload, category ) CREATE TABLE offering_instructor ( offering_instructor_id, offering_id, instructor_id ) CREATE TABLE semester ( semester_id, semester, year ) CREATE TABLE course ( course_id, name, department, number, credits, advisory_requirement, enforced_requirement, description, num_semesters, num_enrolled, has_discussion, has_lab, has_projects, has_exams, num_reviews, clarity_score, easiness_score, helpfulness_score ) CREATE TABLE ta ( campus_job_id, student_id, location ) CREATE TABLE student_record ( student_id, course_id, semester, grade, how, transfer_source, earn_credit, repeat_term, test_id ) CREATE TABLE program_requirement ( program_id, category, min_credit, additional_req ) CREATE TABLE course_offering ( offering_id, course_id, semester, section_number, start_time, end_time, monday, tuesday, wednesday, thursday, friday, saturday, sunday, has_final_project, has_final_exam, textbook, class_address, allow_audit ) CREATE TABLE comment_instructor ( instructor_id, student_id, score, comment_text ) CREATE TABLE jobs ( job_id, job_title, description, requirement, city, state, country, zip ) CREATE TABLE requirement ( requirement_id, requirement, college ) CREATE TABLE course_prerequisite ( pre_course_id, course_id ) CREATE TABLE instructor ( instructor_id, name, uniqname ) CREATE TABLE program ( program_id, name, college, introduction ) CREATE TABLE gsi ( course_offering_id, student_id ) CREATE TABLE student ( student_id, lastname, firstname, program_id, declare_major, total_credit, total_gpa, entered_as, admit_term, predicted_graduation_semester, degree, minor, internship ) CREATE TABLE course_tags_count ( course_id, clear_grading, pop_quiz, group_projects, inspirational, long_lectures, extra_credit, few_tests, good_feedback, tough_tests, heavy_papers, cares_for_students, heavy_assignments, respected, participation, heavy_reading, tough_grader, hilarious, would_take_again, good_lecture, no_skip ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Between 522 and 527 , which course is more difficult ? SELECT### Response: SELECT DISTINCT course.number FROM course, program_course WHERE (course.number = 522 OR course.number = 527) AND course.department = 'EECS' AND program_course.course_id = course.course_id ORDER BY program_course.workload DESC LIMIT 1.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE fare_basis ( fare_basis_code, booking_class, class_type, premium, economy, discounted, night, season, basis_days ) CREATE TABLE ground_service ( city_code, airport_code, transport_type, ground_fare ) CREATE TABLE flight ( aircraft_code_sequence, airline_code, airline_flight, arrival_time, connections, departure_time, dual_carrier, flight_days, flight_id, flight_number, from_airport, meal_code, stops, time_elapsed, to_airport ) CREATE TABLE flight_stop ( flight_id, stop_number, stop_days, stop_airport, arrival_time, arrival_airline, arrival_flight_number, departure_time, departure_airline, departure_flight_number, stop_time ) CREATE TABLE airline ( airline_code, airline_name, note ) CREATE TABLE airport_service ( city_code, airport_code, miles_distant, direction, minutes_distant ) CREATE TABLE month ( month_number, month_name ) CREATE TABLE state ( state_code, state_name, country_name ) CREATE TABLE city ( city_code, city_name, state_code, country_name, time_zone_code ) CREATE TABLE time_zone ( time_zone_code, time_zone_name, hours_from_gmt ) CREATE TABLE dual_carrier ( main_airline, low_flight_number, high_flight_number, dual_airline, service_name ) CREATE TABLE flight_fare ( flight_id, fare_id ) CREATE TABLE airport ( airport_code, airport_name, airport_location, state_code, country_name, time_zone_code, minimum_connect_time ) CREATE TABLE time_interval ( period, begin_time, end_time ) CREATE TABLE days ( days_code, day_name ) CREATE TABLE aircraft ( aircraft_code, aircraft_description, manufacturer, basic_type, engines, propulsion, wide_body, wing_span, length, weight, capacity, pay_load, cruising_speed, range_miles, pressurized ) CREATE TABLE fare ( fare_id, from_airport, to_airport, fare_basis_code, fare_airline, restriction_code, one_direction_cost, round_trip_cost, round_trip_required ) CREATE TABLE restriction ( restriction_code, advance_purchase, stopovers, saturday_stay_required, minimum_stay, maximum_stay, application, no_discounts ) CREATE TABLE date_day ( month_number, day_number, year, day_name ) CREATE TABLE food_service ( meal_code, meal_number, compartment, meal_description ) CREATE TABLE compartment_class ( compartment, class_type ) CREATE TABLE class_of_service ( booking_class, rank, class_description ) CREATE TABLE code_description ( code, description ) CREATE TABLE equipment_sequence ( aircraft_code_sequence, aircraft_code ) CREATE TABLE flight_leg ( flight_id, leg_number, leg_flight ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what are the flights from BOSTON to WASHINGTON SELECT### 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 = 'WASHINGTON' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code AND flight.to_airport = AIRPORT_SERVICE_1.airport_code.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE requirement ( requirement_id, requirement, college ) CREATE TABLE program ( program_id, name, college, introduction ) CREATE TABLE semester ( semester_id, semester, year ) CREATE TABLE jobs ( job_id, job_title, description, requirement, city, state, country, zip ) CREATE TABLE course_offering ( offering_id, course_id, semester, section_number, start_time, end_time, monday, tuesday, wednesday, thursday, friday, saturday, sunday, has_final_project, has_final_exam, textbook, class_address, allow_audit ) CREATE TABLE ta ( campus_job_id, student_id, location ) CREATE TABLE course_prerequisite ( pre_course_id, course_id ) CREATE TABLE instructor ( instructor_id, name, uniqname ) CREATE TABLE program_requirement ( program_id, category, min_credit, additional_req ) CREATE TABLE offering_instructor ( offering_instructor_id, offering_id, instructor_id ) CREATE TABLE course ( course_id, name, department, number, credits, advisory_requirement, enforced_requirement, description, num_semesters, num_enrolled, has_discussion, has_lab, has_projects, has_exams, num_reviews, clarity_score, easiness_score, helpfulness_score ) CREATE TABLE area ( course_id, area ) CREATE TABLE comment_instructor ( instructor_id, student_id, score, comment_text ) CREATE TABLE student_record ( student_id, course_id, semester, grade, how, transfer_source, earn_credit, repeat_term, test_id ) CREATE TABLE program_course ( program_id, course_id, workload, category ) CREATE TABLE gsi ( course_offering_id, student_id ) CREATE TABLE course_tags_count ( course_id, clear_grading, pop_quiz, group_projects, inspirational, long_lectures, extra_credit, few_tests, good_feedback, tough_tests, heavy_papers, cares_for_students, heavy_assignments, respected, participation, heavy_reading, tough_grader, hilarious, would_take_again, good_lecture, no_skip ) CREATE TABLE student ( student_id, lastname, firstname, program_id, declare_major, total_credit, total_gpa, entered_as, admit_term, predicted_graduation_semester, degree, minor, internship ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which is the easiest class that fulfills the PreMajor requirement ? SELECT### Response: SELECT DISTINCT course.department, course.name, course.number, program_course.workload, program_course.workload FROM course, program_course WHERE program_course.category LIKE '%PreMajor%' AND program_course.course_id = course.course_id AND program_course.workload = (SELECT MIN(PROGRAM_COURSEalias1.workload) FROM program_course AS PROGRAM_COURSEalias1 WHERE PROGRAM_COURSEalias1.category LIKE '%PreMajor%').
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE days ( days_code, day_name ) CREATE TABLE flight_fare ( flight_id, fare_id ) CREATE TABLE ground_service ( city_code, airport_code, transport_type, ground_fare ) CREATE TABLE food_service ( meal_code, meal_number, compartment, meal_description ) CREATE TABLE compartment_class ( compartment, class_type ) CREATE TABLE equipment_sequence ( aircraft_code_sequence, aircraft_code ) CREATE TABLE aircraft ( aircraft_code, aircraft_description, manufacturer, basic_type, engines, propulsion, wide_body, wing_span, length, weight, capacity, pay_load, cruising_speed, range_miles, pressurized ) CREATE TABLE month ( month_number, month_name ) CREATE TABLE fare_basis ( fare_basis_code, booking_class, class_type, premium, economy, discounted, night, season, basis_days ) CREATE TABLE time_interval ( period, begin_time, end_time ) CREATE TABLE dual_carrier ( main_airline, low_flight_number, high_flight_number, dual_airline, service_name ) CREATE TABLE airport_service ( city_code, airport_code, miles_distant, direction, minutes_distant ) CREATE TABLE date_day ( month_number, day_number, year, day_name ) CREATE TABLE airport ( airport_code, airport_name, airport_location, state_code, country_name, time_zone_code, minimum_connect_time ) CREATE TABLE flight ( aircraft_code_sequence, airline_code, airline_flight, arrival_time, connections, departure_time, dual_carrier, flight_days, flight_id, flight_number, from_airport, meal_code, stops, time_elapsed, to_airport ) CREATE TABLE airline ( airline_code, airline_name, note ) CREATE TABLE fare ( fare_id, from_airport, to_airport, fare_basis_code, fare_airline, restriction_code, one_direction_cost, round_trip_cost, round_trip_required ) CREATE TABLE code_description ( code, description ) CREATE TABLE flight_leg ( flight_id, leg_number, leg_flight ) CREATE TABLE class_of_service ( booking_class, rank, class_description ) CREATE TABLE time_zone ( time_zone_code, time_zone_name, hours_from_gmt ) CREATE TABLE city ( city_code, city_name, state_code, country_name, time_zone_code ) CREATE TABLE flight_stop ( flight_id, stop_number, stop_days, stop_airport, arrival_time, arrival_airline, arrival_flight_number, departure_time, departure_airline, departure_flight_number, stop_time ) CREATE TABLE restriction ( restriction_code, advance_purchase, stopovers, saturday_stay_required, minimum_stay, maximum_stay, application, no_discounts ) CREATE TABLE state ( state_code, state_name, country_name ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what are the nonstop flights on HP or WN air from KANSAS CITY to BURBANK on saturday 5 22 SELECT### 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, date_day, days, flight WHERE (((((flight.airline_code = 'HP') OR (flight.airline_code = 'WN')) AND date_day.day_number = 22 AND date_day.month_number = 5 AND date_day.year = 1991 AND days.day_name = date_day.day_name AND flight.flight_days = days.days_code) AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BURBANK' AND flight.to_airport = AIRPORT_SERVICE_1.airport_code) AND CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'KANSAS CITY' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code) AND flight.stops = 0.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE code_description ( code, description ) CREATE TABLE fare ( fare_id, from_airport, to_airport, fare_basis_code, fare_airline, restriction_code, one_direction_cost, round_trip_cost, round_trip_required ) CREATE TABLE airline ( airline_code, airline_name, note ) CREATE TABLE aircraft ( aircraft_code, aircraft_description, manufacturer, basic_type, engines, propulsion, wide_body, wing_span, length, weight, capacity, pay_load, cruising_speed, range_miles, pressurized ) CREATE TABLE food_service ( meal_code, meal_number, compartment, meal_description ) CREATE TABLE days ( days_code, day_name ) CREATE TABLE ground_service ( city_code, airport_code, transport_type, ground_fare ) CREATE TABLE compartment_class ( compartment, class_type ) CREATE TABLE dual_carrier ( main_airline, low_flight_number, high_flight_number, dual_airline, service_name ) CREATE TABLE airport_service ( city_code, airport_code, miles_distant, direction, minutes_distant ) CREATE TABLE city ( city_code, city_name, state_code, country_name, time_zone_code ) CREATE TABLE flight_stop ( flight_id, stop_number, stop_days, stop_airport, arrival_time, arrival_airline, arrival_flight_number, departure_time, departure_airline, departure_flight_number, stop_time ) CREATE TABLE fare_basis ( fare_basis_code, booking_class, class_type, premium, economy, discounted, night, season, basis_days ) CREATE TABLE date_day ( month_number, day_number, year, day_name ) CREATE TABLE flight_fare ( flight_id, fare_id ) CREATE TABLE equipment_sequence ( aircraft_code_sequence, aircraft_code ) CREATE TABLE flight ( aircraft_code_sequence, airline_code, airline_flight, arrival_time, connections, departure_time, dual_carrier, flight_days, flight_id, flight_number, from_airport, meal_code, stops, time_elapsed, to_airport ) CREATE TABLE class_of_service ( booking_class, rank, class_description ) CREATE TABLE airport ( airport_code, airport_name, airport_location, state_code, country_name, time_zone_code, minimum_connect_time ) CREATE TABLE flight_leg ( flight_id, leg_number, leg_flight ) CREATE TABLE state ( state_code, state_name, country_name ) CREATE TABLE restriction ( restriction_code, advance_purchase, stopovers, saturday_stay_required, minimum_stay, maximum_stay, application, no_discounts ) CREATE TABLE time_zone ( time_zone_code, time_zone_name, hours_from_gmt ) CREATE TABLE month ( month_number, month_name ) CREATE TABLE time_interval ( period, begin_time, end_time ) -- Using valid SQLite, answer the following questions for the tables provided above. -- show me the nonstop flights from ATLANTA to OAKLAND that leave in the afternoon and arrive between 1630 and 1830 SELECT### 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 ((((flight.arrival_time <= 1830 AND flight.arrival_time >= 1630) AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'OAKLAND' AND flight.to_airport = AIRPORT_SERVICE_1.airport_code) AND CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'ATLANTA' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code) AND flight.departure_time BETWEEN 1200 AND 1800) AND flight.stops = 0.