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 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 time_interval ( period, begin_time, end_time ) CREATE TABLE month ( month_number, month_name ) CREATE TABLE code_description ( code, 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 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 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 flight_leg ( flight_id, leg_number, leg_flight ) CREATE TABLE time_zone ( time_zone_code, time_zone_name, hours_from_gmt ) CREATE TABLE state ( state_code, state_name, country_name ) 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 airline ( airline_code, airline_name, note ) 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 flight_fare ( flight_id, fare_id ) 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 airport ( airport_code, airport_name, airport_location, state_code, country_name, time_zone_code, minimum_connect_time ) CREATE TABLE days ( days_code, day_name ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what are the flights which depart from SAN FRANCISCO fly to WASHINGTON via INDIANAPOLIS and arrive by 2100 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_2.city_code = AIRPORT_SERVICE_2.city_code AND CITY_2.city_name = 'INDIANAPOLIS' AND flight_stop.stop_airport = AIRPORT_SERVICE_2.airport_code AND flight.arrival_time <= 2100 AND flight.flight_id = flight_stop.flight_id) 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 = '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 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 month ( month_number, month_name ) 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 flight_fare ( flight_id, fare_id ) CREATE TABLE class_of_service ( booking_class, rank, class_description ) CREATE TABLE food_service ( meal_code, meal_number, compartment, meal_description ) 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 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 city ( city_code, city_name, state_code, country_name, time_zone_code ) 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 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 ) CREATE TABLE date_day ( month_number, day_number, year, day_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 state ( state_code, state_name, country_name ) -- Using valid SQLite, answer the following questions for the tables provided above. -- show me flights between MEMPHIS and LAS VEGAS on sunday 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 = 'LAS VEGAS' 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 = 'MEMPHIS' 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_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 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 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 ( 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 days ( days_code, day_name ) CREATE TABLE state ( state_code, state_name, country_name ) CREATE TABLE code_description ( code, description ) 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 equipment_sequence ( aircraft_code_sequence, aircraft_code ) CREATE TABLE food_service ( meal_code, meal_number, compartment, meal_description ) 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 date_day ( month_number, day_number, year, day_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 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 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 between PITTSBURGH and BALTIMORE on 8 10 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 = 10 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 compartment_class ( compartment, class_type ) CREATE TABLE days ( days_code, day_name ) CREATE TABLE class_of_service ( booking_class, rank, class_description ) 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 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 time_interval ( period, begin_time, end_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 airport_service ( city_code, airport_code, miles_distant, direction, minutes_distant ) 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 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 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 airline ( airline_code, airline_name, note ) 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 ) 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 dual_carrier ( main_airline, low_flight_number, high_flight_number, dual_airline, service_name ) CREATE TABLE state ( state_code, state_name, country_name ) -- Using valid SQLite, answer the following questions for the tables provided above. -- show me the flights from SAN FRANCISCO 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 = 'SAN FRANCISCO' 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 equipment_sequence ( aircraft_code_sequence, aircraft_code ) 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 state ( state_code, state_name, country_name ) CREATE TABLE month ( month_number, month_name ) CREATE TABLE airline ( airline_code, airline_name, note ) 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 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 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 date_day ( month_number, day_number, year, day_name ) CREATE TABLE time_zone ( time_zone_code, time_zone_name, hours_from_gmt ) 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 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 food_service ( meal_code, meal_number, compartment, meal_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 flight_leg ( flight_id, leg_number, leg_flight ) CREATE TABLE compartment_class ( compartment, class_type ) 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 ) -- Using valid SQLite, answer the following questions for the tables provided above. -- show me flights 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, flight 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 = '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 instructor ( instructor_id, name, uniqname ) 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 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 program ( program_id, name, college, introduction ) 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 requirement ( requirement_id, requirement, college ) 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_prerequisite ( pre_course_id, course_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 offering_instructor ( offering_instructor_id, offering_id, instructor_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 ta ( campus_job_id, student_id, location ) CREATE TABLE area ( course_id, area ) CREATE TABLE semester ( semester_id, semester, year ) CREATE TABLE comment_instructor ( instructor_id, student_id, score, comment_text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When will Sarah Mcdowell teach 763 next ? SELECT### Response: SELECT DISTINCT semester.semester, semester.year FROM course, course_offering, instructor, offering_instructor, semester WHERE course.course_id = course_offering.course_id AND course.number = 763 AND course_offering.semester = semester.semester_id AND instructor.name LIKE '%Sarah Mcdowell%' AND offering_instructor.instructor_id = instructor.instructor_id AND offering_instructor.offering_id = course_offering.offering_id AND semester.semester_id > (SELECT SEMESTERalias1.semester_id FROM semester AS SEMESTERalias1 WHERE SEMESTERalias1.semester = 'WN' AND SEMESTERalias1.year = 2016) ORDER BY semester.semester_id LIMIT 1.
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_requirement ( program_id, category, min_credit, additional_req ) CREATE TABLE instructor ( instructor_id, name, uniqname ) 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 ( student_id, lastname, firstname, program_id, declare_major, total_credit, total_gpa, entered_as, admit_term, predicted_graduation_semester, degree, minor, internship ) 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 ta ( campus_job_id, student_id, location ) CREATE TABLE jobs ( job_id, job_title, description, requirement, city, state, country, zip ) 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 gsi ( course_offering_id, student_id ) CREATE TABLE area ( course_id, area ) CREATE TABLE program_course ( program_id, course_id, workload, category ) CREATE TABLE requirement ( requirement_id, requirement, college ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Are there 16 -credit LATINOAM courses ? SELECT### Response: SELECT DISTINCT name, number FROM course WHERE department = 'LATINOAM' AND credits = 16.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE program_requirement ( program_id, category, min_credit, additional_req ) 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 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_prerequisite ( pre_course_id, course_id ) CREATE TABLE program_course ( program_id, course_id, workload, category ) CREATE TABLE comment_instructor ( instructor_id, student_id, score, comment_text ) CREATE TABLE offering_instructor ( offering_instructor_id, offering_id, instructor_id ) CREATE TABLE gsi ( course_offering_id, student_id ) 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 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 jobs ( job_id, job_title, description, requirement, city, state, country, zip ) CREATE TABLE semester ( semester_id, semester, year ) CREATE TABLE area ( course_id, area ) CREATE TABLE instructor ( instructor_id, name, uniqname ) CREATE TABLE program ( program_id, name, college, introduction ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What classes are least demanding , while as yet satisfying the PreMajor necessity ? 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 requirement ( requirement_id, requirement, college ) CREATE TABLE offering_instructor ( offering_instructor_id, offering_id, instructor_id ) CREATE TABLE comment_instructor ( instructor_id, student_id, score, comment_text ) CREATE TABLE gsi ( course_offering_id, student_id ) CREATE TABLE student_record ( student_id, course_id, semester, grade, how, transfer_source, earn_credit, repeat_term, test_id ) 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_requirement ( program_id, category, min_credit, additional_req ) CREATE TABLE course_prerequisite ( pre_course_id, course_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 semester ( semester_id, semester, year ) 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 instructor ( instructor_id, name, uniqname ) 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 program ( program_id, name, college, introduction ) CREATE TABLE program_course ( program_id, course_id, workload, category ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many professors will be teaching ROMLANG 500 in the Spring of 2020 ? SELECT### Response: SELECT COUNT(DISTINCT instructor.instructor_id) FROM course, course_offering, instructor, offering_instructor, semester WHERE course.course_id = course_offering.course_id AND course.department = 'ROMLANG' AND course.number = 500 AND offering_instructor.instructor_id = instructor.instructor_id AND offering_instructor.offering_id = course_offering.offering_id AND semester.semester = 'Spring' AND semester.semester_id = course_offering.semester AND semester.year = 2020.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE border_info ( state_name, border ) CREATE TABLE river ( river_name, length, traverse, country_name ) CREATE TABLE city ( city_name, state_name, population, country_name ) CREATE TABLE road ( road_name, state_name ) CREATE TABLE lake ( lake_name, area, state_name, country_name ) 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 state ( state_name, capital, population, area, country_name, density ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how many major rivers cross ohio SELECT### Response: SELECT COUNT(river_name) FROM river WHERE length > 750 AND traverse = 'ohio'.
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 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 airline ( airline_code, airline_name, note ) CREATE TABLE month ( month_number, month_name ) CREATE TABLE airport_service ( city_code, airport_code, miles_distant, direction, minutes_distant ) CREATE TABLE equipment_sequence ( aircraft_code_sequence, aircraft_code ) CREATE TABLE class_of_service ( booking_class, rank, class_description ) CREATE TABLE compartment_class ( compartment, class_type ) 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 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 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 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 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 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 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 days ( days_code, day_name ) CREATE TABLE state ( state_code, state_name, country_name ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what kind of airplanes are used by DL flying between WASHINGTON and DENVER SELECT### Response: SELECT DISTINCT aircraft.aircraft_code FROM aircraft, airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, equipment_sequence, 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 = 'DENVER' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code AND flight.to_airport = AIRPORT_SERVICE_1.airport_code) AND equipment_sequence.aircraft_code = aircraft.aircraft_code AND flight.aircraft_code_sequence = equipment_sequence.aircraft_code_sequence AND flight.airline_code = 'DL'.
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 requirement ( requirement_id, requirement, college ) 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 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 program_course ( program_id, course_id, workload, category ) 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 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 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 program ( program_id, name, college, introduction ) CREATE TABLE area ( course_id, area ) 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. -- What amount of upper level classes have labs ? SELECT### Response: SELECT COUNT(DISTINCT course.course_id) FROM course INNER JOIN program_course ON program_course.course_id = course.course_id WHERE course.has_lab = 'Y' AND 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 class_of_service ( booking_class, rank, class_description ) CREATE TABLE airline ( airline_code, airline_name, note ) CREATE TABLE date_day ( month_number, day_number, year, day_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 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 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 code_description ( code, description ) 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 restriction ( restriction_code, advance_purchase, stopovers, saturday_stay_required, minimum_stay, maximum_stay, application, no_discounts ) CREATE TABLE month ( month_number, month_name ) CREATE TABLE days ( days_code, day_name ) CREATE TABLE flight_fare ( flight_id, fare_id ) CREATE TABLE state ( state_code, state_name, country_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 compartment_class ( compartment, class_type ) CREATE TABLE time_zone ( time_zone_code, time_zone_name, hours_from_gmt ) CREATE TABLE equipment_sequence ( aircraft_code_sequence, aircraft_code ) 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 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 ) -- Using valid SQLite, answer the following questions for the tables provided above. -- i would like the first flight from TORONTO to MONTREAL next 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 = 'MONTREAL' 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 = 'TORONTO' 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 = 'MONTREAL' AND DATE_DAYalias1.day_number = 25 AND DATE_DAYalias1.month_number = 6 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 = 'TORONTO' 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 requirement ( requirement_id, requirement, college ) CREATE TABLE student_record ( student_id, course_id, semester, grade, how, transfer_source, earn_credit, repeat_term, test_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 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_prerequisite ( pre_course_id, course_id ) CREATE TABLE semester ( semester_id, semester, year ) CREATE TABLE program_course ( program_id, course_id, workload, category ) 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 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 program_requirement ( program_id, category, min_credit, additional_req ) CREATE TABLE area ( course_id, area ) CREATE TABLE program ( program_id, name, college, introduction ) CREATE TABLE gsi ( course_offering_id, student_id ) CREATE TABLE ta ( campus_job_id, student_id, location ) CREATE TABLE comment_instructor ( instructor_id, student_id, score, comment_text ) CREATE TABLE offering_instructor ( offering_instructor_id, offering_id, instructor_id ) 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. -- For a CS major , what classes are available this Winter that would count towards that ? SELECT### Response: SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, program, program_course, semester WHERE program_course.course_id = course.course_id AND program_course.course_id = course.course_id AND program.name LIKE '%CS%' AND program.program_id = program_course.program_id AND semester.semester = 'Winter' AND semester.semester_id = course_offering.semester AND semester.year = 2016.
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 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 jobs ( job_id, job_title, description, requirement, city, state, country, zip ) CREATE TABLE semester ( semester_id, semester, year ) CREATE TABLE ta ( campus_job_id, student_id, location ) CREATE TABLE program_requirement ( program_id, category, min_credit, additional_req ) CREATE TABLE offering_instructor ( offering_instructor_id, offering_id, instructor_id ) CREATE TABLE instructor ( instructor_id, name, uniqname ) CREATE TABLE gsi ( course_offering_id, student_id ) CREATE TABLE program ( program_id, name, college, introduction ) CREATE TABLE comment_instructor ( instructor_id, student_id, score, comment_text ) CREATE TABLE requirement ( requirement_id, requirement, college ) 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 program_course ( program_id, course_id, workload, category ) CREATE TABLE area ( course_id, area ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Can you tell me who the GSIs were for last semester 's SEAS 698 ? SELECT### Response: SELECT DISTINCT student.firstname, student.lastname FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN gsi ON gsi.course_offering_id = course_offering.offering_id INNER JOIN student ON student.student_id = gsi.student_id INNER JOIN semester ON semester.semester_id = course_offering.semester WHERE course.department = 'SEAS' AND course.number = 698 AND semester.semester = 'FA' AND semester.year = 2015.
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 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 requirement ( requirement_id, requirement, college ) CREATE TABLE semester ( semester_id, semester, year ) CREATE TABLE gsi ( course_offering_id, student_id ) 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 program_requirement ( program_id, category, min_credit, additional_req ) CREATE TABLE ta ( campus_job_id, student_id, location ) CREATE TABLE program_course ( program_id, course_id, workload, category ) 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 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 comment_instructor ( instructor_id, student_id, score, comment_text ) CREATE TABLE instructor ( instructor_id, name, uniqname ) CREATE TABLE course_prerequisite ( pre_course_id, course_id ) CREATE TABLE program ( program_id, name, college, introduction ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which MDE classes can be taken next semester ? SELECT### Response: SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, program, program_course, semester WHERE course.course_id = course_offering.course_id AND program_course.category LIKE '%MDE%' AND program_course.course_id = course.course_id AND program.name LIKE '%CS-LSA%' AND program.program_id = program_course.program_id AND semester.semester = 'FA' AND semester.semester_id = course_offering.semester AND semester.year = 2016.
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 area ( course_id, area ) CREATE TABLE jobs ( job_id, job_title, description, requirement, city, state, country, zip ) CREATE TABLE semester ( semester_id, semester, year ) CREATE TABLE requirement ( requirement_id, requirement, college ) CREATE TABLE instructor ( instructor_id, name, uniqname ) CREATE TABLE course_prerequisite ( pre_course_id, course_id ) CREATE TABLE offering_instructor ( offering_instructor_id, offering_id, instructor_id ) CREATE TABLE comment_instructor ( instructor_id, student_id, score, comment_text ) CREATE TABLE program ( program_id, name, college, introduction ) 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 ( student_id, lastname, firstname, program_id, declare_major, total_credit, total_gpa, entered_as, admit_term, predicted_graduation_semester, degree, minor, internship ) CREATE TABLE gsi ( course_offering_id, student_id ) 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 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 ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many people are in 477 ? SELECT### Response: SELECT DISTINCT num_enrolled FROM course WHERE department = 'EECS' AND number = 477.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: 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 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 ) CREATE TABLE lake ( lake_name, area, state_name, country_name ) CREATE TABLE mountain ( mountain_name, mountain_altitude, state_name, country_name ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what states border kentucky SELECT### Response: SELECT border FROM border_info WHERE state_name = 'kentucky'.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: 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 requirement ( requirement_id, requirement, college ) 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 comment_instructor ( instructor_id, student_id, score, comment_text ) 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 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_prerequisite ( pre_course_id, course_id ) CREATE TABLE area ( course_id, area ) 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 semester ( semester_id, semester, year ) CREATE TABLE instructor ( instructor_id, name, uniqname ) CREATE TABLE ta ( campus_job_id, student_id, location ) CREATE TABLE program_requirement ( program_id, category, min_credit, additional_req ) CREATE TABLE offering_instructor ( offering_instructor_id, offering_id, instructor_id ) -- Using valid SQLite, answer the following questions for the tables provided above. -- The MDE requirement is covered by which class ? 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 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 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 airline ( airline_code, airline_name, note ) 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 state ( state_code, state_name, country_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 flight_fare ( flight_id, fare_id ) 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 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 time_interval ( period, begin_time, end_time ) 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 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 equipment_sequence ( aircraft_code_sequence, aircraft_code ) CREATE TABLE code_description ( code, description ) 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 time zone is DENVER in SELECT### Response: SELECT DISTINCT time_zone_code 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 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 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 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 airline ( airline_code, airline_name, note ) CREATE TABLE compartment_class ( compartment, class_type ) 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 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 month ( month_number, month_name ) CREATE TABLE class_of_service ( booking_class, rank, class_description ) CREATE TABLE equipment_sequence ( aircraft_code_sequence, aircraft_code ) CREATE TABLE state ( state_code, state_name, country_name ) CREATE TABLE food_service ( meal_code, meal_number, compartment, meal_description ) CREATE TABLE date_day ( month_number, day_number, year, day_name ) CREATE TABLE flight_leg ( flight_id, leg_number, leg_flight ) 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 time_interval ( period, begin_time, end_time ) 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 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. -- show me the fares for DL flights from DALLAS to SAN FRANCISCO 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 = 'DALLAS' 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_fare.fare_id = fare.fare_id AND flight.airline_code = 'DL' 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 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 ( 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 days ( days_code, day_name ) CREATE TABLE code_description ( code, 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_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 food_service ( meal_code, meal_number, compartment, meal_description ) 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 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 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 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 equipment_sequence ( aircraft_code_sequence, aircraft_code ) 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 airport_service ( city_code, airport_code, miles_distant, direction, minutes_distant ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how much does a FIRST class round trip ticket from CLEVELAND to MIAMI on US cost 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, fare_basis, flight, flight_fare WHERE (((flight.airline_code = 'US') AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'MIAMI' AND flight.to_airport = AIRPORT_SERVICE_1.airport_code) AND CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'CLEVELAND' AND NOT fare.round_trip_cost IS NULL 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 fare_basis.class_type = 'FIRST' AND fare.fare_basis_code = fare_basis.fare_basis_code.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE city ( city_name, state_name, population, country_name ) 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 road ( road_name, state_name ) CREATE TABLE mountain ( mountain_name, mountain_altitude, state_name, country_name ) CREATE TABLE lake ( lake_name, area, state_name, country_name ) CREATE TABLE river ( river_name, length, traverse, country_name ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what states border wisconsin SELECT### Response: SELECT border FROM border_info WHERE state_name = 'wisconsin'.
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 program_requirement ( program_id, category, min_credit, additional_req ) CREATE TABLE requirement ( requirement_id, requirement, college ) 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 instructor ( instructor_id, name, uniqname ) CREATE TABLE semester ( semester_id, semester, year ) CREATE TABLE program_course ( program_id, course_id, workload, category ) CREATE TABLE ta ( campus_job_id, student_id, location ) CREATE TABLE comment_instructor ( instructor_id, student_id, score, comment_text ) 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 student_record ( student_id, course_id, semester, grade, how, transfer_source, earn_credit, repeat_term, test_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 offering_instructor ( offering_instructor_id, offering_id, instructor_id ) 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 jobs ( job_id, job_title, description, requirement, city, state, country, zip ) CREATE TABLE course_prerequisite ( pre_course_id, course_id ) -- Using valid SQLite, answer the following questions for the tables provided above. -- If I take 699 , how many credits will I receive ? SELECT### Response: SELECT DISTINCT credits FROM course WHERE department = 'EECS' AND number = 699.
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 date_day ( month_number, day_number, year, day_name ) 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 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 food_service ( meal_code, meal_number, compartment, meal_description ) CREATE TABLE time_interval ( period, begin_time, end_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 fare_basis ( fare_basis_code, booking_class, class_type, premium, economy, discounted, night, season, basis_days ) 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 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 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 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 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 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 airline ( airline_code, airline_name, note ) -- Using valid SQLite, answer the following questions for the tables provided above. -- please list all the flights from KANSAS CITY to CHICAGO on 6 16 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 = 'CHICAGO' AND date_day.day_number = 16 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 = 'KANSAS CITY' 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 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 comment_instructor ( instructor_id, student_id, score, comment_text ) 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 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 program ( program_id, name, college, introduction ) 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_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 requirement ( requirement_id, requirement, college ) CREATE TABLE offering_instructor ( offering_instructor_id, offering_id, instructor_id ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When , in the Fall , does 346 meet ? SELECT### Response: SELECT DISTINCT course_offering.end_time, course_offering.friday, course_offering.monday, course_offering.saturday, course_offering.start_time, course_offering.sunday, course_offering.thursday, course_offering.tuesday, course_offering.wednesday FROM semester INNER JOIN course_offering ON semester.semester_id = course_offering.semester INNER JOIN course ON course.course_id = course_offering.course_id WHERE course.department = 'EECS' AND course.number = 346 AND semester.semester = 'Fall' AND semester.year = 2016.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE journal ( journalid, journalname ) CREATE TABLE paperfield ( fieldid, paperid ) CREATE TABLE cite ( citingpaperid, citedpaperid ) CREATE TABLE dataset ( datasetid, datasetname ) CREATE TABLE paper ( paperid, title, venueid, year, numciting, numcitedby, journalid ) CREATE TABLE venue ( venueid, venuename ) CREATE TABLE writes ( paperid, authorid ) CREATE TABLE paperkeyphrase ( paperid, keyphraseid ) CREATE TABLE field ( fieldid ) CREATE TABLE paperdataset ( paperid, datasetid ) CREATE TABLE author ( authorid, authorname ) CREATE TABLE keyphrase ( keyphraseid, keyphrasename ) -- Using valid SQLite, answer the following questions for the tables provided above. -- autoencoder papers SELECT### Response: SELECT DISTINCT paper.paperid FROM keyphrase, paper, paperkeyphrase WHERE keyphrase.keyphrasename = 'autoencoder' 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 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 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 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 food_service ( meal_code, meal_number, compartment, meal_description ) CREATE TABLE compartment_class ( compartment, class_type ) CREATE TABLE month ( month_number, month_name ) 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 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 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 airline ( airline_code, airline_name, note ) CREATE TABLE class_of_service ( booking_class, rank, class_description ) 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 city ( city_code, city_name, state_code, country_name, time_zone_code ) CREATE TABLE time_interval ( period, begin_time, end_time ) 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 ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what planes does UA use SELECT### Response: SELECT DISTINCT aircraft.aircraft_code FROM aircraft, equipment_sequence, flight WHERE equipment_sequence.aircraft_code = aircraft.aircraft_code AND flight.aircraft_code_sequence = equipment_sequence.aircraft_code_sequence 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 area ( course_id, area ) CREATE TABLE gsi ( course_offering_id, student_id ) CREATE TABLE course_prerequisite ( pre_course_id, course_id ) CREATE TABLE instructor ( instructor_id, name, uniqname ) CREATE TABLE requirement ( requirement_id, requirement, college ) CREATE TABLE ta ( campus_job_id, student_id, location ) 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 jobs ( job_id, job_title, description, requirement, city, state, country, zip ) CREATE TABLE program_course ( program_id, course_id, workload, category ) 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 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 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 comment_instructor ( instructor_id, student_id, score, comment_text ) CREATE TABLE semester ( semester_id, semester, year ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What are my score in subjects taught by Prof. Sundararaghavan ? SELECT### Response: SELECT DISTINCT student_record.grade FROM student_record INNER JOIN offering_instructor ON student_record.offering_id = offering_instructor.offering_id INNER JOIN instructor ON offering_instructor.instructor_id = instructor.instructor_id WHERE LOWER(instructor.name) LIKE '%Sundararaghavan%' AND student_record.student_id = 1.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: 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 program ( program_id, name, college, introduction ) 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 requirement ( requirement_id, requirement, college ) CREATE TABLE semester ( semester_id, semester, year ) CREATE TABLE instructor ( instructor_id, name, uniqname ) 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 comment_instructor ( instructor_id, student_id, score, comment_text ) 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 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 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 course_prerequisite ( pre_course_id, course_id ) CREATE TABLE gsi ( course_offering_id, student_id ) -- Using valid SQLite, answer the following questions for the tables provided above. -- In the Fall of 2017 how many professors will teach MICRBIOL 995 ? SELECT### Response: SELECT COUNT(DISTINCT instructor.instructor_id) FROM course, course_offering, instructor, offering_instructor, semester WHERE course.course_id = course_offering.course_id AND course.department = 'MICRBIOL' AND course.number = 995 AND offering_instructor.instructor_id = instructor.instructor_id AND offering_instructor.offering_id = course_offering.offering_id AND semester.semester = 'Fall' AND semester.semester_id = course_offering.semester AND semester.year = 2017.
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 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 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 city ( city_code, city_name, state_code, country_name, time_zone_code ) 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 flight_fare ( flight_id, fare_id ) CREATE TABLE compartment_class ( compartment, class_type ) 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 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 time_interval ( period, begin_time, end_time ) 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 food_service ( meal_code, meal_number, compartment, meal_description ) CREATE TABLE class_of_service ( booking_class, rank, class_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 flight_leg ( flight_id, leg_number, leg_flight ) CREATE TABLE date_day ( month_number, day_number, year, day_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. -- i would like to fly from DALLAS to DENVER on the morning of 8 27 leaving at 650 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 ((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.departure_time = 650 AND flight.flight_days = days.days_code) AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'DENVER' 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 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 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 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 ground_service ( city_code, airport_code, transport_type, ground_fare ) 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 code_description ( code, description ) CREATE TABLE airline ( airline_code, airline_name, note ) CREATE TABLE compartment_class ( compartment, class_type ) 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 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 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 city ( city_code, city_name, state_code, country_name, time_zone_code ) 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 days ( days_code, day_name ) -- Using valid SQLite, answer the following questions for the tables provided above. -- show me all flights from PITTSBURGH to ATLANTA which leave after 1700 o'clock pm tomorrow 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 ((date_day.day_number = 20 AND date_day.month_number = 1 AND date_day.year = 1991 AND days.day_name = date_day.day_name AND flight.departure_time > 1700 AND flight.flight_days = days.days_code) 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 = '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 compartment_class ( compartment, class_type ) CREATE TABLE airline ( airline_code, airline_name, note ) CREATE TABLE month ( month_number, month_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 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 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 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 airport_service ( city_code, airport_code, miles_distant, direction, minutes_distant ) CREATE TABLE code_description ( code, description ) CREATE TABLE time_zone ( time_zone_code, time_zone_name, hours_from_gmt ) CREATE TABLE flight_fare ( flight_id, fare_id ) 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 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 ) 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 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 date_day ( month_number, day_number, year, day_name ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what flights from any city land at MKE SELECT### Response: SELECT DISTINCT flight.flight_id FROM airport, airport_service, city, flight WHERE airport.airport_code = 'MKE' AND city.city_code = airport_service.city_code AND flight.from_airport = airport_service.airport_code AND flight.to_airport = airport.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 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 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 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 city ( city_code, city_name, state_code, country_name, time_zone_code ) 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 airport_service ( city_code, airport_code, miles_distant, direction, minutes_distant ) CREATE TABLE class_of_service ( booking_class, rank, class_description ) CREATE TABLE days ( days_code, day_name ) 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 code_description ( code, description ) CREATE TABLE dual_carrier ( main_airline, low_flight_number, high_flight_number, dual_airline, service_name ) CREATE TABLE food_service ( meal_code, meal_number, compartment, meal_description ) CREATE TABLE time_interval ( period, begin_time, end_time ) 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_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 flight_fare ( flight_id, fare_id ) CREATE TABLE equipment_sequence ( aircraft_code_sequence, aircraft_code ) -- Using valid SQLite, answer the following questions for the tables provided above. -- find me a flight leaving BOSTON at 0 o'clock SELECT### Response: SELECT DISTINCT flight.flight_id FROM airport_service, city, flight WHERE city.city_code = airport_service.city_code AND city.city_name = 'BOSTON' AND flight.departure_time = 0 AND flight.from_airport = airport_service.airport_code.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE geographic ( city_name, county, region ) CREATE TABLE restaurant ( id, name, food_type, city_name, rating ) CREATE TABLE location ( restaurant_id, house_number, street_name, city_name ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how many places for french are there in palo alto ? SELECT### Response: SELECT COUNT(*) FROM location, restaurant WHERE location.city_name = 'palo alto' AND restaurant.food_type = 'french' AND restaurant.id = location.restaurant_id.
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 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 city ( city_code, city_name, state_code, country_name, time_zone_code ) CREATE TABLE airline ( airline_code, airline_name, note ) CREATE TABLE fare_basis ( fare_basis_code, booking_class, class_type, premium, economy, discounted, night, season, basis_days ) 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 time_interval ( period, begin_time, end_time ) 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_zone ( time_zone_code, time_zone_name, hours_from_gmt ) CREATE TABLE food_service ( meal_code, meal_number, compartment, meal_description ) CREATE TABLE flight_leg ( flight_id, leg_number, leg_flight ) CREATE TABLE equipment_sequence ( aircraft_code_sequence, aircraft_code ) CREATE TABLE ground_service ( city_code, airport_code, transport_type, ground_fare ) CREATE TABLE class_of_service ( booking_class, rank, class_description ) CREATE TABLE date_day ( month_number, day_number, year, 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 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 state ( state_code, state_name, country_name ) 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 flight_fare ( flight_id, fare_id ) -- Using valid SQLite, answer the following questions for the tables provided above. -- please show me the PHILADELPHIA to DENVER SATURDAY flights again 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 = 'DENVER' AND days.day_name = 'SATURDAY' 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 airport_service ( city_code, airport_code, miles_distant, direction, minutes_distant ) CREATE TABLE state ( state_code, state_name, country_name ) CREATE TABLE compartment_class ( compartment, class_type ) 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 food_service ( meal_code, meal_number, compartment, meal_description ) CREATE TABLE month ( month_number, month_name ) 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 equipment_sequence ( aircraft_code_sequence, aircraft_code ) 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 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 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 city ( city_code, city_name, state_code, country_name, time_zone_code ) CREATE TABLE airline ( airline_code, airline_name, note ) 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 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 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 ) -- Using valid SQLite, answer the following questions for the tables provided above. -- list all flights on sunday from SAN FRANCISCO to PITTSBURGH nonstop 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.stops = 0) 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 = 'PITTSBURGH' 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 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 days ( days_code, day_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 month ( month_number, month_name ) CREATE TABLE ground_service ( city_code, airport_code, transport_type, ground_fare ) CREATE TABLE code_description ( code, description ) 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 time_interval ( period, begin_time, end_time ) 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 flight_fare ( flight_id, fare_id ) 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 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 city ( city_code, city_name, state_code, country_name, time_zone_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 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 ) -- Using valid SQLite, answer the following questions for the tables provided above. -- hello i'd like a DL flight from ATLANTA to 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_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.to_airport = AIRPORT_SERVICE_0.airport_code AND flight.from_airport = AIRPORT_SERVICE_1.airport_code) AND flight.airline_code = 'DL'.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE jobs ( job_id, job_title, description, requirement, city, state, country, zip ) 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 ta ( campus_job_id, student_id, location ) 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 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 program_requirement ( program_id, category, min_credit, additional_req ) CREATE TABLE gsi ( course_offering_id, student_id ) CREATE TABLE area ( course_id, area ) CREATE TABLE instructor ( instructor_id, name, uniqname ) 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 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 ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What professors 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 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 ground_service ( city_code, airport_code, transport_type, ground_fare ) CREATE TABLE date_day ( month_number, day_number, year, 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 time_zone ( time_zone_code, time_zone_name, hours_from_gmt ) 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_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 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 compartment_class ( compartment, class_type ) 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 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 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 flight_fare ( flight_id, fare_id ) CREATE TABLE code_description ( code, description ) CREATE TABLE airline ( airline_code, airline_name, note ) 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 city ( city_code, city_name, state_code, country_name, time_zone_code ) CREATE TABLE flight_leg ( flight_id, leg_number, leg_flight ) -- Using valid SQLite, answer the following questions for the tables provided above. -- hi i'd like a flight from TAMPA to MONTREAL 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 = 'TAMPA' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'MONTREAL' 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 class_of_service ( booking_class, rank, class_description ) CREATE TABLE month ( month_number, month_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 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 flight_leg ( flight_id, leg_number, leg_flight ) CREATE TABLE compartment_class ( compartment, class_type ) 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 fare_basis ( fare_basis_code, booking_class, class_type, premium, economy, discounted, night, season, basis_days ) 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 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_fare ( flight_id, fare_id ) CREATE TABLE date_day ( month_number, day_number, year, 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 airport_service ( city_code, airport_code, miles_distant, direction, minutes_distant ) CREATE TABLE airline ( airline_code, airline_name, note ) 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 dual_carrier ( main_airline, low_flight_number, high_flight_number, dual_airline, service_name ) CREATE TABLE time_interval ( period, begin_time, end_time ) -- Using valid SQLite, answer the following questions for the tables provided above. -- give me a flight between BOSTON and 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 = '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.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE program ( program_id, name, college, introduction ) CREATE TABLE requirement ( requirement_id, requirement, college ) 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 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_prerequisite ( pre_course_id, course_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 jobs ( job_id, job_title, description, requirement, city, state, country, zip ) 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 instructor ( instructor_id, name, uniqname ) CREATE TABLE ta ( campus_job_id, student_id, location ) CREATE TABLE semester ( semester_id, semester, year ) 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 offering_instructor ( offering_instructor_id, offering_id, instructor_id ) CREATE TABLE gsi ( course_offering_id, student_id ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Besides Prof. Keppen , is there any other person teaching Analytical Archaeology ? SELECT### Response: SELECT DISTINCT course.department, course.name, course.number, instructor.name FROM course, course_offering, instructor, offering_instructor WHERE course.course_id = course_offering.course_id AND course.name LIKE '%Analytical Archaeology%' AND NOT instructor.name LIKE '%Keppen%' 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 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 time_zone ( time_zone_code, time_zone_name, hours_from_gmt ) CREATE TABLE class_of_service ( booking_class, rank, class_description ) 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 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 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 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 airline ( airline_code, airline_name, note ) CREATE TABLE month ( month_number, month_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 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 city ( city_code, city_name, state_code, country_name, time_zone_code ) CREATE TABLE code_description ( code, description ) CREATE TABLE state ( state_code, state_name, country_name ) CREATE TABLE food_service ( meal_code, meal_number, compartment, meal_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 equipment_sequence ( aircraft_code_sequence, aircraft_code ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the earliest AA flight leaving PHILADELPHIA for 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, flight WHERE ((CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'PHILADELPHIA' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'DALLAS' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code AND flight.to_airport = AIRPORT_SERVICE_1.airport_code) AND flight.airline_code = 'AA') 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 (CITYalias2.city_code = AIRPORT_SERVICEalias2.city_code AND CITYalias2.city_name = 'PHILADELPHIA' AND CITYalias3.city_code = AIRPORT_SERVICEalias3.city_code AND CITYalias3.city_name = 'DALLAS' AND FLIGHTalias1.from_airport = AIRPORT_SERVICEalias2.airport_code AND FLIGHTalias1.to_airport = AIRPORT_SERVICEalias3.airport_code) AND FLIGHTalias1.airline_code = 'AA').
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 city ( city_code, city_name, state_code, country_name, time_zone_code ) 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 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 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_zone ( time_zone_code, time_zone_name, hours_from_gmt ) CREATE TABLE equipment_sequence ( aircraft_code_sequence, aircraft_code ) CREATE TABLE days ( days_code, day_name ) 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 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 airline ( airline_code, airline_name, note ) CREATE TABLE time_interval ( period, begin_time, end_time ) 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 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 state ( state_code, state_name, country_name ) -- Using valid SQLite, answer the following questions for the tables provided above. -- i need a flight from MILWAUKEE to INDIANAPOLIS leaving monday before 900 SELECT### Response: SELECT DISTINCT flight_id FROM flight WHERE (((departure_time < 900 AND 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 = 21 AND DATE_DAYalias0.month_number = 2 AND DATE_DAYalias0.year = 1991))) AND 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 = 'INDIANAPOLIS'))) AND 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 = 'MILWAUKEE'))).
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 comment_instructor ( instructor_id, student_id, score, comment_text ) 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 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 ( 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 requirement ( requirement_id, requirement, college ) CREATE TABLE course_prerequisite ( pre_course_id, course_id ) CREATE TABLE area ( course_id, area ) 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 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 program ( program_id, name, college, introduction ) CREATE TABLE gsi ( course_offering_id, student_id ) CREATE TABLE program_course ( program_id, course_id, workload, category ) CREATE TABLE semester ( semester_id, semester, year ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What courses are offered this Fall ? SELECT### Response: SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND course.department = 'EECS' AND semester.semester = 'Fall' AND semester.semester_id = course_offering.semester AND semester.year = 2016.
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 airport ( airport_code, airport_name, airport_location, state_code, country_name, time_zone_code, minimum_connect_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 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_fare ( flight_id, fare_id ) 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 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 class_of_service ( booking_class, rank, class_description ) CREATE TABLE compartment_class ( compartment, class_type ) 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 ground_service ( city_code, airport_code, transport_type, ground_fare ) CREATE TABLE date_day ( month_number, day_number, year, 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 ) 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 ( 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 code_description ( code, description ) -- Using valid SQLite, answer the following questions for the tables provided above. -- show me the shortest flight from BOSTON to DENVER which arrives in DENVER wednesday before 1200 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.arrival_time < flight.departure_time) 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) OR (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 NOT (flight.arrival_time < flight.departure_time))) AND flight.arrival_time < 1200) AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'DENVER' AND flight.to_airport = AIRPORT_SERVICE_1.airport_code) AND CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'BOSTON' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code) AND flight.time_elapsed = (SELECT MIN(FLIGHTalias1.time_elapsed) 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 (((((FLIGHTalias1.arrival_time < FLIGHTalias1.departure_time) AND DATE_DAYalias1.day_number = 23 AND DATE_DAYalias1.month_number = 4 AND DATE_DAYalias1.year = 1991 AND DAYSalias1.day_name = DATE_DAYalias1.day_name AND FLIGHTalias1.flight_days = DAYSalias1.days_code) OR (DATE_DAYalias1.day_number = 23 AND DATE_DAYalias1.month_number = 4 AND DATE_DAYalias1.year = 1991 AND DAYSalias1.day_name = DATE_DAYalias1.day_name AND FLIGHTalias1.flight_days = DAYSalias1.days_code AND NOT (FLIGHTalias1.arrival_time < FLIGHTalias1.departure_time))) AND FLIGHTalias1.arrival_time < 1200) AND CITYalias3.city_code = AIRPORT_SERVICEalias3.city_code AND CITYalias3.city_name = 'DENVER' AND FLIGHTalias1.to_airport = AIRPORT_SERVICEalias3.airport_code) AND CITYalias2.city_code = AIRPORT_SERVICEalias2.city_code AND CITYalias2.city_name = 'BOSTON' 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 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 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 days ( days_code, day_name ) CREATE TABLE time_interval ( period, begin_time, end_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 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 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 code_description ( code, description ) CREATE TABLE compartment_class ( compartment, class_type ) CREATE TABLE ground_service ( city_code, airport_code, transport_type, ground_fare ) CREATE TABLE month ( month_number, month_name ) CREATE TABLE airline ( airline_code, airline_name, note ) 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 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 class_of_service ( booking_class, rank, class_description ) 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. -- how many DL flights leave from WASHINGTON SELECT### Response: SELECT COUNT(DISTINCT flight.flight_id) FROM airport_service, city, flight WHERE city.city_code = airport_service.city_code AND city.city_name = 'WASHINGTON' AND flight.airline_code = 'DL' AND flight.from_airport = airport_service.airport_code.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE field ( fieldid ) CREATE TABLE paperkeyphrase ( paperid, keyphraseid ) CREATE TABLE paperfield ( fieldid, paperid ) CREATE TABLE journal ( journalid, journalname ) CREATE TABLE keyphrase ( keyphraseid, keyphrasename ) CREATE TABLE writes ( paperid, authorid ) CREATE TABLE author ( authorid, authorname ) CREATE TABLE paper ( paperid, title, venueid, year, numciting, numcitedby, journalid ) CREATE TABLE venue ( venueid, venuename ) CREATE TABLE dataset ( datasetid, datasetname ) CREATE TABLE paperdataset ( paperid, datasetid ) CREATE TABLE cite ( citingpaperid, citedpaperid ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Papers about 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 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 airport_service ( city_code, airport_code, miles_distant, direction, minutes_distant ) CREATE TABLE time_interval ( period, begin_time, end_time ) CREATE TABLE code_description ( code, description ) CREATE TABLE airline ( airline_code, airline_name, note ) 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 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 month ( month_number, month_name ) 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 class_of_service ( booking_class, rank, class_description ) 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 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 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 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 ground_service ( city_code, airport_code, transport_type, ground_fare ) -- Using valid SQLite, answer the following questions for the tables provided above. -- could you tell me the cheapest fare from ATLANTA to BOSTON on 31 of 8 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, date_day AS DATE_DAY_0, date_day AS DATE_DAY_1, days AS DAYS_0, days AS DAYS_1, fare, fare_basis, flight, flight_fare WHERE ((CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BOSTON' AND DATE_DAY_1.day_number = 31 AND DATE_DAY_1.month_number = 8 AND DATE_DAY_1.year = 1991 AND DAYS_1.day_name = DATE_DAY_1.day_name AND flight.flight_days = DAYS_1.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 DATE_DAY_0.day_number = 31 AND DATE_DAY_0.month_number = 8 AND DATE_DAY_0.year = 1991 AND DAYS_0.day_name = DATE_DAY_0.day_name AND fare_basis.basis_days = DAYS_0.days_code AND fare.fare_basis_code = fare_basis.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_0.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, date_day AS DATE_DAYalias2, date_day AS DATE_DAYalias3, days AS DAYSalias2, days AS DAYSalias3, fare AS FAREalias1, fare_basis AS FARE_BASISalias1, flight AS FLIGHTalias1, flight_fare AS FLIGHT_FAREalias1 WHERE (CITYalias3.city_code = AIRPORT_SERVICEalias3.city_code AND CITYalias3.city_name = 'BOSTON' AND DATE_DAYalias3.day_number = 31 AND DATE_DAYalias3.month_number = 8 AND DATE_DAYalias3.year = 1991 AND DAYSalias3.day_name = DATE_DAYalias3.day_name AND FLIGHTalias1.flight_days = DAYSalias3.days_code AND FLIGHTalias1.to_airport = AIRPORT_SERVICEalias3.airport_code) AND CITYalias2.city_code = AIRPORT_SERVICEalias2.city_code AND CITYalias2.city_name = 'ATLANTA' AND DATE_DAYalias2.day_number = 31 AND DATE_DAYalias2.month_number = 8 AND DATE_DAYalias2.year = 1991 AND DAYSalias2.day_name = DATE_DAYalias2.day_name AND FARE_BASISalias1.basis_days = DAYSalias2.days_code AND FAREalias1.fare_basis_code = FARE_BASISalias1.fare_basis_code AND FLIGHT_FAREalias1.fare_id = FAREalias1.fare_id AND FLIGHTalias1.flight_id = FLIGHT_FAREalias1.flight_id 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 class_of_service ( booking_class, rank, class_description ) CREATE TABLE days ( days_code, day_name ) CREATE TABLE month ( month_number, month_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 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 airline ( airline_code, airline_name, note ) CREATE TABLE state ( state_code, state_name, country_name ) CREATE TABLE date_day ( month_number, day_number, year, day_name ) 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 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_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 time_zone ( time_zone_code, time_zone_name, hours_from_gmt ) 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 compartment_class ( compartment, class_type ) 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 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 ( 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. -- what flights are there between ATLANTA and 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 = '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.
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 equipment_sequence ( aircraft_code_sequence, aircraft_code ) 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 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 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 airline ( airline_code, airline_name, note ) 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 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 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 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 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 time_interval ( period, begin_time, end_time ) 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 compartment_class ( compartment, class_type ) CREATE TABLE date_day ( month_number, day_number, year, day_name ) CREATE TABLE food_service ( meal_code, meal_number, compartment, meal_description ) -- Using valid SQLite, answer the following questions for the tables provided above. -- which airlines have DAILY flights from BOSTON to DALLAS 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 = 'DALLAS' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code AND flight.to_airport = AIRPORT_SERVICE_1.airport_code) AND flight.airline_code = airline.airline_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 venue ( venueid, venuename ) CREATE TABLE cite ( citingpaperid, citedpaperid ) CREATE TABLE paper ( paperid, title, venueid, year, numciting, numcitedby, journalid ) CREATE TABLE dataset ( datasetid, datasetname ) CREATE TABLE writes ( paperid, authorid ) CREATE TABLE paperdataset ( paperid, datasetid ) CREATE TABLE author ( authorid, authorname ) CREATE TABLE field ( fieldid ) CREATE TABLE journal ( journalid, journalname ) CREATE TABLE keyphrase ( keyphraseid, keyphrasename ) CREATE TABLE paperkeyphrase ( paperid, keyphraseid ) CREATE TABLE paperfield ( fieldid, paperid ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what papers are in the ACL of 2014 SELECT### Response: SELECT DISTINCT paper.paperid FROM paper, venue WHERE paper.year = 2014 AND paper.venueid = venue.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 time_zone ( time_zone_code, time_zone_name, hours_from_gmt ) CREATE TABLE days ( days_code, day_name ) CREATE TABLE flight_fare ( flight_id, fare_id ) CREATE TABLE compartment_class ( compartment, class_type ) CREATE TABLE equipment_sequence ( aircraft_code_sequence, aircraft_code ) 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 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 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 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 ) 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 time_interval ( period, begin_time, end_time ) 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 month ( month_number, month_name ) 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 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 ) -- Using valid SQLite, answer the following questions for the tables provided above. -- list all flights on UA from SAN FRANCISCO to BOSTON with fare code QX 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 = 'BOSTON' AND fare.fare_basis_code = 'QX' 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 = 'SAN FRANCISCO' 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 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 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 dual_carrier ( main_airline, low_flight_number, high_flight_number, dual_airline, service_name ) CREATE TABLE state ( state_code, state_name, country_name ) 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 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 class_of_service ( booking_class, rank, class_description ) 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 equipment_sequence ( aircraft_code_sequence, aircraft_code ) 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 code_description ( code, description ) 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 restriction ( restriction_code, advance_purchase, stopovers, saturday_stay_required, minimum_stay, maximum_stay, application, no_discounts ) CREATE TABLE time_interval ( period, begin_time, end_time ) CREATE TABLE airline ( airline_code, airline_name, note ) CREATE TABLE flight_leg ( flight_id, leg_number, leg_flight ) -- Using valid SQLite, answer the following questions for the tables provided above. -- i am also interested in a flight that runs from ST. LOUIS 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, flight WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'ST. LOUIS' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'LAS VEGAS' 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 state ( state_code, state_name, country_name ) CREATE TABLE code_description ( code, description ) CREATE TABLE month ( month_number, month_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 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 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 dual_carrier ( main_airline, low_flight_number, high_flight_number, dual_airline, service_name ) CREATE TABLE days ( days_code, day_name ) CREATE TABLE city ( city_code, city_name, state_code, country_name, time_zone_code ) 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 airline ( airline_code, airline_name, note ) 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 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_leg ( flight_id, leg_number, leg_flight ) 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 date_day ( month_number, day_number, year, 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 ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what flights leave ATLANTA at about 3 in the afternoon and arrive in 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 ((flight.departure_time <= 1530 AND flight.departure_time >= 1430) 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 = '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 state ( state_name, capital, population, area, country_name, density ) CREATE TABLE city ( city_name, state_name, population, country_name ) 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 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 states border states that the mississippi runs through SELECT### Response: SELECT border FROM border_info 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 class_of_service ( booking_class, rank, class_description ) CREATE TABLE state ( state_code, state_name, country_name ) 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 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 equipment_sequence ( aircraft_code_sequence, aircraft_code ) CREATE TABLE flight_leg ( flight_id, leg_number, leg_flight ) 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 city ( city_code, city_name, state_code, country_name, time_zone_code ) CREATE TABLE time_interval ( period, begin_time, end_time ) CREATE TABLE flight_fare ( flight_id, fare_id ) CREATE TABLE airport_service ( city_code, airport_code, miles_distant, direction, minutes_distant ) 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 time_zone ( time_zone_code, time_zone_name, hours_from_gmt ) 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 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 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 airport ( airport_code, airport_name, airport_location, state_code, country_name, time_zone_code, minimum_connect_time ) -- Using valid SQLite, answer the following questions for the tables provided above. -- flights from DENVER to SEATTLE on saturday morning on CO 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 = 'SEATTLE' 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 = 'DENVER' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code) AND flight.departure_time BETWEEN 0 AND 1200) AND flight.airline_code = 'CO'.
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 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 dual_carrier ( main_airline, low_flight_number, high_flight_number, dual_airline, service_name ) 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 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 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 equipment_sequence ( aircraft_code_sequence, aircraft_code ) CREATE TABLE compartment_class ( compartment, class_type ) CREATE TABLE ground_service ( city_code, airport_code, transport_type, ground_fare ) CREATE TABLE flight_leg ( flight_id, leg_number, leg_flight ) 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 code_description ( code, description ) CREATE TABLE time_interval ( period, begin_time, end_time ) 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 state ( state_code, state_name, country_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 time_zone ( time_zone_code, time_zone_name, hours_from_gmt ) -- Using valid SQLite, answer the following questions for the tables provided above. -- nonstop flights from SEATTLE 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 = 'SEATTLE' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'DENVER' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code AND flight.to_airport = AIRPORT_SERVICE_1.airport_code) AND flight.stops = 0.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE class_of_service ( booking_class, rank, class_description ) 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 days ( days_code, day_name ) 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 dual_carrier ( main_airline, low_flight_number, high_flight_number, dual_airline, service_name ) CREATE TABLE airline ( airline_code, airline_name, note ) 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 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 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 airport_service ( city_code, airport_code, miles_distant, direction, minutes_distant ) 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 compartment_class ( compartment, class_type ) CREATE TABLE equipment_sequence ( aircraft_code_sequence, aircraft_code ) CREATE TABLE month ( month_number, month_name ) 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 date_day ( month_number, day_number, year, day_name ) -- Using valid SQLite, answer the following questions for the tables provided above. -- i would like information on flights from SAN FRANCISCO to PITTSBURGH leaving after 2000 monday night 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 ((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.departure_time > 2000 AND flight.flight_days = days.days_code) AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'PITTSBURGH' 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 code_description ( code, 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 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 compartment_class ( compartment, class_type ) CREATE TABLE food_service ( meal_code, meal_number, compartment, meal_description ) 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 flight_fare ( flight_id, fare_id ) 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 class_of_service ( booking_class, rank, class_description ) 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 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 state ( state_code, state_name, country_name ) CREATE TABLE airline ( airline_code, airline_name, note ) 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 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 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 ) -- Using valid SQLite, answer the following questions for the tables provided above. -- show all flights from MIAMI to JFK SELECT### Response: SELECT DISTINCT flight.flight_id FROM airport, airport_service, city, flight WHERE airport.airport_code = 'JFK' AND city.city_code = airport_service.city_code AND city.city_name = 'MIAMI' AND flight.from_airport = airport_service.airport_code AND flight.to_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_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 ground_service ( city_code, airport_code, transport_type, ground_fare ) CREATE TABLE food_service ( meal_code, meal_number, compartment, meal_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 days ( days_code, day_name ) 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 month ( month_number, month_name ) CREATE TABLE code_description ( code, description ) CREATE TABLE equipment_sequence ( aircraft_code_sequence, aircraft_code ) CREATE TABLE compartment_class ( compartment, class_type ) CREATE TABLE state ( state_code, state_name, country_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 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_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 class_of_service ( booking_class, rank, class_description ) CREATE TABLE flight_fare ( flight_id, fare_id ) 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 ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what time does the TUESDAY morning 755 flight leaving WASHINGTON arrive in SAN FRANCISCO SELECT### Response: SELECT DISTINCT flight.arrival_time 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 = 'TUESDAY' AND flight.departure_time = 755 AND flight.flight_days = days.days_code) 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 = '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 paperfield ( fieldid, paperid ) CREATE TABLE cite ( citingpaperid, citedpaperid ) CREATE TABLE paper ( paperid, title, venueid, year, numciting, numcitedby, journalid ) CREATE TABLE paperkeyphrase ( paperid, keyphraseid ) CREATE TABLE journal ( journalid, journalname ) CREATE TABLE field ( fieldid ) CREATE TABLE keyphrase ( keyphraseid, keyphrasename ) CREATE TABLE writes ( paperid, authorid ) CREATE TABLE author ( authorid, authorname ) CREATE TABLE venue ( venueid, venuename ) CREATE TABLE paperdataset ( paperid, datasetid ) CREATE TABLE dataset ( datasetid, datasetname ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many papers were written on Multiuser Receiver in the Decision Feedback this year ? SELECT### Response: SELECT DISTINCT paper.paperid FROM keyphrase, paper, paperkeyphrase WHERE keyphrase.keyphrasename = 'Multiuser Receiver in the Decision Feedback' AND paperkeyphrase.keyphraseid = keyphrase.keyphraseid AND paper.paperid = paperkeyphrase.paperid AND paper.year = 2016 GROUP BY paper.paperid HAVING COUNT(DISTINCT keyphrase.keyphrasename) > 1.
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 class_of_service ( booking_class, rank, class_description ) 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 time_zone ( time_zone_code, time_zone_name, hours_from_gmt ) CREATE TABLE airline ( airline_code, airline_name, note ) CREATE TABLE equipment_sequence ( aircraft_code_sequence, aircraft_code ) 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 city ( city_code, city_name, state_code, country_name, time_zone_code ) CREATE TABLE days ( days_code, day_name ) CREATE TABLE time_interval ( period, begin_time, end_time ) CREATE TABLE ground_service ( city_code, airport_code, transport_type, ground_fare ) 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 ( 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 flight_fare ( flight_id, fare_id ) CREATE TABLE state ( state_code, state_name, country_name ) 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 flight_leg ( flight_id, leg_number, leg_flight ) 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 ) -- Using valid SQLite, answer the following questions for the tables provided above. -- i would like to travel from DENVER to PITTSBURGH 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 = 'PITTSBURGH' 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 instructor ( instructor_id, name, uniqname ) CREATE TABLE ta ( campus_job_id, student_id, location ) CREATE TABLE gsi ( course_offering_id, student_id ) CREATE TABLE offering_instructor ( offering_instructor_id, offering_id, instructor_id ) 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 requirement ( requirement_id, requirement, college ) 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 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 program ( program_id, name, college, introduction ) 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 jobs ( job_id, job_title, description, requirement, city, state, country, zip ) CREATE TABLE course_prerequisite ( pre_course_id, course_id ) CREATE TABLE program_course ( program_id, course_id, workload, category ) 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. -- In the Summer when does 900 meet ? SELECT### Response: SELECT DISTINCT course_offering.end_time, course_offering.friday, course_offering.monday, course_offering.saturday, course_offering.start_time, course_offering.sunday, course_offering.thursday, course_offering.tuesday, course_offering.wednesday FROM semester INNER JOIN course_offering ON semester.semester_id = course_offering.semester INNER JOIN course ON course.course_id = course_offering.course_id WHERE course.department = 'EECS' AND course.number = 900 AND semester.semester = 'Summer' AND semester.year = 2016.
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 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 time_interval ( period, begin_time, end_time ) CREATE TABLE airport_service ( city_code, airport_code, miles_distant, direction, minutes_distant ) 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 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 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 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 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 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 state ( state_code, state_name, country_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 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 ) -- Using valid SQLite, answer the following questions for the tables provided above. -- are there any later flights than 2010 leaving from MILWAUKEE for TACOMA tomorrow evening 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 (((date_day.day_number = 20 AND date_day.month_number = 1 AND date_day.year = 1991 AND days.day_name = date_day.day_name AND flight.departure_time > 2010 AND flight.flight_days = days.days_code) AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'TACOMA' AND flight.to_airport = AIRPORT_SERVICE_1.airport_code) AND CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'MILWAUKEE' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code) AND flight.departure_time BETWEEN 1800 AND 2200.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE publication ( abstract, cid, citation_num, jid, pid, reference_num, title, year ) CREATE TABLE domain_author ( aid, did ) CREATE TABLE domain_conference ( cid, did ) CREATE TABLE keyword ( keyword, kid ) CREATE TABLE journal ( homepage, jid, name ) CREATE TABLE domain ( did, name ) CREATE TABLE domain_keyword ( did, kid ) CREATE TABLE domain_publication ( did, pid ) CREATE TABLE organization ( continent, homepage, name, oid ) CREATE TABLE conference ( cid, homepage, name ) CREATE TABLE publication_keyword ( kid, pid ) CREATE TABLE writes ( aid, pid ) CREATE TABLE author ( aid, homepage, name, oid ) CREATE TABLE cite ( cited, citing ) CREATE TABLE domain_journal ( did, jid ) -- Using valid SQLite, answer the following questions for the tables provided above. -- return me the number of papers in PVLDB containing keyword ' Keyword search ' . SELECT### Response: SELECT COUNT(DISTINCT (publication.title)) FROM journal, keyword, publication, publication_keyword WHERE journal.name = 'PVLDB' AND keyword.keyword = 'Keyword search' AND publication_keyword.kid = keyword.kid AND publication.jid = journal.jid AND publication.pid = publication_keyword.pid.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE ta ( campus_job_id, student_id, location ) CREATE TABLE requirement ( requirement_id, requirement, college ) 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 ) CREATE TABLE program ( program_id, name, college, introduction ) CREATE TABLE instructor ( instructor_id, name, uniqname ) CREATE TABLE semester ( semester_id, semester, year ) 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_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 offering_instructor ( offering_instructor_id, offering_id, instructor_id ) CREATE TABLE comment_instructor ( instructor_id, student_id, score, comment_text ) CREATE TABLE program_course ( program_id, course_id, workload, category ) 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 program_requirement ( program_id, category, min_credit, additional_req ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many sections does MEDADM 401 have ? 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 = 'MEDADM' AND course.number = 401.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE semester ( semester_id, semester, year ) CREATE TABLE comment_instructor ( instructor_id, student_id, score, comment_text ) CREATE TABLE instructor ( instructor_id, name, uniqname ) 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 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 ( program_id, name, college, introduction ) CREATE TABLE gsi ( course_offering_id, student_id ) CREATE TABLE course_prerequisite ( pre_course_id, course_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 area ( course_id, area ) CREATE TABLE program_requirement ( program_id, category, min_credit, additional_req ) CREATE TABLE requirement ( requirement_id, requirement, college ) CREATE TABLE program_course ( program_id, course_id, workload, category ) 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 student_record ( student_id, course_id, semester, grade, how, transfer_source, earn_credit, repeat_term, test_id ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Can you show me the requirements for a CS-LSA degree ? SELECT### Response: SELECT DISTINCT program_requirement.additional_req, program_requirement.category, program_requirement.min_credit, program.name FROM program, program_requirement WHERE program.name LIKE '%CS-LSA%' AND program.program_id = program_requirement.program_id.
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_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 area ( course_id, area ) 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_prerequisite ( pre_course_id, course_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 semester ( semester_id, semester, year ) CREATE TABLE program_course ( program_id, course_id, workload, category ) CREATE TABLE comment_instructor ( instructor_id, student_id, score, comment_text ) CREATE TABLE instructor ( instructor_id, name, uniqname ) CREATE TABLE offering_instructor ( offering_instructor_id, offering_id, instructor_id ) CREATE TABLE requirement ( requirement_id, requirement, college ) 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_record ( student_id, course_id, semester, grade, how, transfer_source, earn_credit, repeat_term, test_id ) CREATE TABLE program ( program_id, name, college, introduction ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Is MATH 185 available as a Summer class in 2004 ? SELECT### Response: SELECT COUNT(*) > 0 FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND course.department = 'MATH' AND course.number = 185 AND semester.semester = 'Summer' AND semester.semester_id = course_offering.semester AND semester.year = 2004.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE ta ( campus_job_id, student_id, location ) CREATE TABLE gsi ( course_offering_id, student_id ) CREATE TABLE program_course ( program_id, course_id, workload, category ) CREATE TABLE requirement ( requirement_id, requirement, college ) 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 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 ( 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 course_prerequisite ( pre_course_id, course_id ) 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 program_requirement ( program_id, category, min_credit, additional_req ) CREATE TABLE area ( course_id, area ) CREATE TABLE instructor ( instructor_id, name, uniqname ) 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_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. -- NATIVEAM 333 will be taught by which instructor this Fall ? 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 semester ON semester.semester_id = course_offering.semester WHERE course.department = 'NATIVEAM' AND course.number = 333 AND semester.semester = 'Fall' 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_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 date_day ( month_number, day_number, year, day_name ) CREATE TABLE ground_service ( city_code, airport_code, transport_type, ground_fare ) CREATE TABLE code_description ( code, description ) CREATE TABLE days ( days_code, day_name ) CREATE TABLE city ( city_code, city_name, state_code, country_name, time_zone_code ) 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 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 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 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 flight_leg ( flight_id, leg_number, leg_flight ) 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 food_service ( meal_code, meal_number, compartment, meal_description ) CREATE TABLE month ( month_number, month_name ) CREATE TABLE airport_service ( city_code, airport_code, miles_distant, direction, minutes_distant ) 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 time_interval ( period, begin_time, end_time ) -- Using valid SQLite, answer the following questions for the tables provided above. -- list flights from DENVER to PHOENIX 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 = 'PHOENIX' 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 location ( restaurant_id, house_number, street_name, city_name ) CREATE TABLE restaurant ( id, name, food_type, city_name, rating ) CREATE TABLE geographic ( city_name, county, region ) -- Using valid SQLite, answer the following questions for the tables provided above. -- where is a good restaurant in mountain view for arabic food ? 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_interval ( period, begin_time, end_time ) CREATE TABLE days ( days_code, day_name ) CREATE TABLE flight_leg ( flight_id, leg_number, leg_flight ) 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 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 compartment_class ( compartment, class_type ) CREATE TABLE code_description ( code, 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 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 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 class_of_service ( booking_class, rank, class_description ) CREATE TABLE equipment_sequence ( aircraft_code_sequence, aircraft_code ) CREATE TABLE flight_fare ( flight_id, fare_id ) 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 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 ) -- Using valid SQLite, answer the following questions for the tables provided above. -- i want a flight that leaves from CHARLOTTE to NEWARK that leaves in the afternoon or evening 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 BETWEEN 1200 AND 1800) OR (flight.departure_time BETWEEN 1800 AND 2200)) AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'NEWARK' AND flight.to_airport = AIRPORT_SERVICE_1.airport_code) AND CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'CHARLOTTE' 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_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 time_interval ( period, begin_time, end_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 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 fare_basis ( fare_basis_code, booking_class, class_type, premium, economy, discounted, night, season, basis_days ) CREATE TABLE dual_carrier ( main_airline, low_flight_number, high_flight_number, dual_airline, service_name ) CREATE TABLE restriction ( restriction_code, advance_purchase, stopovers, saturday_stay_required, minimum_stay, maximum_stay, application, no_discounts ) CREATE TABLE code_description ( code, description ) 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 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 equipment_sequence ( aircraft_code_sequence, aircraft_code ) 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 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 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 state ( state_code, state_name, country_name ) -- Using valid SQLite, answer the following questions for the tables provided above. -- are they all nonstop flights from KANSAS CITY to ST. PAUL 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 = 'KANSAS CITY' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'ST. PAUL' 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 time_interval ( period, begin_time, end_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_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 compartment_class ( compartment, class_type ) CREATE TABLE city ( city_code, city_name, state_code, country_name, time_zone_code ) 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 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 ground_service ( city_code, airport_code, transport_type, ground_fare ) CREATE TABLE month ( month_number, month_name ) CREATE TABLE date_day ( month_number, day_number, year, day_name ) CREATE TABLE flight_fare ( flight_id, fare_id ) CREATE TABLE code_description ( code, description ) 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 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 airport_service ( city_code, airport_code, miles_distant, direction, minutes_distant ) 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 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 ) -- Using valid SQLite, answer the following questions for the tables provided above. -- show me ground transport in SEATTLE SELECT### Response: SELECT DISTINCT ground_service.transport_type FROM city, ground_service WHERE city.city_name = 'SEATTLE' 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 program_requirement ( program_id, category, min_credit, additional_req ) 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 ta ( campus_job_id, student_id, location ) CREATE TABLE comment_instructor ( instructor_id, student_id, score, comment_text ) 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 ) CREATE TABLE course_prerequisite ( pre_course_id, course_id ) CREATE TABLE offering_instructor ( offering_instructor_id, offering_id, instructor_id ) CREATE TABLE semester ( semester_id, semester, year ) CREATE TABLE area ( course_id, area ) CREATE TABLE gsi ( course_offering_id, student_id ) CREATE TABLE program_course ( program_id, course_id, workload, category ) CREATE TABLE requirement ( requirement_id, requirement, college ) 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 program ( program_id, name, college, introduction ) 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 ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which course is tougher 632 or 532 ? SELECT### Response: SELECT DISTINCT course.number FROM course, program_course WHERE (course.number = 632 OR course.number = 532) 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 conference ( cid, homepage, name ) CREATE TABLE domain_keyword ( did, kid ) CREATE TABLE publication_keyword ( kid, pid ) CREATE TABLE domain_author ( aid, did ) CREATE TABLE domain_publication ( did, pid ) CREATE TABLE journal ( homepage, jid, name ) CREATE TABLE domain ( did, name ) CREATE TABLE author ( aid, homepage, name, oid ) CREATE TABLE cite ( cited, citing ) CREATE TABLE publication ( abstract, cid, citation_num, jid, pid, reference_num, title, year ) CREATE TABLE writes ( aid, pid ) CREATE TABLE organization ( continent, homepage, name, oid ) CREATE TABLE keyword ( keyword, kid ) CREATE TABLE domain_conference ( cid, did ) CREATE TABLE domain_journal ( did, jid ) -- Using valid SQLite, answer the following questions for the tables provided above. -- return me the authors who have more than 10 papers in the VLDB conference . SELECT### Response: SELECT author.name FROM author, conference, publication, writes WHERE conference.name = 'VLDB' AND publication.cid = conference.cid AND writes.aid = author.aid AND writes.pid = publication.pid GROUP BY author.name HAVING COUNT(DISTINCT (publication.title)) > 10.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE semester ( semester_id, semester, year ) 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 offering_instructor ( offering_instructor_id, offering_id, instructor_id ) CREATE TABLE instructor ( instructor_id, name, uniqname ) CREATE TABLE course_prerequisite ( pre_course_id, course_id ) CREATE TABLE program_course ( program_id, course_id, workload, category ) CREATE TABLE area ( course_id, area ) CREATE TABLE program_requirement ( program_id, category, min_credit, additional_req ) 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 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 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 comment_instructor ( instructor_id, student_id, score, comment_text ) CREATE TABLE ta ( campus_job_id, student_id, location ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What number of classes at the upper level have labs ? SELECT### Response: SELECT COUNT(DISTINCT course.course_id) FROM course INNER JOIN program_course ON program_course.course_id = course.course_id WHERE course.has_lab = 'Y' AND 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 flight_fare ( flight_id, fare_id ) 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 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 code_description ( code, description ) CREATE TABLE compartment_class ( compartment, class_type ) 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_leg ( flight_id, leg_number, leg_flight ) 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 state ( state_code, state_name, country_name ) CREATE TABLE equipment_sequence ( aircraft_code_sequence, aircraft_code ) 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 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 date_day ( month_number, day_number, year, 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 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 ) -- Using valid SQLite, answer the following questions for the tables provided above. -- please show me airfare of flight US 345 from BOSTON to PITTSBURGH 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 (((flight.airline_code = 'US') AND flight.flight_number = 345) AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'PITTSBURGH' AND flight.to_airport = AIRPORT_SERVICE_1.airport_code) AND CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'BOSTON' 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.
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 code_description ( code, 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 flight_leg ( flight_id, leg_number, leg_flight ) 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 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 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 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 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 food_service ( meal_code, meal_number, compartment, meal_description ) 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 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 airline ( airline_code, airline_name, note ) CREATE TABLE compartment_class ( compartment, class_type ) 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 ) -- Using valid SQLite, answer the following questions for the tables provided above. -- flights from CINCINNATI to DALLAS departing after 718 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.departure_time > 718 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.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE border_info ( state_name, border ) CREATE TABLE lake ( lake_name, area, state_name, 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 ) 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 mountain ( mountain_name, mountain_altitude, state_name, country_name ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how tall is mount mckinley SELECT### Response: SELECT highest_elevation FROM highlow WHERE highest_point = 'mount mckinley'.
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 time_zone ( time_zone_code, time_zone_name, hours_from_gmt ) CREATE TABLE airline ( airline_code, airline_name, note ) CREATE TABLE date_day ( month_number, day_number, year, day_name ) 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 flight_leg ( flight_id, leg_number, leg_flight ) CREATE TABLE code_description ( code, description ) 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 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 days ( days_code, day_name ) CREATE TABLE equipment_sequence ( aircraft_code_sequence, aircraft_code ) 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 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 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 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 flight_fare ( flight_id, fare_id ) -- Using valid SQLite, answer the following questions for the tables provided above. -- can you find out about the ground transportation available in ATLANTA SELECT### Response: SELECT DISTINCT ground_service.transport_type FROM city, ground_service WHERE city.city_name = 'ATLANTA' 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 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 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 code_description ( code, 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 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 date_day ( month_number, day_number, year, day_name ) CREATE TABLE flight_fare ( flight_id, fare_id ) 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 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 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 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 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 time_interval ( period, begin_time, end_time ) -- Using valid SQLite, answer the following questions for the tables provided above. -- give me the latest flight tomorrow on UA from MILWAUKEE to TACOMA 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 = 20 AND date_day.month_number = 1 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 = 'MILWAUKEE' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code) AND flight.airline_code = 'UA') AND flight.departure_time = (SELECT MAX(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 = 'TACOMA' AND DATE_DAYalias1.day_number = 20 AND DATE_DAYalias1.month_number = 1 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 = 'MILWAUKEE' AND FLIGHTalias1.from_airport = AIRPORT_SERVICEalias2.airport_code) AND FLIGHTalias1.airline_code = 'UA').
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_leg ( flight_id, leg_number, leg_flight ) CREATE TABLE dual_carrier ( main_airline, low_flight_number, high_flight_number, dual_airline, service_name ) 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 city ( city_code, city_name, state_code, country_name, time_zone_code ) CREATE TABLE airport_service ( city_code, airport_code, miles_distant, direction, minutes_distant ) CREATE TABLE equipment_sequence ( aircraft_code_sequence, aircraft_code ) CREATE TABLE month ( month_number, month_name ) 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 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 date_day ( month_number, day_number, year, 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 time_zone ( time_zone_code, time_zone_name, hours_from_gmt ) 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 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 fare_basis ( fare_basis_code, booking_class, class_type, premium, economy, discounted, night, season, basis_days ) CREATE TABLE compartment_class ( compartment, class_type ) CREATE TABLE airline ( airline_code, airline_name, note ) -- Using valid SQLite, answer the following questions for the tables provided above. -- i would like information for flights from BALTIMORE to DALLAS on early 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 ((CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'DALLAS' 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 flight.to_airport = AIRPORT_SERVICE_1.airport_code) AND CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'BALTIMORE' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code) AND flight.departure_time BETWEEN 0 AND 800.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE ta ( campus_job_id, student_id, location ) CREATE TABLE course_prerequisite ( pre_course_id, course_id ) CREATE TABLE program ( program_id, name, college, introduction ) CREATE TABLE instructor ( instructor_id, name, uniqname ) CREATE TABLE requirement ( requirement_id, requirement, college ) 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 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 program_requirement ( program_id, category, min_credit, additional_req ) 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 jobs ( job_id, job_title, description, requirement, city, state, country, zip ) CREATE TABLE gsi ( course_offering_id, student_id ) CREATE TABLE comment_instructor ( instructor_id, student_id, score, comment_text ) 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 offering_instructor ( offering_instructor_id, offering_id, instructor_id ) CREATE TABLE semester ( semester_id, semester, year ) -- Using valid SQLite, answer the following questions for the tables provided above. -- The 13 -credit CHEM classes are which ones ? SELECT### Response: SELECT DISTINCT name, number FROM course WHERE department = 'CHEM' AND credits = 13.
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 jobs ( job_id, job_title, description, requirement, city, state, country, zip ) CREATE TABLE program_course ( program_id, course_id, workload, category ) 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 comment_instructor ( instructor_id, student_id, score, comment_text ) CREATE TABLE program_requirement ( program_id, category, min_credit, additional_req ) CREATE TABLE semester ( semester_id, semester, year ) CREATE TABLE course_prerequisite ( pre_course_id, course_id ) CREATE TABLE offering_instructor ( offering_instructor_id, offering_id, instructor_id ) CREATE TABLE gsi ( course_offering_id, student_id ) CREATE TABLE area ( course_id, area ) 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 requirement ( requirement_id, requirement, college ) CREATE TABLE student_record ( student_id, course_id, semester, grade, how, transfer_source, earn_credit, repeat_term, test_id ) CREATE TABLE instructor ( instructor_id, name, uniqname ) 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. -- Are the classes in the upper-levels all worth 11 credits ? SELECT### Response: SELECT COUNT(*) = 0 FROM course, program_course WHERE course.credits <> 11 AND course.department = 'EECS' AND program_course.category LIKE '%ULCS%' 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 review ( rid, business_id, user_id, rating, text, year, month ) CREATE TABLE business ( bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state ) CREATE TABLE checkin ( cid, business_id, count, day ) CREATE TABLE neighborhood ( id, business_id, neighborhood_name ) CREATE TABLE tip ( tip_id, business_id, text, user_id, likes, year, month ) CREATE TABLE category ( id, business_id, category_name ) CREATE TABLE user ( uid, user_id, name ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many people reviewed the restaurant ' Texas de Brazil ' in Dallas Texas ? SELECT### Response: SELECT COUNT(DISTINCT (user.name)) FROM business, category, review, user WHERE business.city = 'Dallas' AND business.name = 'Texas de Brazil' AND business.state = 'Texas' AND category.business_id = business.business_id AND category.category_name = 'restaurant' AND review.business_id = business.business_id AND user.user_id = review.user_id.
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 program_course ( program_id, course_id, workload, category ) CREATE TABLE program ( program_id, name, college, introduction ) 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 jobs ( job_id, job_title, description, requirement, city, state, country, zip ) CREATE TABLE instructor ( instructor_id, name, uniqname ) CREATE TABLE offering_instructor ( offering_instructor_id, offering_id, instructor_id ) CREATE TABLE program_requirement ( program_id, category, min_credit, additional_req ) 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 area ( course_id, area ) CREATE TABLE requirement ( requirement_id, requirement, college ) 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_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 course_prerequisite ( pre_course_id, course_id ) CREATE TABLE gsi ( course_offering_id, student_id ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What classes will be offered in the next 6 semesters ? SELECT### Response: SELECT DISTINCT course.name, course.number, semester.semester, semester.year FROM course, course_offering, semester WHERE ((semester.semester = 'FA' AND semester.year = 2016) OR (semester.semester = 'FA' AND semester.year = 2017) OR (semester.semester = 'FA' AND semester.year = 2018) OR (semester.semester = 'WN' AND semester.year = 2017) OR (semester.semester = 'WN' AND semester.year = 2018) OR (semester.semester = 'WN' AND semester.year = 2019)) AND course.course_id = course_offering.course_id AND course.department = 'EECS' AND semester.semester_id = course_offering.semester ORDER BY semester.year, semester.semester.
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 instructor ( instructor_id, name, uniqname ) CREATE TABLE area ( course_id, area ) CREATE TABLE semester ( semester_id, semester, year ) CREATE TABLE program ( program_id, name, college, introduction ) CREATE TABLE comment_instructor ( instructor_id, student_id, score, comment_text ) 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 ) 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 program_requirement ( program_id, category, min_credit, additional_req ) CREATE TABLE course_prerequisite ( pre_course_id, course_id ) CREATE TABLE jobs ( job_id, job_title, description, requirement, city, state, country, zip ) CREATE TABLE ta ( campus_job_id, student_id, location ) 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 requirement ( requirement_id, requirement, college ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Of the courses I 've taken , are any Core courses ? SELECT### Response: SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN student_record ON student_record.course_id = course.course_id INNER JOIN program_course ON student_record.course_id = program_course.course_id WHERE program_course.category LIKE '%Core%' AND student_record.student_id = 1.
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 program_requirement ( program_id, category, min_credit, additional_req ) CREATE TABLE semester ( semester_id, semester, year ) 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 comment_instructor ( instructor_id, student_id, score, comment_text ) CREATE TABLE program_course ( program_id, course_id, workload, category ) 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 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 instructor ( instructor_id, name, uniqname ) CREATE TABLE area ( course_id, area ) CREATE TABLE jobs ( job_id, job_title, description, requirement, city, state, country, zip ) CREATE TABLE course_prerequisite ( pre_course_id, course_id ) CREATE TABLE ta ( campus_job_id, student_id, location ) CREATE TABLE requirement ( requirement_id, requirement, college ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which class is the easiest I can take to the fulfill 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 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 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 airline ( airline_code, airline_name, note ) CREATE TABLE code_description ( code, description ) CREATE TABLE food_service ( meal_code, meal_number, compartment, meal_description ) CREATE TABLE days ( days_code, day_name ) CREATE TABLE class_of_service ( booking_class, rank, class_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 ground_service ( city_code, airport_code, transport_type, ground_fare ) CREATE TABLE time_interval ( period, begin_time, end_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 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 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 dual_carrier ( main_airline, low_flight_number, high_flight_number, dual_airline, service_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 state ( state_code, state_name, country_name ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how much does a FIRST class ticket cost from BOSTON to SAN FRANCISCO round trip 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, fare_basis, 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 = 'SAN FRANCISCO' AND NOT fare.round_trip_cost IS NULL 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) AND fare_basis.class_type = 'FIRST' AND fare.fare_basis_code = fare_basis.fare_basis_code.
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 airline ( airline_code, airline_name, note ) CREATE TABLE class_of_service ( booking_class, rank, class_description ) 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 airport_service ( city_code, airport_code, miles_distant, direction, minutes_distant ) 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 ground_service ( city_code, airport_code, transport_type, ground_fare ) CREATE TABLE flight_leg ( flight_id, leg_number, leg_flight ) 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 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 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 date_day ( month_number, day_number, year, day_name ) CREATE TABLE compartment_class ( compartment, class_type ) CREATE TABLE time_zone ( time_zone_code, time_zone_name, hours_from_gmt ) 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 days ( days_code, day_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 month ( month_number, month_name ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the schedule of flights from BOSTON to DENVER next monday SELECT### Response: SELECT DISTINCT FLIGHT_0.arrival_time, FLIGHT_0.departure_time 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 AS FLIGHT_0, flight AS FLIGHT_1, flight_leg WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'DENVER' 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_1.flight_days = days.days_code AND FLIGHT_1.to_airport = AIRPORT_SERVICE_1.airport_code) AND CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'BOSTON' AND FLIGHT_0.flight_id = flight_leg.leg_flight AND FLIGHT_1.flight_id = flight_leg.flight_id AND FLIGHT_1.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 month ( month_number, month_name ) CREATE TABLE food_service ( meal_code, meal_number, compartment, meal_description ) 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 flight_fare ( flight_id, fare_id ) CREATE TABLE compartment_class ( compartment, class_type ) CREATE TABLE class_of_service ( booking_class, rank, class_description ) CREATE TABLE airline ( airline_code, airline_name, note ) CREATE TABLE fare_basis ( fare_basis_code, booking_class, class_type, premium, economy, discounted, night, season, basis_days ) CREATE TABLE dual_carrier ( main_airline, low_flight_number, high_flight_number, dual_airline, service_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_leg ( flight_id, leg_number, leg_flight ) 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 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 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 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 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 ) -- Using valid SQLite, answer the following questions for the tables provided above. -- i'd like also to book a one way flight from PITTSBURGH to ATLANTA the cheapest one on 7 20 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, fare, flight, flight_fare WHERE ((CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'ATLANTA' AND date_day.day_number = 20 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 = 'PITTSBURGH' AND flight.from_airport = AIRPORT_SERVICE_0.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, date_day AS DATE_DAYalias1, days AS DAYSalias1, fare AS FAREalias1, flight AS FLIGHTalias1, flight_fare AS FLIGHT_FAREalias1 WHERE (CITYalias3.city_code = AIRPORT_SERVICEalias3.city_code AND CITYalias3.city_name = 'ATLANTA' AND DATE_DAYalias1.day_number = 20 AND DATE_DAYalias1.month_number = 7 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 = 'PITTSBURGH' AND FAREalias1.round_trip_required = 'NO' 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 fare.round_trip_required = 'NO' 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 offering_instructor ( offering_instructor_id, offering_id, instructor_id ) CREATE TABLE course_prerequisite ( pre_course_id, course_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 jobs ( job_id, job_title, description, requirement, city, state, country, zip ) CREATE TABLE program ( program_id, name, college, introduction ) CREATE TABLE semester ( semester_id, semester, year ) CREATE TABLE gsi ( course_offering_id, student_id ) CREATE TABLE program_course ( program_id, course_id, workload, category ) CREATE TABLE area ( course_id, area ) CREATE TABLE instructor ( instructor_id, name, uniqname ) 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 requirement ( requirement_id, requirement, college ) 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 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. -- What is the number of courses that are taught by 3 or more professors ? SELECT### Response: SELECT COUNT(DISTINCT course_offering.course_id) FROM course, course_offering, offering_instructor AS OFFERING_INSTRUCTOR_0, offering_instructor AS OFFERING_INSTRUCTOR_1, offering_instructor AS OFFERING_INSTRUCTOR_2 WHERE course.course_id = course_offering.course_id AND course.department = 'EECS' AND OFFERING_INSTRUCTOR_0.instructor_id < OFFERING_INSTRUCTOR_1.instructor_id AND OFFERING_INSTRUCTOR_0.offering_id = course_offering.offering_id AND OFFERING_INSTRUCTOR_1.instructor_id < OFFERING_INSTRUCTOR_2.instructor_id AND OFFERING_INSTRUCTOR_1.offering_id = OFFERING_INSTRUCTOR_0.offering_id AND OFFERING_INSTRUCTOR_2.offering_id = OFFERING_INSTRUCTOR_0.offering_id.
Below is an instruction that describes a task. Write a MySQL query that appropriately completes the request. ### Instruction: CREATE TABLE paperdataset ( paperid, datasetid ) CREATE TABLE field ( fieldid ) CREATE TABLE cite ( citingpaperid, citedpaperid ) CREATE TABLE paperkeyphrase ( paperid, keyphraseid ) CREATE TABLE paper ( paperid, title, venueid, year, numciting, numcitedby, journalid ) CREATE TABLE keyphrase ( keyphraseid, keyphrasename ) CREATE TABLE dataset ( datasetid, datasetname ) CREATE TABLE paperfield ( fieldid, paperid ) CREATE TABLE journal ( journalid, journalname ) CREATE TABLE author ( authorid, authorname ) CREATE TABLE venue ( venueid, venuename ) CREATE TABLE writes ( paperid, authorid ) -- Using valid SQLite, answer the following questions for the tables provided above. -- papers coauthored by X Jiang and Frantzen SELECT### Response: SELECT DISTINCT WRITES_0.paperid FROM author AS AUTHOR_0, author AS AUTHOR_1, writes AS WRITES_0, writes AS WRITES_1 WHERE AUTHOR_0.authorname = 'X Jiang' AND AUTHOR_1.authorname = 'Frantzen' AND WRITES_0.authorid = AUTHOR_0.authorid AND WRITES_1.authorid = AUTHOR_1.authorid AND WRITES_1.paperid = WRITES_0.paperid.
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 restaurant ( id, name, food_type, city_name, rating ) CREATE TABLE geographic ( city_name, county, region ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the best french in san francisco ? SELECT### Response: SELECT location.house_number, restaurant.name FROM location, restaurant WHERE location.city_name = 'san francisco' AND restaurant.food_type = 'french' AND restaurant.id = location.restaurant_id AND restaurant.rating = (SELECT MAX(RESTAURANTalias1.rating) FROM location AS LOCATIONalias1, restaurant AS RESTAURANTalias1 WHERE LOCATIONalias1.city_name = 'san francisco' AND RESTAURANTalias1.food_type = 'french' AND RESTAURANTalias1.id = LOCATIONalias1.restaurant_id).
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 comment_instructor ( instructor_id, student_id, score, comment_text ) CREATE TABLE offering_instructor ( offering_instructor_id, offering_id, instructor_id ) CREATE TABLE program_course ( program_id, course_id, workload, category ) CREATE TABLE program ( program_id, name, college, introduction ) CREATE TABLE ta ( campus_job_id, student_id, location ) CREATE TABLE program_requirement ( program_id, category, min_credit, additional_req ) 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 instructor ( instructor_id, name, uniqname ) 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 semester ( semester_id, semester, year ) 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 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 ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the easiest class I can take to get the ULCS requirement met ? 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 '%ULCS%' 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 '%ULCS%').
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 comment_instructor ( instructor_id, student_id, score, comment_text ) CREATE TABLE ta ( campus_job_id, student_id, location ) CREATE TABLE offering_instructor ( offering_instructor_id, offering_id, instructor_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 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 course_prerequisite ( pre_course_id, course_id ) CREATE TABLE program_course ( program_id, course_id, workload, category ) CREATE TABLE requirement ( requirement_id, requirement, college ) CREATE TABLE area ( course_id, area ) 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 student_record ( student_id, course_id, semester, grade, how, transfer_source, earn_credit, repeat_term, test_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 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 ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What classes can be used for PreMajor ? SELECT### Response: SELECT DISTINCT course.department, course.name, course.number FROM course, program_course WHERE 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 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 instructor ( instructor_id, name, uniqname ) 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 program_course ( program_id, course_id, workload, category ) CREATE TABLE area ( course_id, area ) CREATE TABLE jobs ( job_id, job_title, description, requirement, city, state, country, zip ) CREATE TABLE comment_instructor ( instructor_id, student_id, score, comment_text ) CREATE TABLE semester ( semester_id, semester, year ) 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 ta ( campus_job_id, student_id, location ) CREATE TABLE gsi ( course_offering_id, student_id ) CREATE TABLE course_prerequisite ( pre_course_id, course_id ) 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 program_requirement ( program_id, category, min_credit, additional_req ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Of all the courses which one can I take in the Fall or Winter semester to satisfy my MDE requirement ? SELECT### Response: SELECT DISTINCT COURSEalias0.department, COURSEalias0.name, COURSEalias0.number, SEMESTERalias0.semester FROM (SELECT course_id FROM student_record WHERE earn_credit = 'Y' AND student_id = 1) AS DERIVED_TABLEalias0, course AS COURSEalias0, course_offering AS COURSE_OFFERINGalias0, program_course AS PROGRAM_COURSEalias0, semester AS SEMESTERalias0 WHERE COURSEalias0.course_id = COURSE_OFFERINGalias0.course_id AND NOT COURSEalias0.course_id IN (DERIVED_TABLEalias0.course_id) AND NOT COURSEalias0.course_id IN (SELECT DISTINCT COURSE_PREREQUISITEalias0.course_id FROM course_prerequisite AS COURSE_PREREQUISITEalias0 WHERE NOT COURSE_PREREQUISITEalias0.pre_course_id IN (DERIVED_TABLEalias0.course_id)) AND COURSEalias0.department = 'department0' AND PROGRAM_COURSEalias0.category LIKE '%MDE%' AND PROGRAM_COURSEalias0.course_id = COURSE_OFFERINGalias0.course_id AND SEMESTERalias0.semester IN ('FA', 'WN') AND SEMESTERalias0.semester_id = COURSE_OFFERINGalias0.semester AND SEMESTERalias0.year = 2016.
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 student_record ( student_id, course_id, semester, grade, how, transfer_source, earn_credit, repeat_term, test_id ) CREATE TABLE instructor ( instructor_id, name, uniqname ) 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 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 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 ( program_id, name, college, introduction ) CREATE TABLE offering_instructor ( offering_instructor_id, offering_id, instructor_id ) CREATE TABLE program_course ( program_id, course_id, workload, category ) 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_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 semester ( semester_id, semester, year ) 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 is the easiest class which fulfill 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%').