conversations
listlengths
2
2
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "human", "value": "Given the following schema:\nroad (road_name, state_name)\nstate (state_name, capital, population, area, country_name, density)\nhighlow (state_name, highest_point, highest_elevation, lowest_point, lowest_elevation)\nlake (lake_name, area, state_name, country_name)\nriver (river...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\nflight (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)\nairline (airline_code, airline_na...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\nfare (fare_id, from_airport, to_airport, fare_basis_code, fare_airline, restriction_code, one_direction_cost, round_trip_cost, round_trip_required)\nfare_basis (fare_basis_code, booking_class, class_type, premium, economy, discounted, night, season, ...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\nStudent (StuID, LName, Fname, Age, Sex, Major, Advisor, city_code)\nFaculty (FacID, Lname, Fname, Rank, Sex, Phone, Room, Building)\nFaculty_Participates_in (FacID, actid)\nParticipates_in (stuid, actid)\nActivity (actid, activity_name)\nWrite a SQL ...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\ngenre (g_name, rating, most_popular_in)\nsong (song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution)\nartist (artist_name, country, gender, preferred_genre)\nfiles (f_id, artist_name, file_size, duration, format...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\nclass_of_service (booking_class, rank, class_description)\ndays (days_code, day_name)\nairport_service (city_code, airport_code, miles_distant, direction, minutes_distant)\nfare (fare_id, from_airport, to_airport, fare_basis_code, fare_airline, restr...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\nwine (No, Grape, Winery, Appelation, State, Name, Year, Price, Score, Cases, Drink)\nappellations (No, Appelation, County, State, Area, isAVA)\ngrapes (ID, Grape, Color)\nWrite a SQL query to what are the names of wines made from red grapes and with ...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\nhost (Host_ID, Name, Nationality, Age)\nparty (Party_ID, Party_Theme, Location, First_year, Last_year, Number_of_hosts)\nparty_host (Party_ID, Host_ID, Is_Main_in_Charge)\nWrite a SQL query to what is the average number of hosts for parties?" }, ...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\naircraft (aircraft_code, aircraft_description, manufacturer, basic_type, engines, propulsion, wide_body, wing_span, length, weight, capacity, pay_load, cruising_speed, range_miles, pressurized)\ncompartment_class (compartment, class_type)\ntime_zone ...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\ncourse_prerequisite (pre_course_id, course_id)\noffering_instructor (offering_instructor_id, offering_id, instructor_id)\ngsi (course_offering_id, student_id)\nstudent_record (student_id, course_id, semester, grade, how, transfer_source, earn_credit,...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\nairline (airline_code, airline_name, note)\nfare_basis (fare_basis_code, booking_class, class_type, premium, economy, discounted, night, season, basis_days)\nflight_fare (flight_id, fare_id)\nfood_service (meal_code, meal_number, compartment, meal_de...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\npaperfield (fieldid, paperid)\nwrites (paperid, authorid)\nkeyphrase (keyphraseid, keyphrasename)\ncite (citingpaperid, citedpaperid)\njournal (journalid, journalname)\nvenue (venueid, venuename)\npaper (paperid, title, venueid, year, numciting, numc...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\nvenue (venueId, venueName)\nkeyphrase (keyphraseId, keyphraseName)\ncite (citingPaperId, citedPaperId)\npaper (paperId, title, venueId, year, numCiting, numCitedBy, journalId)\npaperKeyphrase (paperId, keyphraseId)\ndataset (datasetId, datasetName)\n...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\naircraft (aircraft_code, aircraft_description, manufacturer, basic_type, engines, propulsion, wide_body, wing_span, length, weight, capacity, pay_load, cruising_speed, range_miles, pressurized)\ndays (days_code, day_name)\nflight_fare (flight_id, far...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\nflight (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)\nfare_basis (fare_basis_code, book...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\narea (course_id, area)\nprogram_requirement (program_id, category, min_credit, additional_req)\ncomment_instructor (instructor_id, student_id, score, comment_text)\nsemester (semester_id, semester, year)\ninstructor (instructor_id, name, uniqname)\np...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\nriver (river_name, length, traverse, country_name)\ncity (city_name, state_name, population, country_name)\nstate (state_name, capital, population, area, country_name, density)\nmountain (mountain_name, mountain_altitude, state_name, country_name)\nh...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\nrestriction (restriction_code, advance_purchase, stopovers, saturday_stay_required, minimum_stay, maximum_stay, application, no_discounts)\nmonth (month_number, month_name)\nfood_service (meal_code, meal_number, compartment, meal_description)\nflight...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\nClaims_Processing (Claim_Processing_ID, Claim_ID, Claim_Outcome_Code, Claim_Stage_ID, Staff_ID)\nStaff (Staff_ID, Staff_Details)\nClaims_Documents (Claim_ID, Document_Type_Code, Created_by_Staff_ID, Created_Date)\nPolicies (Policy_ID, Customer_ID, Po...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\naircraft (aircraft_code, aircraft_description, manufacturer, basic_type, engines, propulsion, wide_body, wing_span, length, weight, capacity, pay_load, cruising_speed, range_miles, pressurized)\ndual_carrier (main_airline, low_flight_number, high_fli...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\nstudent (student_id, lastname, firstname, program_id, declare_major, total_credit, total_gpa, entered_as, admit_term, predicted_graduation_semester, degree, minor, internship)\ncourse (course_id, name, department, number, credits, advisory_requiremen...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\nstation (id, name, lat, long, dock_count, city, installation_date)\nweather (date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\ntime_interval (period, begin_time, end_time)\nmonth (month_number, month_name)\ncompartment_class (compartment, class_type)\nfare (fare_id, from_airport, to_airport, fare_basis_code, fare_airline, restriction_code, one_direction_cost, round_trip_cost...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\nInvoices (invoice_number, invoice_date, invoice_details)\nProducts (product_id, product_name, product_details)\nOrder_Items (order_item_id, product_id, order_id, order_item_status, order_item_details)\nShipment_Items (shipment_id, order_item_id)\nShi...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\nriver (river_name, length, country_name, traverse)\nstate (state_name, population, area, country_name, capital, density)\nlake (lake_name, area, country_name, state_name)\nmountain (mountain_name, mountain_altitude, country_name, state_name)\nborder_...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\nbank (branch_ID, bname, no_of_customers, city, state)\nloan (loan_ID, loan_type, cust_ID, branch_ID, amount)\ncustomer (cust_ID, cust_name, acc_type, acc_bal, no_of_loans, credit_score, branch_ID, state)\nWrite a SQL query to what is the total amount...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\nStudent (StuID, LName, Fname, Age, Sex, Major, Advisor, city_code)\nActivity (actid, activity_name)\nFaculty (FacID, Lname, Fname, Rank, Sex, Phone, Room, Building)\nParticipates_in (stuid, actid)\nFaculty_Participates_in (FacID, actid)\nWrite a SQL ...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\nDorm (dormid, dorm_name, student_capacity, gender)\nStudent (StuID, LName, Fname, Age, Sex, Major, Advisor, city_code)\nDorm_amenity (amenid, amenity_name)\nLives_in (stuid, dormid, room_number)\nHas_amenity (dormid, amenid)\nWrite a SQL query to wha...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\nfare (fare_id, from_airport, to_airport, fare_basis_code, fare_airline, restriction_code, one_direction_cost, round_trip_cost, round_trip_required)\nfare_basis (fare_basis_code, booking_class, class_type, premium, economy, discounted, night, season, ...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\nflight (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)\nstate (state_code, state_name, co...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\nlocation (restaurant_id, house_number, street_name, city_name)\nrestaurant (id, name, food_type, city_name, rating)\ngeographic (city_name, county, region)\nWrite a SQL query to give me some good arabic -s on buchanan in san francisco ?" }, { ...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\nstate (state_code, state_name, country_name)\nfood_service (meal_code, meal_number, compartment, meal_description)\nfare_basis (fare_basis_code, booking_class, class_type, premium, economy, discounted, night, season, basis_days)\ncity (city_code, cit...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\nairport (airport_code, airport_name, airport_location, state_code, country_name, time_zone_code, minimum_connect_time)\ndate_day (month_number, day_number, year, day_name)\nclass_of_service (booking_class, rank, class_description)\ntime_interval (per...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\nflight_fare (flight_id, fare_id)\nclass_of_service (booking_class, rank, class_description)\nairport (airport_code, airport_name, airport_location, state_code, country_name, time_zone_code, minimum_connect_time)\nflight (aircraft_code_sequence, airli...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\ntime_interval (period, begin_time, end_time)\ntime_zone (time_zone_code, time_zone_name, hours_from_gmt)\nairport_service (city_code, airport_code, miles_distant, direction, minutes_distant)\nairline (airline_code, airline_name, note)\nclass_of_servi...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\nlake (lake_name, area, country_name, state_name)\nstate (state_name, population, area, country_name, capital, density)\nriver (river_name, length, country_name, traverse)\ncity (city_name, population, country_name, state_name)\nhighlow (state_name, h...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\nAddresses (address_id, line_1_number_building, city, zip_postcode, state_province_county, country)\nCustomer_Payments (customer_id, datetime_payment, payment_method_code, amount_payment)\nLessons (lesson_id, customer_id, lesson_status_code, staff_id,...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\ndate_day (month_number, day_number, year, day_name)\nflight_leg (flight_id, leg_number, leg_flight)\naircraft (aircraft_code, aircraft_description, manufacturer, basic_type, engines, propulsion, wide_body, wing_span, length, weight, capacity, pay_loa...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\nvenue (venueId, venueName)\npaperKeyphrase (paperId, keyphraseId)\npaperDataset (paperId, datasetId)\nauthor (authorId, authorName)\nkeyphrase (keyphraseId, keyphraseName)\nwrites (paperId, authorId)\njournal (journalId, journalName)\npaper (paperId,...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\ntrack (Track_ID, Name, Location, Seating, Year_Opened)\nrace (Race_ID, Name, Class, Date, Track_ID)\nWrite a SQL query to count the number of tracks." }, { "from": "gpt", "value": "SELECT COUNT( * ) FROM track ;" } ]
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\nenroll (CLASS_CODE, STU_NUM, ENROLL_GRADE)\nclass (CLASS_CODE, CRS_CODE, CLASS_SECTION, CLASS_TIME, CLASS_ROOM, PROF_NUM)\nstudent (STU_NUM, STU_LNAME, STU_FNAME, STU_INIT, STU_DOB, STU_HRS, STU_CLASS, STU_GPA, STU_TRANSFER, DEPT_CODE, STU_PHONE, PRO...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\nCustomer_Policies (Policy_ID, Customer_ID, Policy_Type_Code, Start_Date, End_Date)\nCustomers (Customer_ID, Customer_Details)\nSettlements (Settlement_ID, Claim_ID, Date_Claim_Made, Date_Claim_Settled, Amount_Claimed, Amount_Settled, Customer_Policy_...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\ncompartment_class (compartment, class_type)\ncode_description (code, description)\nairline (airline_code, airline_name, note)\naircraft (aircraft_code, aircraft_description, manufacturer, basic_type, engines, propulsion, wide_body, wing_span, length,...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\nfare_basis (fare_basis_code, booking_class, class_type, premium, economy, discounted, night, season, basis_days)\ndual_carrier (main_airline, low_flight_number, high_flight_number, dual_airline, service_name)\nrestriction (restriction_code, advance_p...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\nfare (fare_id, from_airport, to_airport, fare_basis_code, fare_airline, restriction_code, one_direction_cost, round_trip_cost, round_trip_required)\nstate (state_code, state_name, country_name)\nflight_leg (flight_id, leg_number, leg_flight)\ndual_ca...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\ndays (days_code, day_name)\naircraft (aircraft_code, aircraft_description, manufacturer, basic_type, engines, propulsion, wide_body, wing_span, length, weight, capacity, pay_load, cruising_speed, range_miles, pressurized)\nrestriction (restriction_co...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\nmountain (mountain_name, mountain_altitude, country_name, state_name)\nhighlow (state_name, highest_elevation, lowest_point, highest_point, lowest_elevation)\nriver (river_name, length, country_name, traverse)\nborder_info (state_name, border)\ncity ...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\nmonth (month_number, month_name)\ndual_carrier (main_airline, low_flight_number, high_flight_number, dual_airline, service_name)\naircraft (aircraft_code, aircraft_description, manufacturer, basic_type, engines, propulsion, wide_body, wing_span, leng...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\ncourse (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_scor...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\nprogram_course (program_id, course_id, workload, category)\ncourse (course_id, name, department, number, credits, advisory_requirement, enforced_requirement, description, num_semesters, num_enrolled, has_discussion, has_lab, has_projects, has_exams, ...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\nactor (Actor_ID, Name, Musical_ID, Character, Duration, age)\nmusical (Musical_ID, Name, Year, Award, Category, Nominee, Result)\nWrite a SQL query to how many musicals has each nominee been nominated for?" }, { "from": "gpt", "value": "S...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\nstadium (id, name, Home_Games, Average_Attendance, Total_Attendance, Capacity_Percentage)\ngame (stadium_id, id, Season, Date, Home_team, Away_team, Score, Competition)\ninjury_accident (game_id, id, Player, Injury, Number_of_matches, Source)\nWrite ...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\nmountain (id, name, Height, Prominence, Range, Country)\nphotos (id, camera_lens_id, mountain_id, color, name)\ncamera_lens (id, brand, name, focal_length_mm, max_aperture)\nWrite a SQL query to how many different kinds of lens brands are there?" }...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\nRooms (RoomId, roomName, beds, bedType, maxOccupancy, basePrice, decor)\nReservations (Code, Room, CheckIn, CheckOut, Rate, LastName, FirstName, Adults, Kids)\nWrite a SQL query to what are the names of modern rooms that have a base price lower than ...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\nground_service (city_code, airport_code, transport_type, ground_fare)\ntime_zone (time_zone_code, time_zone_name, hours_from_gmt)\nequipment_sequence (aircraft_code_sequence, aircraft_code)\nclass_of_service (booking_class, rank, class_description)\n...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\ncourse_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)\nsemester (semester_id, ...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\nProducts (Code, Name, Price, Manufacturer)\nManufacturers (Code, Name, Headquarter, Founder, Revenue)\nWrite a SQL query to what is the headquarter of the company whose founder is James?" }, { "from": "gpt", "value": "SELECT headquarter F...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\ncopyright (id, msid, cid)\nmovie (mid, title, release_year, title_aka, budget)\ndirected_by (id, msid, did)\nclassification (id, msid, gid)\ncast (id, msid, aid, role)\nmade_by (id, msid, pid)\ngenre (gid, genre)\nproducer (pid, gender, name, nationa...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\nVehicles (vehicle_id, vehicle_details)\nAddresses (address_id, line_1_number_building, city, zip_postcode, state_province_county, country)\nCustomers (customer_id, customer_address_id, customer_status_code, date_became_customer, date_of_birth, first_...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\nhighlow (state_name, highest_elevation, lowest_point, highest_point, lowest_elevation)\nborder_info (state_name, border)\nstate (state_name, population, area, country_name, capital, density)\nlake (lake_name, area, country_name, state_name)\nmountain...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\nground_service (city_code, airport_code, transport_type, ground_fare)\nclass_of_service (booking_class, rank, class_description)\ntime_interval (period, begin_time, end_time)\ndual_carrier (main_airline, low_flight_number, high_flight_number, dual_ai...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\ngeographic (CITY_NAME, COUNTY, REGION)\nrestaurant (ID, NAME, FOOD_TYPE, CITY_NAME, RATING)\nlocation (RESTAURANT_ID, HOUSE_NUMBER, STREET_NAME, CITY_NAME)\nWrite a SQL query to what are some good places in mountain view for arabic food ?" }, { ...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\nParty_Services (booking_id, customer_id, service_id, service_datetime, booking_made_date)\nParty_Addresses (party_id, address_id, date_address_from, address_type_code, date_address_to)\nOrganizations (organization_id, date_formed, organization_name, ...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\nrestriction (restriction_code, advance_purchase, stopovers, saturday_stay_required, minimum_stay, maximum_stay, application, no_discounts)\ncompartment_class (compartment, class_type)\nfood_service (meal_code, meal_number, compartment, meal_descripti...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\nmonth (month_number, month_name)\nflight_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)\nflight_fare (flight_id, fare...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\nschool_details (School_ID, Nickname, Colors, League, Class, Division)\nschool (School_ID, School, Location, Enrollment, Founded, Denomination, Boys_or_Girls, Day_or_Boarding, Year_Entered_Competition, School_Colors)\nschool_performance (School_Id, Sc...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\nGuests (guest_id, gender_code, guest_first_name, guest_last_name, date_of_birth)\nView_Unit_Status (apt_id, apt_booking_id, status_date, available_yn)\nApartment_Bookings (apt_booking_id, apt_id, guest_id, booking_status_code, booking_start_date, boo...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\nta (campus_job_id, student_id, location)\ninstructor (instructor_id, name, uniqname)\narea (course_id, area)\ncourse (course_id, name, department, number, credits, advisory_requirement, enforced_requirement, description, num_semesters, num_enrolled, ...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\nprogram (program_id, name, college, introduction)\ncourse (course_id, name, department, number, credits, advisory_requirement, enforced_requirement, description, num_semesters, num_enrolled, has_discussion, has_lab, has_projects, has_exams, num_revie...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\ntime_zone (time_zone_code, time_zone_name, hours_from_gmt)\nequipment_sequence (aircraft_code_sequence, aircraft_code)\ndual_carrier (main_airline, low_flight_number, high_flight_number, dual_airline, service_name)\nrestriction (restriction_code, adv...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\ncode_description (code, description)\nclass_of_service (booking_class, rank, class_description)\nairport_service (city_code, airport_code, miles_distant, direction, minutes_distant)\nfare_basis (fare_basis_code, booking_class, class_type, premium, ec...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\ndataset (datasetid, datasetname)\npaperfield (fieldid, paperid)\ncite (citingpaperid, citedpaperid)\nfield (fieldid)\npaperkeyphrase (paperid, keyphraseid)\njournal (journalid, journalname)\npaperdataset (paperid, datasetid)\npaper (paperid, title, v...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\nsavings (custid, balance)\nchecking (custid, balance)\naccounts (custid, name)\nWrite a SQL query to what are the names and balances of checking accounts belonging to the customer with the lowest savings balance?" }, { "from": "gpt", "val...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\nborder_info (state_name, border)\nlake (lake_name, area, country_name, state_name)\nriver (river_name, length, country_name, traverse)\nmountain (mountain_name, mountain_altitude, country_name, state_name)\nstate (state_name, population, area, countr...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\nloan (loan_ID, loan_type, cust_ID, branch_ID, amount)\ncustomer (cust_ID, cust_name, acc_type, acc_bal, no_of_loans, credit_score, branch_ID, state)\nbank (branch_ID, bname, no_of_customers, city, state)\nWrite a SQL query to what is the name of the ...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\ncite (citingpaperid, citedpaperid)\ndataset (datasetid, datasetname)\nfield (fieldid)\nkeyphrase (keyphraseid, keyphrasename)\nwrites (paperid, authorid)\npaperfield (fieldid, paperid)\njournal (journalid, journalname)\nvenue (venueid, venuename)\npa...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\ncounty (County_Id, County_name, Population, Zip_code)\nelection (Election_ID, Counties_Represented, District, Delegate, Party, First_Elected, Committee)\nparty (Party_ID, Year, Party, Governor, Lieutenant_Governor, Comptroller, Attorney_General, US_S...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\nFaculty (FacID, Lname, Fname, Rank, Sex, Phone, Room, Building)\nStudent (StuID, LName, Fname, Age, Sex, Major, Advisor, city_code)\nFaculty_Participates_in (FacID, actid)\nParticipates_in (stuid, actid)\nActivity (actid, activity_name)\nWrite a SQL ...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\nflight_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)\nfare (fare_id, from_airport, to_airport, fare_basis_code, fare...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\nground_service (city_code, airport_code, transport_type, ground_fare)\ncity (city_code, city_name, state_code, country_name, time_zone_code)\ncompartment_class (compartment, class_type)\nairport (airport_code, airport_name, airport_location, state_co...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\nperpetrator (Perpetrator_ID, People_ID, Date, Year, Location, Country, Killed, Injured)\npeople (People_ID, Name, Height, Weight, Home Town)\nWrite a SQL query to list the date of perpetrators in descending order of the number of people killed." },...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\ncategory (category_id, name, last_update)\ncustomer (customer_id, store_id, first_name, last_name, email, address_id, active, create_date, last_update)\ninventory (inventory_id, film_id, store_id, last_update)\npayment (payment_id, customer_id, staff...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\nfiles (f_id, artist_name, file_size, duration, formats)\nsong (song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution)\nartist (artist_name, country, gender, preferred_genre)\ngenre (g_name, rating, most_popular_i...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\nairport (airport_code, airport_name, airport_location, state_code, country_name, time_zone_code, minimum_connect_time)\naircraft (aircraft_code, aircraft_description, manufacturer, basic_type, engines, propulsion, wide_body, wing_span, length, weight...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\noffering_instructor (offering_instructor_id, offering_id, instructor_id)\nprogram (program_id, name, college, introduction)\nta (campus_job_id, student_id, location)\ninstructor (instructor_id, name, uniqname)\ncourse_offering (offering_id, course_id...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\nScientists (SSN, Name)\nAssignedTo (Scientist, Project)\nProjects (Code, Name, Hours)\nWrite a SQL query to list all the scientists' names, their projects' names, and the hours worked by that scientist on each project, in alphabetical order of projec...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\ntakes (ID, course_id, sec_id, semester, year, grade)\nstudent (ID, name, dept_name, tot_cred)\nclassroom (building, room_number, capacity)\nsection (course_id, sec_id, semester, year, building, room_number, time_slot_id)\ninstructor (ID, name, dept_n...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\ncounty (County_Id, County_name, Population, Zip_code)\nelection (Election_ID, Counties_Represented, District, Delegate, Party, First_Elected, Committee)\nparty (Party_ID, Year, Party, Governor, Lieutenant_Governor, Comptroller, Attorney_General, US_S...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\nmountain (Mountain_ID, Name, Height, Prominence, Range, Country)\nclimber (Climber_ID, Name, Country, Time, Points, Mountain_ID)\nWrite a SQL query to list the countries that have more than one mountain." }, { "from": "gpt", "value": "SEL...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\ntime_interval (period, begin_time, end_time)\ncity (city_code, city_name, state_code, country_name, time_zone_code)\nmonth (month_number, month_name)\nairport (airport_code, airport_name, airport_location, state_code, country_name, time_zone_code, mi...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\nwrites (paperId, authorId)\npaperDataset (paperId, datasetId)\nauthor (authorId, authorName)\nkeyphrase (keyphraseId, keyphraseName)\npaper (paperId, title, venueId, year, numCiting, numCitedBy, journalId)\npaperKeyphrase (paperId, keyphraseId)\nvenu...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\nborder_info (state_name, border)\nstate (state_name, population, area, country_name, capital, density)\nmountain (mountain_name, mountain_altitude, country_name, state_name)\nriver (river_name, length, country_name, traverse)\nlake (lake_name, area, ...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\ncite (citingpaperid, citedpaperid)\npaperdataset (paperid, datasetid)\nkeyphrase (keyphraseid, keyphrasename)\njournal (journalid, journalname)\nvenue (venueid, venuename)\nwrites (paperid, authorid)\npaper (paperid, title, venueid, year, numciting, ...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\ncourse_prerequisite (pre_course_id, course_id)\njobs (job_id, job_title, description, requirement, city, state, country, zip)\nta (campus_job_id, student_id, location)\nprogram_requirement (program_id, category, min_credit, additional_req)\ngsi (cour...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\ncounty (County_Id, County_name, Population, Zip_code)\nparty (Party_ID, Year, Party, Governor, Lieutenant_Governor, Comptroller, Attorney_General, US_Senate)\nelection (Election_ID, Counties_Represented, District, Delegate, Party, First_Elected, Comm...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\nflight_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)\nflight (aircraft_code_sequence, airline_code, airline_flight, ...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\nflight_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)\nground_service (city_code, airport_code, transport_type, groun...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\nclass_of_service (booking_class, rank, class_description)\ncompartment_class (compartment, class_type)\nrestriction (restriction_code, advance_purchase, stopovers, saturday_stay_required, minimum_stay, maximum_stay, application, no_discounts)\nequipm...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\nclass_of_service (booking_class, rank, class_description)\nflight_fare (flight_id, fare_id)\nairport_service (city_code, airport_code, miles_distant, direction, minutes_distant)\nequipment_sequence (aircraft_code_sequence, aircraft_code)\ncode_descri...
processed_unified_sqlv1
chosen
[ { "from": "human", "value": "Given the following schema:\nairport (airport_code, airport_name, airport_location, state_code, country_name, time_zone_code, minimum_connect_time)\naircraft (aircraft_code, aircraft_description, manufacturer, basic_type, engines, propulsion, wide_body, wing_span, length, weight...
processed_unified_sqlv1
chosen