Last commit cannot be located
Schema
5 columns, 1-100 of 1034 rows
Row details
query
(str)
schema
(str)
sql
(str)
num_tables
(str)
tables
(str)
query
schema
What are the names of the teachers whose hometown is not `` Little Lever Urban District ''?
CREATE TABLE course (Course_ID INT, Staring_Date TEXT, Course TEXT);
CREATE TABLE teacher (Teacher_ID INT, Name TEXT, Age TEXT, Hometown TEXT);
CREATE TABLE course_arrange (Course_ID INT, Teacher_ID INT, Grade INT);
What are the id, role, and first name of the professionals who have performed two or more treatments?
CREATE TABLE Breeds (breed_code TEXT, breed_name TEXT);
CREATE TABLE Charges (charge_id INT, charge_type TEXT, charge_amount INT);
CREATE TABLE Sizes (size_code TEXT, size_description TEXT);
CREATE TABLE Treatment_Types (treatment_type_code TEXT, treatment_type_description TEXT);
CREATE TABLE Owners (owner_id INT, first_name TEXT, last_name TEXT, street TEXT, city TEXT, state TEXT, zip_code TEXT, email_address TEXT, home_phone TEXT, cell_number TEXT);
CREATE TABLE Dogs (dog_id INT, owner_id INT, abandoned_yn TEXT, breed_code TEXT, size_code TEXT, name TEXT, age TEXT, date_of_birth TEXT, gender TEXT, weight TEXT, date_arrived TEXT, date_adopted TEXT, date_departed TEXT);
CREATE TABLE Professionals (professional_id INT, role_code TEXT, first_name TEXT, street TEXT, city TEXT, state TEXT, zip_code TEXT, last_name TEXT, email_address TEXT, home_phone TEXT, cell_number TEXT);
CREATE TABLE Treatments (treatment_id INT, dog_id INT, professional_id INT, treatment_type_code TEXT, date_of_treatment TEXT, cost_of_treatment INT);
What is the name of the series that has the episode "A Love of a Lifetime"?
CREATE TABLE TV_Channel (id TEXT, series_name TEXT, Country TEXT, Language TEXT, Content TEXT, Pixel_aspect_ratio_PAR TEXT, Hight_definition_TV TEXT, Pay_per_view_PPV TEXT, Package_Option TEXT);
CREATE TABLE TV_series (id INT, Episode TEXT, Air_Date TEXT, Rating TEXT, Share INT, 18_49_Rating_Share TEXT, Viewers_m TEXT, Weekly_Rank INT, Channel TEXT);
CREATE TABLE Cartoon (id INT, Title TEXT, Directed_by TEXT, Written_by TEXT, Original_air_date TEXT, Production_code INT, Channel TEXT);
Return the names and surface areas of the 5 largest countries.
CREATE TABLE city (ID INT, Name TEXT, CountryCode TEXT, District TEXT, Population INT);
CREATE TABLE sqlite_sequence (name TEXT, seq TEXT);
CREATE TABLE country (Code TEXT, Name TEXT, Continent TEXT, Region TEXT, SurfaceArea INT, IndepYear INT, Population INT, LifeExpectancy INT, GNP INT, GNPOld INT, LocalName TEXT, GovernmentForm TEXT, HeadOfState TEXT, Capital INT, Code2 TEXT);
CREATE TABLE countrylanguage (CountryCode TEXT, Language TEXT, IsOfficial TEXT, Percentage INT);
For each hometown, how many teachers are there?
CREATE TABLE course (Course_ID INT, Staring_Date TEXT, Course TEXT);
CREATE TABLE teacher (Teacher_ID INT, Name TEXT, Age TEXT, Hometown TEXT);
CREATE TABLE course_arrange (Course_ID INT, Teacher_ID INT, Grade INT);
How many airlines do we have?
CREATE TABLE airlines (uid INT, Airline TEXT, Abbreviation TEXT, Country TEXT);
CREATE TABLE airports (City TEXT, AirportCode TEXT, AirportName TEXT, Country TEXT, CountryAbbrev TEXT);
CREATE TABLE flights (Airline INT, FlightNo INT, SourceAirport TEXT, DestAirport TEXT);
Which regions speak Dutch or English?
CREATE TABLE city (ID INT, Name TEXT, CountryCode TEXT, District TEXT, Population INT);
CREATE TABLE sqlite_sequence (name TEXT, seq TEXT);
CREATE TABLE country (Code TEXT, Name TEXT, Continent TEXT, Region TEXT, SurfaceArea INT, IndepYear INT, Population INT, LifeExpectancy INT, GNP INT, GNPOld INT, LocalName TEXT, GovernmentForm TEXT, HeadOfState TEXT, Capital INT, Code2 TEXT);
CREATE TABLE countrylanguage (CountryCode TEXT, Language TEXT, IsOfficial TEXT, Percentage INT);
Find the arriving date and the departing date of the dogs that received a treatment.
CREATE TABLE Breeds (breed_code TEXT, breed_name TEXT);
CREATE TABLE Charges (charge_id INT, charge_type TEXT, charge_amount INT);
CREATE TABLE Sizes (size_code TEXT, size_description TEXT);
CREATE TABLE Treatment_Types (treatment_type_code TEXT, treatment_type_description TEXT);
CREATE TABLE Owners (owner_id INT, first_name TEXT, last_name TEXT, street TEXT, city TEXT, state TEXT, zip_code TEXT, email_address TEXT, home_phone TEXT, cell_number TEXT);
CREATE TABLE Dogs (dog_id INT, owner_id INT, abandoned_yn TEXT, breed_code TEXT, size_code TEXT, name TEXT, age TEXT, date_of_birth TEXT, gender TEXT, weight TEXT, date_arrived TEXT, date_adopted TEXT, date_departed TEXT);
CREATE TABLE Professionals (professional_id INT, role_code TEXT, first_name TEXT, street TEXT, city TEXT, state TEXT, zip_code TEXT, last_name TEXT, email_address TEXT, home_phone TEXT, cell_number TEXT);
CREATE TABLE Treatments (treatment_id INT, dog_id INT, professional_id INT, treatment_type_code TEXT, date_of_treatment TEXT, cost_of_treatment INT);
List top 3 highest Rating TV series. List the TV series's Episode and Rating.
CREATE TABLE TV_Channel (id TEXT, series_name TEXT, Country TEXT, Language TEXT, Content TEXT, Pixel_aspect_ratio_PAR TEXT, Hight_definition_TV TEXT, Pay_per_view_PPV TEXT, Package_Option TEXT);
CREATE TABLE TV_series (id INT, Episode TEXT, Air_Date TEXT, Rating TEXT, Share INT, 18_49_Rating_Share TEXT, Viewers_m TEXT, Weekly_Rank INT, Channel TEXT);
CREATE TABLE Cartoon (id INT, Title TEXT, Directed_by TEXT, Written_by TEXT, Original_air_date TEXT, Production_code INT, Channel TEXT);
What are all distinct countries where singers above age 20 are from?
CREATE TABLE stadium (Stadium_ID INT, Location TEXT, Name TEXT, Capacity INT, Highest INT, Lowest INT, Average INT);
CREATE TABLE singer (Singer_ID INT, Name TEXT, Country TEXT, Song_Name TEXT, Song_release_year TEXT, Age INT, Is_male bool);
CREATE TABLE concert (concert_ID INT, concert_Name TEXT, Theme TEXT, Stadium_ID TEXT, Year TEXT);
CREATE TABLE singer_in_concert (concert_ID INT, Singer_ID TEXT);
What are the ids and names of each document, as well as the number of paragraphs in each?
CREATE TABLE Ref_Template_Types (Template_Type_Code TEXT, Template_Type_Description TEXT);
CREATE TABLE Templates (Template_ID INT, Version_Number INT, Template_Type_Code TEXT, Date_Effective_From TEXT, Date_Effective_To TEXT, Template_Details TEXT);
CREATE TABLE Documents (Document_ID INT, Template_ID INT, Document_Name TEXT, Document_Description TEXT, Other_Details TEXT);
CREATE TABLE Paragraphs (Paragraph_ID INT, Document_ID INT, Paragraph_Text TEXT, Other_Details TEXT);
What are the different addresses that have students living there?
CREATE TABLE Addresses (address_id INT, line_1 TEXT, line_2 TEXT, line_3 TEXT, city TEXT, zip_postcode TEXT, state_province_county TEXT, country TEXT, other_address_details TEXT);
CREATE TABLE Courses (course_id INT, course_name TEXT, course_description TEXT, other_details TEXT);
CREATE TABLE Departments (department_id INT, department_name TEXT, department_description TEXT, other_details TEXT);
CREATE TABLE Degree_Programs (degree_program_id INT, department_id INT, degree_summary_name TEXT, degree_summary_description TEXT, other_details TEXT);
CREATE TABLE Sections (section_id INT, course_id INT, section_name TEXT, section_description TEXT, other_details TEXT);
CREATE TABLE Semesters (semester_id INT, semester_name TEXT, semester_description TEXT, other_details TEXT);
CREATE TABLE Students (student_id INT, current_address_id INT, permanent_address_id INT, first_name TEXT, middle_name TEXT, last_name TEXT, cell_mobile_number TEXT, email_address TEXT, ssn TEXT, date_first_registered TEXT, date_left TEXT, other_student_details TEXT);
CREATE TABLE Student_Enrolment (student_enrolment_id INT, degree_program_id INT, semester_id INT, student_id INT, other_details TEXT);
CREATE TABLE Student_Enrolment_Courses (student_course_id INT, course_id INT, student_enrolment_id INT);
CREATE TABLE Transcripts (transcript_id INT, transcript_date TEXT, other_details TEXT);
CREATE TABLE Transcript_Contents (student_course_id INT, transcript_id INT);
What is the average GNP and total population in all nations whose government is US territory?
CREATE TABLE city (ID INT, Name TEXT, CountryCode TEXT, District TEXT, Population INT);
CREATE TABLE sqlite_sequence (name TEXT, seq TEXT);
CREATE TABLE country (Code TEXT, Name TEXT, Continent TEXT, Region TEXT, SurfaceArea INT, IndepYear INT, Population INT, LifeExpectancy INT, GNP INT, GNPOld INT, LocalName TEXT, GovernmentForm TEXT, HeadOfState TEXT, Capital INT, Code2 TEXT);
CREATE TABLE countrylanguage (CountryCode TEXT, Language TEXT, IsOfficial TEXT, Percentage INT);
Sort employee names by their age in ascending order.
CREATE TABLE employee (Employee_ID INT, Name TEXT, Age INT, City TEXT);
CREATE TABLE shop (Shop_ID INT, Name TEXT, Location TEXT, District TEXT, Number_products INT, Manager_name TEXT);
CREATE TABLE hiring (Shop_ID INT, Employee_ID INT, Start_from TEXT, Is_full_time bool);
CREATE TABLE evaluation (Employee_ID TEXT, Year_awarded TEXT, Bonus INT);
What's the name of the course with most number of enrollments?
CREATE TABLE Addresses (address_id INT, line_1 TEXT, line_2 TEXT, line_3 TEXT, city TEXT, zip_postcode TEXT, state_province_county TEXT, country TEXT, other_address_details TEXT);
CREATE TABLE Courses (course_id INT, course_name TEXT, course_description TEXT, other_details TEXT);
CREATE TABLE Departments (department_id INT, department_name TEXT, department_description TEXT, other_details TEXT);
CREATE TABLE Degree_Programs (degree_program_id INT, department_id INT, degree_summary_name TEXT, degree_summary_description TEXT, other_details TEXT);
CREATE TABLE Sections (section_id INT, course_id INT, section_name TEXT, section_description TEXT, other_details TEXT);
CREATE TABLE Semesters (semester_id INT, semester_name TEXT, semester_description TEXT, other_details TEXT);
CREATE TABLE Students (student_id INT, current_address_id INT, permanent_address_id INT, first_name TEXT, middle_name TEXT, last_name TEXT, cell_mobile_number TEXT, email_address TEXT, ssn TEXT, date_first_registered TEXT, date_left TEXT, other_student_details TEXT);
CREATE TABLE Student_Enrolment (student_enrolment_id INT, degree_program_id INT, semester_id INT, student_id INT, other_details TEXT);
CREATE TABLE Student_Enrolment_Courses (student_course_id INT, course_id INT, student_enrolment_id INT);
CREATE TABLE Transcripts (transcript_id INT, transcript_date TEXT, other_details TEXT);
CREATE TABLE Transcript_Contents (student_course_id INT, transcript_id INT);
What is the semester which most student registered in? Show both the name and the id.
CREATE TABLE Addresses (address_id INT, line_1 TEXT, line_2 TEXT, line_3 TEXT, city TEXT, zip_postcode TEXT, state_province_county TEXT, country TEXT, other_address_details TEXT);
CREATE TABLE Courses (course_id INT, course_name TEXT, course_description TEXT, other_details TEXT);
CREATE TABLE Departments (department_id INT, department_name TEXT, department_description TEXT, other_details TEXT);
CREATE TABLE Degree_Programs (degree_program_id INT, department_id INT, degree_summary_name TEXT, degree_summary_description TEXT, other_details TEXT);
CREATE TABLE Sections (section_id INT, course_id INT, section_name TEXT, section_description TEXT, other_details TEXT);
CREATE TABLE Semesters (semester_id INT, semester_name TEXT, semester_description TEXT, other_details TEXT);
CREATE TABLE Students (student_id INT, current_address_id INT, permanent_address_id INT, first_name TEXT, middle_name TEXT, last_name TEXT, cell_mobile_number TEXT, email_address TEXT, ssn TEXT, date_first_registered TEXT, date_left TEXT, other_student_details TEXT);
CREATE TABLE Student_Enrolment (student_enrolment_id INT, degree_program_id INT, semester_id INT, student_id INT, other_details TEXT);
CREATE TABLE Student_Enrolment_Courses (student_course_id INT, course_id INT, student_enrolment_id INT);
CREATE TABLE Transcripts (transcript_id INT, transcript_date TEXT, other_details TEXT);
CREATE TABLE Transcript_Contents (student_course_id INT, transcript_id INT);
Return the money rank of the poker player with the greatest height.
CREATE TABLE poker_player (Poker_Player_ID INT, People_ID INT, Final_Table_Made INT, Best_Finish INT, Money_Rank INT, Earnings INT);
CREATE TABLE people (People_ID INT, Nationality TEXT, Name TEXT, Birth_Date TEXT, Height INT);
Return the birth date of the poker player with the lowest earnings.
CREATE TABLE poker_player (Poker_Player_ID INT, People_ID INT, Final_Table_Made INT, Best_Finish INT, Money_Rank INT, Earnings INT);
CREATE TABLE people (People_ID INT, Nationality TEXT, Name TEXT, Birth_Date TEXT, Height INT);
Give the ids of documents that have between one and two paragraphs.
CREATE TABLE Ref_Template_Types (Template_Type_Code TEXT, Template_Type_Description TEXT);
CREATE TABLE Templates (Template_ID INT, Version_Number INT, Template_Type_Code TEXT, Date_Effective_From TEXT, Date_Effective_To TEXT, Template_Details TEXT);
CREATE TABLE Documents (Document_ID INT, Template_ID INT, Document_Name TEXT, Document_Description TEXT, Other_Details TEXT);
CREATE TABLE Paragraphs (Paragraph_ID INT, Document_ID INT, Paragraph_Text TEXT, Other_Details TEXT);
What is the name of the winner who has won the most matches, and how many rank points does this player have?
CREATE TABLE players (player_id INT, first_name TEXT, last_name TEXT, hand TEXT, birth_date TEXT, country_code TEXT);
CREATE TABLE matches (best_of INT, draw_size INT, loser_age INT, loser_entry TEXT, loser_hand TEXT, loser_ht INT, loser_id INT, loser_ioc TEXT, loser_name TEXT, loser_rank INT, loser_rank_points INT, loser_seed INT, match_num INT, minutes INT, round TEXT, score TEXT, surface TEXT, tourney_date TEXT, tourney_id TEXT, tourney_level TEXT, tourney_name TEXT, winner_age INT, winner_entry TEXT, winner_hand TEXT, winner_ht INT, winner_id INT, winner_ioc TEXT, winner_name TEXT, winner_rank INT, winner_rank_points INT, winner_seed INT, year INT);
CREATE TABLE rankings (ranking_date TEXT, ranking INT, player_id INT, ranking_points INT, tours INT);
What are the maximum and minimum values of area codes?
CREATE TABLE AREA_CODE_STATE (area_code INT, state TEXT);
CREATE TABLE CONTESTANTS (contestant_number INT, contestant_name TEXT);
CREATE TABLE VOTES (vote_id INT, phone_number INT, state TEXT, contestant_number INT, created TEXT);
Show all template type codes with less than three templates.
CREATE TABLE Ref_Template_Types (Template_Type_Code TEXT, Template_Type_Description TEXT);
CREATE TABLE Templates (Template_ID INT, Version_Number INT, Template_Type_Code TEXT, Date_Effective_From TEXT, Date_Effective_To TEXT, Template_Details TEXT);
CREATE TABLE Documents (Document_ID INT, Template_ID INT, Document_Name TEXT, Document_Description TEXT, Other_Details TEXT);
CREATE TABLE Paragraphs (Paragraph_ID INT, Document_ID INT, Paragraph_Text TEXT, Other_Details TEXT);
Which airlines have at least 10 flights?
CREATE TABLE airlines (uid INT, Airline TEXT, Abbreviation TEXT, Country TEXT);
CREATE TABLE airports (City TEXT, AirportCode TEXT, AirportName TEXT, Country TEXT, CountryAbbrev TEXT);
CREATE TABLE flights (Airline INT, FlightNo INT, SourceAirport TEXT, DestAirport TEXT);
What are the names of conductors, ordered by age?
CREATE TABLE conductor (Conductor_ID INT, Name TEXT, Age INT, Nationality TEXT, Year_of_Work INT);
CREATE TABLE orchestra (Orchestra_ID INT, Orchestra TEXT, Conductor_ID INT, Record_Company TEXT, Year_of_Founded INT, Major_Record_Format TEXT);
CREATE TABLE performance (Performance_ID INT, Orchestra_ID INT, Type TEXT, Date TEXT, Official_ratings_(millions) INT, Weekly_rank TEXT, Share TEXT);
CREATE TABLE show (Show_ID INT, Performance_ID INT, If_first_show TEXT, Result TEXT, Attendance INT);
Which first names are used for professionals or owners but are not used as dog names?
CREATE TABLE Breeds (breed_code TEXT, breed_name TEXT);
CREATE TABLE Charges (charge_id INT, charge_type TEXT, charge_amount INT);
CREATE TABLE Sizes (size_code TEXT, size_description TEXT);
CREATE TABLE Treatment_Types (treatment_type_code TEXT, treatment_type_description TEXT);
CREATE TABLE Owners (owner_id INT, first_name TEXT, last_name TEXT, street TEXT, city TEXT, state TEXT, zip_code TEXT, email_address TEXT, home_phone TEXT, cell_number TEXT);
CREATE TABLE Dogs (dog_id INT, owner_id INT, abandoned_yn TEXT, breed_code TEXT, size_code TEXT, name TEXT, age TEXT, date_of_birth TEXT, gender TEXT, weight TEXT, date_arrived TEXT, date_adopted TEXT, date_departed TEXT);
CREATE TABLE Professionals (professional_id INT, role_code TEXT, first_name TEXT, street TEXT, city TEXT, state TEXT, zip_code TEXT, last_name TEXT, email_address TEXT, home_phone TEXT, cell_number TEXT);
CREATE TABLE Treatments (treatment_id INT, dog_id INT, professional_id INT, treatment_type_code TEXT, date_of_treatment TEXT, cost_of_treatment INT);
Give the name, population, and head of state for the country that has the largest area.
CREATE TABLE city (ID INT, Name TEXT, CountryCode TEXT, District TEXT, Population INT);
CREATE TABLE sqlite_sequence (name TEXT, seq TEXT);
CREATE TABLE country (Code TEXT, Name TEXT, Continent TEXT, Region TEXT, SurfaceArea INT, IndepYear INT, Population INT, LifeExpectancy INT, GNP INT, GNPOld INT, LocalName TEXT, GovernmentForm TEXT, HeadOfState TEXT, Capital INT, Code2 TEXT);
CREATE TABLE countrylanguage (CountryCode TEXT, Language TEXT, IsOfficial TEXT, Percentage INT);
Count the number of different nationalities of conductors.
CREATE TABLE conductor (Conductor_ID INT, Name TEXT, Age INT, Nationality TEXT, Year_of_Work INT);
CREATE TABLE orchestra (Orchestra_ID INT, Orchestra TEXT, Conductor_ID INT, Record_Company TEXT, Year_of_Founded INT, Major_Record_Format TEXT);
CREATE TABLE performance (Performance_ID INT, Orchestra_ID INT, Type TEXT, Date TEXT, Official_ratings_(millions) INT, Weekly_rank TEXT, Share TEXT);
CREATE TABLE show (Show_ID INT, Performance_ID INT, If_first_show TEXT, Result TEXT, Attendance INT);
How many flights do we have?
CREATE TABLE airlines (uid INT, Airline TEXT, Abbreviation TEXT, Country TEXT);
CREATE TABLE airports (City TEXT, AirportCode TEXT, AirportName TEXT, Country TEXT, CountryAbbrev TEXT);
CREATE TABLE flights (Airline INT, FlightNo INT, SourceAirport TEXT, DestAirport TEXT);
What is the abbreviation of the airilne has the fewest flights and what country is it in?
CREATE TABLE airlines (uid INT, Airline TEXT, Abbreviation TEXT, Country TEXT);
CREATE TABLE airports (City TEXT, AirportCode TEXT, AirportName TEXT, Country TEXT, CountryAbbrev TEXT);
CREATE TABLE flights (Airline INT, FlightNo INT, SourceAirport TEXT, DestAirport TEXT);
what is the name and nation of the singer who have a song having 'Hey' in its name?
CREATE TABLE stadium (Stadium_ID INT, Location TEXT, Name TEXT, Capacity INT, Highest INT, Lowest INT, Average INT);
CREATE TABLE singer (Singer_ID INT, Name TEXT, Country TEXT, Song_Name TEXT, Song_release_year TEXT, Age INT, Is_male bool);
CREATE TABLE concert (concert_ID INT, concert_Name TEXT, Theme TEXT, Stadium_ID TEXT, Year TEXT);
CREATE TABLE singer_in_concert (concert_ID INT, Singer_ID TEXT);
Show all distinct template type codes for all templates.
CREATE TABLE Ref_Template_Types (Template_Type_Code TEXT, Template_Type_Description TEXT);
CREATE TABLE Templates (Template_ID INT, Version_Number INT, Template_Type_Code TEXT, Date_Effective_From TEXT, Date_Effective_To TEXT, Template_Details TEXT);
CREATE TABLE Documents (Document_ID INT, Template_ID INT, Document_Name TEXT, Document_Description TEXT, Other_Details TEXT);
CREATE TABLE Paragraphs (Paragraph_ID INT, Document_ID INT, Paragraph_Text TEXT, Other_Details TEXT);
What is the first name of the student whose permanent address is different from his or her current one?
CREATE TABLE Addresses (address_id INT, line_1 TEXT, line_2 TEXT, line_3 TEXT, city TEXT, zip_postcode TEXT, state_province_county TEXT, country TEXT, other_address_details TEXT);
CREATE TABLE Courses (course_id INT, course_name TEXT, course_description TEXT, other_details TEXT);
CREATE TABLE Departments (department_id INT, department_name TEXT, department_description TEXT, other_details TEXT);
CREATE TABLE Degree_Programs (degree_program_id INT, department_id INT, degree_summary_name TEXT, degree_summary_description TEXT, other_details TEXT);
CREATE TABLE Sections (section_id INT, course_id INT, section_name TEXT, section_description TEXT, other_details TEXT);
CREATE TABLE Semesters (semester_id INT, semester_name TEXT, semester_description TEXT, other_details TEXT);
CREATE TABLE Students (student_id INT, current_address_id INT, permanent_address_id INT, first_name TEXT, middle_name TEXT, last_name TEXT, cell_mobile_number TEXT, email_address TEXT, ssn TEXT, date_first_registered TEXT, date_left TEXT, other_student_details TEXT);
CREATE TABLE Student_Enrolment (student_enrolment_id INT, degree_program_id INT, semester_id INT, student_id INT, other_details TEXT);
CREATE TABLE Student_Enrolment_Courses (student_course_id INT, course_id INT, student_enrolment_id INT);
CREATE TABLE Transcripts (transcript_id INT, transcript_date TEXT, other_details TEXT);
CREATE TABLE Transcript_Contents (student_course_id INT, transcript_id INT);
How many continents speak Chinese?
CREATE TABLE city (ID INT, Name TEXT, CountryCode TEXT, District TEXT, Population INT);
CREATE TABLE sqlite_sequence (name TEXT, seq TEXT);
CREATE TABLE country (Code TEXT, Name TEXT, Continent TEXT, Region TEXT, SurfaceArea INT, IndepYear INT, Population INT, LifeExpectancy INT, GNP INT, GNPOld INT, LocalName TEXT, GovernmentForm TEXT, HeadOfState TEXT, Capital INT, Code2 TEXT);
CREATE TABLE countrylanguage (CountryCode TEXT, Language TEXT, IsOfficial TEXT, Percentage INT);
What are the students' first names who have both cats and dogs as pets?
CREATE TABLE Student (StuID INT, LName TEXT, Fname TEXT, Age INT, Sex TEXT, Major INT, Advisor INT, city_code TEXT);
CREATE TABLE Has_Pet (StuID INT, PetID INT);
CREATE TABLE Pets (PetID INT, PetType TEXT, pet_age INT, weight INT);
What are the number of votes from state 'NY' or 'CA'?
CREATE TABLE AREA_CODE_STATE (area_code INT, state TEXT);
CREATE TABLE CONTESTANTS (contestant_number INT, contestant_name TEXT);
CREATE TABLE VOTES (vote_id INT, phone_number INT, state TEXT, contestant_number INT, created TEXT);
What is the lowest grade of students who do not have any friends?
CREATE TABLE Highschooler (ID INT, name TEXT, grade INT);
CREATE TABLE Friend (student_id INT, friend_id INT);
CREATE TABLE Likes (student_id INT, liked_id INT);
Show ids for all templates that are used by more than one document.
CREATE TABLE Ref_Template_Types (Template_Type_Code TEXT, Template_Type_Description TEXT);
CREATE TABLE Templates (Template_ID INT, Version_Number INT, Template_Type_Code TEXT, Date_Effective_From TEXT, Date_Effective_To TEXT, Template_Details TEXT);
CREATE TABLE Documents (Document_ID INT, Template_ID INT, Document_Name TEXT, Document_Description TEXT, Other_Details TEXT);
CREATE TABLE Paragraphs (Paragraph_ID INT, Document_ID INT, Paragraph_Text TEXT, Other_Details TEXT);
Find the first name, country code and birth date of the winner who has the highest rank points in all matches.
CREATE TABLE players (player_id INT, first_name TEXT, last_name TEXT, hand TEXT, birth_date TEXT, country_code TEXT);
CREATE TABLE matches (best_of INT, draw_size INT, loser_age INT, loser_entry TEXT, loser_hand TEXT, loser_ht INT, loser_id INT, loser_ioc TEXT, loser_name TEXT, loser_rank INT, loser_rank_points INT, loser_seed INT, match_num INT, minutes INT, round TEXT, score TEXT, surface TEXT, tourney_date TEXT, tourney_id TEXT, tourney_level TEXT, tourney_name TEXT, winner_age INT, winner_entry TEXT, winner_hand TEXT, winner_ht INT, winner_id INT, winner_ioc TEXT, winner_name TEXT, winner_rank INT, winner_rank_points INT, winner_seed INT, year INT);
CREATE TABLE rankings (ranking_date TEXT, ranking INT, player_id INT, ranking_points INT, tours INT);
Find the number of flights landing in the city of Aberdeen or Abilene.
CREATE TABLE airlines (uid INT, Airline TEXT, Abbreviation TEXT, Country TEXT);
CREATE TABLE airports (City TEXT, AirportCode TEXT, AirportName TEXT, Country TEXT, CountryAbbrev TEXT);
CREATE TABLE flights (Airline INT, FlightNo INT, SourceAirport TEXT, DestAirport TEXT);
For each stadium, how many concerts play there?
CREATE TABLE stadium (Stadium_ID INT, Location TEXT, Name TEXT, Capacity INT, Highest INT, Lowest INT, Average INT);
CREATE TABLE singer (Singer_ID INT, Name TEXT, Country TEXT, Song_Name TEXT, Song_release_year TEXT, Age INT, Is_male bool);
CREATE TABLE concert (concert_ID INT, concert_Name TEXT, Theme TEXT, Stadium_ID TEXT, Year TEXT);
CREATE TABLE singer_in_concert (concert_ID INT, Singer_ID TEXT);
how many cars were produced in 1980?
CREATE TABLE continents (ContId INT, Continent TEXT);
CREATE TABLE countries (CountryId INT, CountryName TEXT, Continent INT);
CREATE TABLE car_makers (Id INT, Maker TEXT, FullName TEXT, Country TEXT);
CREATE TABLE model_list (ModelId INT, Maker INT, Model TEXT);
CREATE TABLE car_names (MakeId INT, Model TEXT, Make TEXT);
CREATE TABLE cars_data (Id INT, MPG TEXT, Cylinders INT, Edispl INT, Horsepower TEXT, Weight INT, Accelerate INT, Year INT);
Find the total number of tours for each ranking date.
CREATE TABLE players (player_id INT, first_name TEXT, last_name TEXT, hand TEXT, birth_date TEXT, country_code TEXT);
CREATE TABLE matches (best_of INT, draw_size INT, loser_age INT, loser_entry TEXT, loser_hand TEXT, loser_ht INT, loser_id INT, loser_ioc TEXT, loser_name TEXT, loser_rank INT, loser_rank_points INT, loser_seed INT, match_num INT, minutes INT, round TEXT, score TEXT, surface TEXT, tourney_date TEXT, tourney_id TEXT, tourney_level TEXT, tourney_name TEXT, winner_age INT, winner_entry TEXT, winner_hand TEXT, winner_ht INT, winner_id INT, winner_ioc TEXT, winner_name TEXT, winner_rank INT, winner_rank_points INT, winner_seed INT, year INT);
CREATE TABLE rankings (ranking_date TEXT, ranking INT, player_id INT, ranking_points INT, tours INT);
What are the manager name and district of the shop that sells the largest number of products?
CREATE TABLE employee (Employee_ID INT, Name TEXT, Age INT, City TEXT);
CREATE TABLE shop (Shop_ID INT, Name TEXT, Location TEXT, District TEXT, Number_products INT, Manager_name TEXT);
CREATE TABLE hiring (Shop_ID INT, Employee_ID INT, Start_from TEXT, Is_full_time bool);
CREATE TABLE evaluation (Employee_ID TEXT, Year_awarded TEXT, Bonus INT);
List the last name of the owner owning the youngest dog.
CREATE TABLE Breeds (breed_code TEXT, breed_name TEXT);
CREATE TABLE Charges (charge_id INT, charge_type TEXT, charge_amount INT);
CREATE TABLE Sizes (size_code TEXT, size_description TEXT);
CREATE TABLE Treatment_Types (treatment_type_code TEXT, treatment_type_description TEXT);
CREATE TABLE Owners (owner_id INT, first_name TEXT, last_name TEXT, street TEXT, city TEXT, state TEXT, zip_code TEXT, email_address TEXT, home_phone TEXT, cell_number TEXT);
CREATE TABLE Dogs (dog_id INT, owner_id INT, abandoned_yn TEXT, breed_code TEXT, size_code TEXT, name TEXT, age TEXT, date_of_birth TEXT, gender TEXT, weight TEXT, date_arrived TEXT, date_adopted TEXT, date_departed TEXT);
CREATE TABLE Professionals (professional_id INT, role_code TEXT, first_name TEXT, street TEXT, city TEXT, state TEXT, zip_code TEXT, last_name TEXT, email_address TEXT, home_phone TEXT, cell_number TEXT);
CREATE TABLE Treatments (treatment_id INT, dog_id INT, professional_id INT, treatment_type_code TEXT, date_of_treatment TEXT, cost_of_treatment INT);
Show the student IDs and numbers of friends corresponding to each.
CREATE TABLE Highschooler (ID INT, name TEXT, grade INT);
CREATE TABLE Friend (student_id INT, friend_id INT);
CREATE TABLE Likes (student_id INT, liked_id INT);
what are all the addresses including line 1 and line 2?
CREATE TABLE Addresses (address_id INT, line_1 TEXT, line_2 TEXT, line_3 TEXT, city TEXT, zip_postcode TEXT, state_province_county TEXT, country TEXT, other_address_details TEXT);
CREATE TABLE Courses (course_id INT, course_name TEXT, course_description TEXT, other_details TEXT);
CREATE TABLE Departments (department_id INT, department_name TEXT, department_description TEXT, other_details TEXT);
CREATE TABLE Degree_Programs (degree_program_id INT, department_id INT, degree_summary_name TEXT, degree_summary_description TEXT, other_details TEXT);
CREATE TABLE Sections (section_id INT, course_id INT, section_name TEXT, section_description TEXT, other_details TEXT);
CREATE TABLE Semesters (semester_id INT, semester_name TEXT, semester_description TEXT, other_details TEXT);
CREATE TABLE Students (student_id INT, current_address_id INT, permanent_address_id INT, first_name TEXT, middle_name TEXT, last_name TEXT, cell_mobile_number TEXT, email_address TEXT, ssn TEXT, date_first_registered TEXT, date_left TEXT, other_student_details TEXT);
CREATE TABLE Student_Enrolment (student_enrolment_id INT, degree_program_id INT, semester_id INT, student_id INT, other_details TEXT);
CREATE TABLE Student_Enrolment_Courses (student_course_id INT, course_id INT, student_enrolment_id INT);
CREATE TABLE Transcripts (transcript_id INT, transcript_date TEXT, other_details TEXT);
CREATE TABLE Transcript_Contents (student_course_id INT, transcript_id INT);
Show the stadium name and capacity with most number of concerts in year 2014 or after.
CREATE TABLE stadium (Stadium_ID INT, Location TEXT, Name TEXT, Capacity INT, Highest INT, Lowest INT, Average INT);
CREATE TABLE singer (Singer_ID INT, Name TEXT, Country TEXT, Song_Name TEXT, Song_release_year TEXT, Age INT, Is_male bool);
CREATE TABLE concert (concert_ID INT, concert_Name TEXT, Theme TEXT, Stadium_ID TEXT, Year TEXT);
CREATE TABLE singer_in_concert (concert_ID INT, Singer_ID TEXT);
Find the average weight for each pet type.
CREATE TABLE Student (StuID INT, LName TEXT, Fname TEXT, Age INT, Sex TEXT, Major INT, Advisor INT, city_code TEXT);
CREATE TABLE Has_Pet (StuID INT, PetID INT);
CREATE TABLE Pets (PetID INT, PetType TEXT, pet_age INT, weight INT);
How many flights depart from City 'Aberdeen' and have destination City 'Ashley'?
CREATE TABLE airlines (uid INT, Airline TEXT, Abbreviation TEXT, Country TEXT);
CREATE TABLE airports (City TEXT, AirportCode TEXT, AirportName TEXT, Country TEXT, CountryAbbrev TEXT);
CREATE TABLE flights (Airline INT, FlightNo INT, SourceAirport TEXT, DestAirport TEXT);
Show name of all students who have some friends and also are liked by someone else.
CREATE TABLE Highschooler (ID INT, name TEXT, grade INT);
CREATE TABLE Friend (student_id INT, friend_id INT);
CREATE TABLE Likes (student_id INT, liked_id INT);
Find the name of the shops that do not hire any employee.
CREATE TABLE employee (Employee_ID INT, Name TEXT, Age INT, City TEXT);
CREATE TABLE shop (Shop_ID INT, Name TEXT, Location TEXT, District TEXT, Number_products INT, Manager_name TEXT);
CREATE TABLE hiring (Shop_ID INT, Employee_ID INT, Start_from TEXT, Is_full_time bool);
CREATE TABLE evaluation (Employee_ID TEXT, Year_awarded TEXT, Bonus INT);
What the smallest version number and its template type code?
CREATE TABLE Ref_Template_Types (Template_Type_Code TEXT, Template_Type_Description TEXT);
CREATE TABLE Templates (Template_ID INT, Version_Number INT, Template_Type_Code TEXT, Date_Effective_From TEXT, Date_Effective_To TEXT, Template_Details TEXT);
CREATE TABLE Documents (Document_ID INT, Template_ID INT, Document_Name TEXT, Document_Description TEXT, Other_Details TEXT);
CREATE TABLE Paragraphs (Paragraph_ID INT, Document_ID INT, Paragraph_Text TEXT, Other_Details TEXT);
How many concerts are there in year 2014 or 2015?
CREATE TABLE stadium (Stadium_ID INT, Location TEXT, Name TEXT, Capacity INT, Highest INT, Lowest INT, Average INT);
CREATE TABLE singer (Singer_ID INT, Name TEXT, Country TEXT, Song_Name TEXT, Song_release_year TEXT, Age INT, Is_male bool);
CREATE TABLE concert (concert_ID INT, concert_Name TEXT, Theme TEXT, Stadium_ID TEXT, Year TEXT);
CREATE TABLE singer_in_concert (concert_ID INT, Singer_ID TEXT);
Give me all the information about hiring.
CREATE TABLE employee (Employee_ID INT, Name TEXT, Age INT, City TEXT);
CREATE TABLE shop (Shop_ID INT, Name TEXT, Location TEXT, District TEXT, Number_products INT, Manager_name TEXT);
CREATE TABLE hiring (Shop_ID INT, Employee_ID INT, Start_from TEXT, Is_full_time bool);
CREATE TABLE evaluation (Employee_ID TEXT, Year_awarded TEXT, Bonus INT);
What are the names of the singers who performed in a concert in 2014?
CREATE TABLE stadium (Stadium_ID INT, Location TEXT, Name TEXT, Capacity INT, Highest INT, Lowest INT, Average INT);
CREATE TABLE singer (Singer_ID INT, Name TEXT, Country TEXT, Song_Name TEXT, Song_release_year TEXT, Age INT, Is_male bool);
CREATE TABLE concert (concert_ID INT, concert_Name TEXT, Theme TEXT, Stadium_ID TEXT, Year TEXT);
CREATE TABLE singer_in_concert (concert_ID INT, Singer_ID TEXT);
Which airlines have departures from CVO but not from APG airports?
CREATE TABLE airlines (uid INT, Airline TEXT, Abbreviation TEXT, Country TEXT);
CREATE TABLE airports (City TEXT, AirportCode TEXT, AirportName TEXT, Country TEXT, CountryAbbrev TEXT);
CREATE TABLE flights (Airline INT, FlightNo INT, SourceAirport TEXT, DestAirport TEXT);
List singer names and number of concerts for each singer.
CREATE TABLE stadium (Stadium_ID INT, Location TEXT, Name TEXT, Capacity INT, Highest INT, Lowest INT, Average INT);
CREATE TABLE singer (Singer_ID INT, Name TEXT, Country TEXT, Song_Name TEXT, Song_release_year TEXT, Age INT, Is_male bool);
CREATE TABLE concert (concert_ID INT, concert_Name TEXT, Theme TEXT, Stadium_ID TEXT, Year TEXT);
CREATE TABLE singer_in_concert (concert_ID INT, Singer_ID TEXT);
How many departments offer any degree?
CREATE TABLE Addresses (address_id INT, line_1 TEXT, line_2 TEXT, line_3 TEXT, city TEXT, zip_postcode TEXT, state_province_county TEXT, country TEXT, other_address_details TEXT);
CREATE TABLE Courses (course_id INT, course_name TEXT, course_description TEXT, other_details TEXT);
CREATE TABLE Departments (department_id INT, department_name TEXT, department_description TEXT, other_details TEXT);
CREATE TABLE Degree_Programs (degree_program_id INT, department_id INT, degree_summary_name TEXT, degree_summary_description TEXT, other_details TEXT);
CREATE TABLE Sections (section_id INT, course_id INT, section_name TEXT, section_description TEXT, other_details TEXT);
CREATE TABLE Semesters (semester_id INT, semester_name TEXT, semester_description TEXT, other_details TEXT);
CREATE TABLE Students (student_id INT, current_address_id INT, permanent_address_id INT, first_name TEXT, middle_name TEXT, last_name TEXT, cell_mobile_number TEXT, email_address TEXT, ssn TEXT, date_first_registered TEXT, date_left TEXT, other_student_details TEXT);
CREATE TABLE Student_Enrolment (student_enrolment_id INT, degree_program_id INT, semester_id INT, student_id INT, other_details TEXT);
CREATE TABLE Student_Enrolment_Courses (student_course_id INT, course_id INT, student_enrolment_id INT);
CREATE TABLE Transcripts (transcript_id INT, transcript_date TEXT, other_details TEXT);
CREATE TABLE Transcript_Contents (student_course_id INT, transcript_id INT);
What are the names of all courses that have some students enrolled?
CREATE TABLE Addresses (address_id INT, line_1 TEXT, line_2 TEXT, line_3 TEXT, city TEXT, zip_postcode TEXT, state_province_county TEXT, country TEXT, other_address_details TEXT);
CREATE TABLE Courses (course_id INT, course_name TEXT, course_description TEXT, other_details TEXT);
CREATE TABLE Departments (department_id INT, department_name TEXT, department_description TEXT, other_details TEXT);
CREATE TABLE Degree_Programs (degree_program_id INT, department_id INT, degree_summary_name TEXT, degree_summary_description TEXT, other_details TEXT);
CREATE TABLE Sections (section_id INT, course_id INT, section_name TEXT, section_description TEXT, other_details TEXT);
CREATE TABLE Semesters (semester_id INT, semester_name TEXT, semester_description TEXT, other_details TEXT);
CREATE TABLE Students (student_id INT, current_address_id INT, permanent_address_id INT, first_name TEXT, middle_name TEXT, last_name TEXT, cell_mobile_number TEXT, email_address TEXT, ssn TEXT, date_first_registered TEXT, date_left TEXT, other_student_details TEXT);
CREATE TABLE Student_Enrolment (student_enrolment_id INT, degree_program_id INT, semester_id INT, student_id INT, other_details TEXT);
CREATE TABLE Student_Enrolment_Courses (student_course_id INT, course_id INT, student_enrolment_id INT);
CREATE TABLE Transcripts (transcript_id INT, transcript_date TEXT, other_details TEXT);
CREATE TABLE Transcript_Contents (student_course_id INT, transcript_id INT);
How many flights depart from 'APG'?
CREATE TABLE airlines (uid INT, Airline TEXT, Abbreviation TEXT, Country TEXT);
CREATE TABLE airports (City TEXT, AirportCode TEXT, AirportName TEXT, Country TEXT, CountryAbbrev TEXT);
CREATE TABLE flights (Airline INT, FlightNo INT, SourceAirport TEXT, DestAirport TEXT);
Show the name of the teacher for the math course.
CREATE TABLE course (Course_ID INT, Staring_Date TEXT, Course TEXT);
CREATE TABLE teacher (Teacher_ID INT, Name TEXT, Age TEXT, Hometown TEXT);
CREATE TABLE course_arrange (Course_ID INT, Teacher_ID INT, Grade INT);
Find the name and age of the visitor who bought the most tickets at once.
CREATE TABLE museum (Museum_ID INT, Name TEXT, Num_of_Staff INT, Open_Year TEXT);
CREATE TABLE visitor (ID INT, Name TEXT, Level_of_membership INT, Age INT);
CREATE TABLE visit (Museum_ID INT, visitor_ID TEXT, Num_of_Ticket INT, Total_spent INT);
Find the states where both owners and professionals live.
CREATE TABLE Breeds (breed_code TEXT, breed_name TEXT);
CREATE TABLE Charges (charge_id INT, charge_type TEXT, charge_amount INT);
CREATE TABLE Sizes (size_code TEXT, size_description TEXT);
CREATE TABLE Treatment_Types (treatment_type_code TEXT, treatment_type_description TEXT);
CREATE TABLE Owners (owner_id INT, first_name TEXT, last_name TEXT, street TEXT, city TEXT, state TEXT, zip_code TEXT, email_address TEXT, home_phone TEXT, cell_number TEXT);
CREATE TABLE Dogs (dog_id INT, owner_id INT, abandoned_yn TEXT, breed_code TEXT, size_code TEXT, name TEXT, age TEXT, date_of_birth TEXT, gender TEXT, weight TEXT, date_arrived TEXT, date_adopted TEXT, date_departed TEXT);
CREATE TABLE Professionals (professional_id INT, role_code TEXT, first_name TEXT, street TEXT, city TEXT, state TEXT, zip_code TEXT, last_name TEXT, email_address TEXT, home_phone TEXT, cell_number TEXT);
CREATE TABLE Treatments (treatment_id INT, dog_id INT, professional_id INT, treatment_type_code TEXT, date_of_treatment TEXT, cost_of_treatment INT);
What are the names of players who won in both 2013 and 2016?
CREATE TABLE players (player_id INT, first_name TEXT, last_name TEXT, hand TEXT, birth_date TEXT, country_code TEXT);
CREATE TABLE matches (best_of INT, draw_size INT, loser_age INT, loser_entry TEXT, loser_hand TEXT, loser_ht INT, loser_id INT, loser_ioc TEXT, loser_name TEXT, loser_rank INT, loser_rank_points INT, loser_seed INT, match_num INT, minutes INT, round TEXT, score TEXT, surface TEXT, tourney_date TEXT, tourney_id TEXT, tourney_level TEXT, tourney_name TEXT, winner_age INT, winner_entry TEXT, winner_hand TEXT, winner_ht INT, winner_id INT, winner_ioc TEXT, winner_name TEXT, winner_rank INT, winner_rank_points INT, winner_seed INT, year INT);
CREATE TABLE rankings (ranking_date TEXT, ranking INT, player_id INT, ranking_points INT, tours INT);
What is the name of the country with the most car makers?
CREATE TABLE continents (ContId INT, Continent TEXT);
CREATE TABLE countries (CountryId INT, CountryName TEXT, Continent INT);
CREATE TABLE car_makers (Id INT, Maker TEXT, FullName TEXT, Country TEXT);
CREATE TABLE model_list (ModelId INT, Maker INT, Model TEXT);
CREATE TABLE car_names (MakeId INT, Model TEXT, Make TEXT);
CREATE TABLE cars_data (Id INT, MPG TEXT, Cylinders INT, Edispl INT, Horsepower TEXT, Weight INT, Accelerate INT, Year INT);
What is the total population of Gelderland district?
CREATE TABLE city (ID INT, Name TEXT, CountryCode TEXT, District TEXT, Population INT);
CREATE TABLE sqlite_sequence (name TEXT, seq TEXT);
CREATE TABLE country (Code TEXT, Name TEXT, Continent TEXT, Region TEXT, SurfaceArea INT, IndepYear INT, Population INT, LifeExpectancy INT, GNP INT, GNPOld INT, LocalName TEXT, GovernmentForm TEXT, HeadOfState TEXT, Capital INT, Code2 TEXT);
CREATE TABLE countrylanguage (CountryCode TEXT, Language TEXT, IsOfficial TEXT, Percentage INT);
What is name of the country that speaks the largest number of languages?
CREATE TABLE city (ID INT, Name TEXT, CountryCode TEXT, District TEXT, Population INT);
CREATE TABLE sqlite_sequence (name TEXT, seq TEXT);
CREATE TABLE country (Code TEXT, Name TEXT, Continent TEXT, Region TEXT, SurfaceArea INT, IndepYear INT, Population INT, LifeExpectancy INT, GNP INT, GNPOld INT, LocalName TEXT, GovernmentForm TEXT, HeadOfState TEXT, Capital INT, Code2 TEXT);
CREATE TABLE countrylanguage (CountryCode TEXT, Language TEXT, IsOfficial TEXT, Percentage INT);
What is the country with the most number of TV Channels and how many does it have?
CREATE TABLE TV_Channel (id TEXT, series_name TEXT, Country TEXT, Language TEXT, Content TEXT, Pixel_aspect_ratio_PAR TEXT, Hight_definition_TV TEXT, Pay_per_view_PPV TEXT, Package_Option TEXT);
CREATE TABLE TV_series (id INT, Episode TEXT, Air_Date TEXT, Rating TEXT, Share INT, 18_49_Rating_Share TEXT, Viewers_m TEXT, Weekly_Rank INT, Channel TEXT);
CREATE TABLE Cartoon (id INT, Title TEXT, Directed_by TEXT, Written_by TEXT, Original_air_date TEXT, Production_code INT, Channel TEXT);
What is the weekly rank for the episode "A Love of a Lifetime"?
CREATE TABLE TV_Channel (id TEXT, series_name TEXT, Country TEXT, Language TEXT, Content TEXT, Pixel_aspect_ratio_PAR TEXT, Hight_definition_TV TEXT, Pay_per_view_PPV TEXT, Package_Option TEXT);
CREATE TABLE TV_series (id INT, Episode TEXT, Air_Date TEXT, Rating TEXT, Share INT, 18_49_Rating_Share TEXT, Viewers_m TEXT, Weekly_Rank INT, Channel TEXT);
CREATE TABLE Cartoon (id INT, Title TEXT, Directed_by TEXT, Written_by TEXT, Original_air_date TEXT, Production_code INT, Channel TEXT);
How much surface area do the countires in the Carribean cover together?
CREATE TABLE city (ID INT, Name TEXT, CountryCode TEXT, District TEXT, Population INT);
CREATE TABLE sqlite_sequence (name TEXT, seq TEXT);
CREATE TABLE country (Code TEXT, Name TEXT, Continent TEXT, Region TEXT, SurfaceArea INT, IndepYear INT, Population INT, LifeExpectancy INT, GNP INT, GNPOld INT, LocalName TEXT, GovernmentForm TEXT, HeadOfState TEXT, Capital INT, Code2 TEXT);
CREATE TABLE countrylanguage (CountryCode TEXT, Language TEXT, IsOfficial TEXT, Percentage INT);
Please show the different record companies and the corresponding number of orchestras.
CREATE TABLE conductor (Conductor_ID INT, Name TEXT, Age INT, Nationality TEXT, Year_of_Work INT);
CREATE TABLE orchestra (Orchestra_ID INT, Orchestra TEXT, Conductor_ID INT, Record_Company TEXT, Year_of_Founded INT, Major_Record_Format TEXT);
CREATE TABLE performance (Performance_ID INT, Orchestra_ID INT, Type TEXT, Date TEXT, Official_ratings_(millions) INT, Weekly_rank TEXT, Share TEXT);
CREATE TABLE show (Show_ID INT, Performance_ID INT, If_first_show TEXT, Result TEXT, Attendance INT);
Show names, results and bulgarian commanders of the battles with no ships lost in the 'English Channel'.
CREATE TABLE battle (id INT, name TEXT, date TEXT, bulgarian_commander TEXT, latin_commander TEXT, result TEXT);
CREATE TABLE ship (lost_in_battle INT, id INT, name TEXT, tonnage TEXT, ship_type TEXT, location TEXT, disposition_of_ship TEXT);
CREATE TABLE death (caused_by_ship_id INT, id INT, note TEXT, killed INT, injured INT);
What are flight numbers of flights arriving at Airport "APG"?
CREATE TABLE airlines (uid INT, Airline TEXT, Abbreviation TEXT, Country TEXT);
CREATE TABLE airports (City TEXT, AirportCode TEXT, AirportName TEXT, Country TEXT, CountryAbbrev TEXT);
CREATE TABLE flights (Airline INT, FlightNo INT, SourceAirport TEXT, DestAirport TEXT);
What are the names of the winner and loser who played in the longest match?
CREATE TABLE players (player_id INT, first_name TEXT, last_name TEXT, hand TEXT, birth_date TEXT, country_code TEXT);
CREATE TABLE matches (best_of INT, draw_size INT, loser_age INT, loser_entry TEXT, loser_hand TEXT, loser_ht INT, loser_id INT, loser_ioc TEXT, loser_name TEXT, loser_rank INT, loser_rank_points INT, loser_seed INT, match_num INT, minutes INT, round TEXT, score TEXT, surface TEXT, tourney_date TEXT, tourney_id TEXT, tourney_level TEXT, tourney_name TEXT, winner_age INT, winner_entry TEXT, winner_hand TEXT, winner_ht INT, winner_id INT, winner_ioc TEXT, winner_name TEXT, winner_rank INT, winner_rank_points INT, winner_seed INT, year INT);
CREATE TABLE rankings (ranking_date TEXT, ranking INT, player_id INT, ranking_points INT, tours INT);
What are the towns from which at least two teachers come from?
CREATE TABLE course (Course_ID INT, Staring_Date TEXT, Course TEXT);
CREATE TABLE teacher (Teacher_ID INT, Name TEXT, Age TEXT, Hometown TEXT);
CREATE TABLE course_arrange (Course_ID INT, Teacher_ID INT, Grade INT);
What are the distinct battle names which are between bulgarian commander 'Kaloyan' and latin commander 'Baldwin I'?
CREATE TABLE battle (id INT, name TEXT, date TEXT, bulgarian_commander TEXT, latin_commander TEXT, result TEXT);
CREATE TABLE ship (lost_in_battle INT, id INT, name TEXT, tonnage TEXT, ship_type TEXT, location TEXT, disposition_of_ship TEXT);
CREATE TABLE death (caused_by_ship_id INT, id INT, note TEXT, killed INT, injured INT);
Find the number of cartoons directed by each of the listed directors.
CREATE TABLE TV_Channel (id TEXT, series_name TEXT, Country TEXT, Language TEXT, Content TEXT, Pixel_aspect_ratio_PAR TEXT, Hight_definition_TV TEXT, Pay_per_view_PPV TEXT, Package_Option TEXT);
CREATE TABLE TV_series (id INT, Episode TEXT, Air_Date TEXT, Rating TEXT, Share INT, 18_49_Rating_Share TEXT, Viewers_m TEXT, Weekly_Rank INT, Channel TEXT);
CREATE TABLE Cartoon (id INT, Title TEXT, Directed_by TEXT, Written_by TEXT, Original_air_date TEXT, Production_code INT, Channel TEXT);
What is the average horsepower for all cars produced before 1980?
CREATE TABLE continents (ContId INT, Continent TEXT);
CREATE TABLE countries (CountryId INT, CountryName TEXT, Continent INT);
CREATE TABLE car_makers (Id INT, Maker TEXT, FullName TEXT, Country TEXT);
CREATE TABLE model_list (ModelId INT, Maker INT, Model TEXT);
CREATE TABLE car_names (MakeId INT, Model TEXT, Make TEXT);
CREATE TABLE cars_data (Id INT, MPG TEXT, Cylinders INT, Edispl INT, Horsepower TEXT, Weight INT, Accelerate INT, Year INT);
How many teachers are there?
CREATE TABLE course (Course_ID INT, Staring_Date TEXT, Course TEXT);
CREATE TABLE teacher (Teacher_ID INT, Name TEXT, Age TEXT, Hometown TEXT);
CREATE TABLE course_arrange (Course_ID INT, Teacher_ID INT, Grade INT);
List the arrival date and the departure date for all the dogs.
CREATE TABLE Breeds (breed_code TEXT, breed_name TEXT);
CREATE TABLE Charges (charge_id INT, charge_type TEXT, charge_amount INT);
CREATE TABLE Sizes (size_code TEXT, size_description TEXT);
CREATE TABLE Treatment_Types (treatment_type_code TEXT, treatment_type_description TEXT);
CREATE TABLE Owners (owner_id INT, first_name TEXT, last_name TEXT, street TEXT, city TEXT, state TEXT, zip_code TEXT, email_address TEXT, home_phone TEXT, cell_number TEXT);
CREATE TABLE Dogs (dog_id INT, owner_id INT, abandoned_yn TEXT, breed_code TEXT, size_code TEXT, name TEXT, age TEXT, date_of_birth TEXT, gender TEXT, weight TEXT, date_arrived TEXT, date_adopted TEXT, date_departed TEXT);
CREATE TABLE Professionals (professional_id INT, role_code TEXT, first_name TEXT, street TEXT, city TEXT, state TEXT, zip_code TEXT, last_name TEXT, email_address TEXT, home_phone TEXT, cell_number TEXT);
CREATE TABLE Treatments (treatment_id INT, dog_id INT, professional_id INT, treatment_type_code TEXT, date_of_treatment TEXT, cost_of_treatment INT);
How many people live in Gelderland district?
CREATE TABLE city (ID INT, Name TEXT, CountryCode TEXT, District TEXT, Population INT);
CREATE TABLE sqlite_sequence (name TEXT, seq TEXT);
CREATE TABLE country (Code TEXT, Name TEXT, Continent TEXT, Region TEXT, SurfaceArea INT, IndepYear INT, Population INT, LifeExpectancy INT, GNP INT, GNPOld INT, LocalName TEXT, GovernmentForm TEXT, HeadOfState TEXT, Capital INT, Code2 TEXT);
CREATE TABLE countrylanguage (CountryCode TEXT, Language TEXT, IsOfficial TEXT, Percentage INT);
What is the document name and template id for document with description with the letter 'w' in it?
CREATE TABLE Ref_Template_Types (Template_Type_Code TEXT, Template_Type_Description TEXT);
CREATE TABLE Templates (Template_ID INT, Version_Number INT, Template_Type_Code TEXT, Date_Effective_From TEXT, Date_Effective_To TEXT, Template_Details TEXT);
CREATE TABLE Documents (Document_ID INT, Template_ID INT, Document_Name TEXT, Document_Description TEXT, Other_Details TEXT);
CREATE TABLE Paragraphs (Paragraph_ID INT, Document_ID INT, Paragraph_Text TEXT, Other_Details TEXT);
Count the number of orchestras that have CD or DVD as their record format.
CREATE TABLE conductor (Conductor_ID INT, Name TEXT, Age INT, Nationality TEXT, Year_of_Work INT);
CREATE TABLE orchestra (Orchestra_ID INT, Orchestra TEXT, Conductor_ID INT, Record_Company TEXT, Year_of_Founded INT, Major_Record_Format TEXT);
CREATE TABLE performance (Performance_ID INT, Orchestra_ID INT, Type TEXT, Date TEXT, Official_ratings_(millions) INT, Weekly_rank TEXT, Share TEXT);
CREATE TABLE show (Show_ID INT, Performance_ID INT, If_first_show TEXT, Result TEXT, Attendance INT);
What is the number of cartoones written by Joseph Kuhr?
CREATE TABLE TV_Channel (id TEXT, series_name TEXT, Country TEXT, Language TEXT, Content TEXT, Pixel_aspect_ratio_PAR TEXT, Hight_definition_TV TEXT, Pay_per_view_PPV TEXT, Package_Option TEXT);
CREATE TABLE TV_series (id INT, Episode TEXT, Air_Date TEXT, Rating TEXT, Share INT, 18_49_Rating_Share TEXT, Viewers_m TEXT, Weekly_Rank INT, Channel TEXT);
CREATE TABLE Cartoon (id INT, Title TEXT, Directed_by TEXT, Written_by TEXT, Original_air_date TEXT, Production_code INT, Channel TEXT);
What are the number of concerts that occurred in the stadium with the largest capacity?
CREATE TABLE stadium (Stadium_ID INT, Location TEXT, Name TEXT, Capacity INT, Highest INT, Lowest INT, Average INT);
CREATE TABLE singer (Singer_ID INT, Name TEXT, Country TEXT, Song_Name TEXT, Song_release_year TEXT, Age INT, Is_male bool);
CREATE TABLE concert (concert_ID INT, concert_Name TEXT, Theme TEXT, Stadium_ID TEXT, Year TEXT);
CREATE TABLE singer_in_concert (concert_ID INT, Singer_ID TEXT);
What is the first name and gender of the all the students who have more than one pet?
CREATE TABLE Student (StuID INT, LName TEXT, Fname TEXT, Age INT, Sex TEXT, Major INT, Advisor INT, city_code TEXT);
CREATE TABLE Has_Pet (StuID INT, PetID INT);
CREATE TABLE Pets (PetID INT, PetType TEXT, pet_age INT, weight INT);
What is Weekly Rank of TV series with Episode "A Love of a Lifetime"?
CREATE TABLE TV_Channel (id TEXT, series_name TEXT, Country TEXT, Language TEXT, Content TEXT, Pixel_aspect_ratio_PAR TEXT, Hight_definition_TV TEXT, Pay_per_view_PPV TEXT, Package_Option TEXT);
CREATE TABLE TV_series (id INT, Episode TEXT, Air_Date TEXT, Rating TEXT, Share INT, 18_49_Rating_Share TEXT, Viewers_m TEXT, Weekly_Rank INT, Channel TEXT);
CREATE TABLE Cartoon (id INT, Title TEXT, Directed_by TEXT, Written_by TEXT, Original_air_date TEXT, Production_code INT, Channel TEXT);
How is the math course described?
CREATE TABLE Addresses (address_id INT, line_1 TEXT, line_2 TEXT, line_3 TEXT, city TEXT, zip_postcode TEXT, state_province_county TEXT, country TEXT, other_address_details TEXT);
CREATE TABLE Courses (course_id INT, course_name TEXT, course_description TEXT, other_details TEXT);
CREATE TABLE Departments (department_id INT, department_name TEXT, department_description TEXT, other_details TEXT);
CREATE TABLE Degree_Programs (degree_program_id INT, department_id INT, degree_summary_name TEXT, degree_summary_description TEXT, other_details TEXT);
CREATE TABLE Sections (section_id INT, course_id INT, section_name TEXT, section_description TEXT, other_details TEXT);
CREATE TABLE Semesters (semester_id INT, semester_name TEXT, semester_description TEXT, other_details TEXT);
CREATE TABLE Students (student_id INT, current_address_id INT, permanent_address_id INT, first_name TEXT, middle_name TEXT, last_name TEXT, cell_mobile_number TEXT, email_address TEXT, ssn TEXT, date_first_registered TEXT, date_left TEXT, other_student_details TEXT);
CREATE TABLE Student_Enrolment (student_enrolment_id INT, degree_program_id INT, semester_id INT, student_id INT, other_details TEXT);
CREATE TABLE Student_Enrolment_Courses (student_course_id INT, course_id INT, student_enrolment_id INT);
CREATE TABLE Transcripts (transcript_id INT, transcript_date TEXT, other_details TEXT);
CREATE TABLE Transcript_Contents (student_course_id INT, transcript_id INT);
Find the semester when both Master students and Bachelor students got enrolled in.
CREATE TABLE Addresses (address_id INT, line_1 TEXT, line_2 TEXT, line_3 TEXT, city TEXT, zip_postcode TEXT, state_province_county TEXT, country TEXT, other_address_details TEXT);
CREATE TABLE Courses (course_id INT, course_name TEXT, course_description TEXT, other_details TEXT);
CREATE TABLE Departments (department_id INT, department_name TEXT, department_description TEXT, other_details TEXT);
CREATE TABLE Degree_Programs (degree_program_id INT, department_id INT, degree_summary_name TEXT, degree_summary_description TEXT, other_details TEXT);
CREATE TABLE Sections (section_id INT, course_id INT, section_name TEXT, section_description TEXT, other_details TEXT);
CREATE TABLE Semesters (semester_id INT, semester_name TEXT, semester_description TEXT, other_details TEXT);
CREATE TABLE Students (student_id INT, current_address_id INT, permanent_address_id INT, first_name TEXT, middle_name TEXT, last_name TEXT, cell_mobile_number TEXT, email_address TEXT, ssn TEXT, date_first_registered TEXT, date_left TEXT, other_student_details TEXT);
CREATE TABLE Student_Enrolment (student_enrolment_id INT, degree_program_id INT, semester_id INT, student_id INT, other_details TEXT);
CREATE TABLE Student_Enrolment_Courses (student_course_id INT, course_id INT, student_enrolment_id INT);
CREATE TABLE Transcripts (transcript_id INT, transcript_date TEXT, other_details TEXT);
CREATE TABLE Transcript_Contents (student_course_id INT, transcript_id INT);
What are the paragraph texts for the document with the name 'Customer reviews'?
CREATE TABLE Ref_Template_Types (Template_Type_Code TEXT, Template_Type_Description TEXT);
CREATE TABLE Templates (Template_ID INT, Version_Number INT, Template_Type_Code TEXT, Date_Effective_From TEXT, Date_Effective_To TEXT, Template_Details TEXT);
CREATE TABLE Documents (Document_ID INT, Template_ID INT, Document_Name TEXT, Document_Description TEXT, Other_Details TEXT);
CREATE TABLE Paragraphs (Paragraph_ID INT, Document_ID INT, Paragraph_Text TEXT, Other_Details TEXT);
List the final tables made and the best finishes of poker players.
CREATE TABLE poker_player (Poker_Player_ID INT, People_ID INT, Final_Table_Made INT, Best_Finish INT, Money_Rank INT, Earnings INT);
CREATE TABLE people (People_ID INT, Nationality TEXT, Name TEXT, Birth_Date TEXT, Height INT);
What are the minimum and maximum number of products across all the shops?
CREATE TABLE employee (Employee_ID INT, Name TEXT, Age INT, City TEXT);
CREATE TABLE shop (Shop_ID INT, Name TEXT, Location TEXT, District TEXT, Number_products INT, Manager_name TEXT);
CREATE TABLE hiring (Shop_ID INT, Employee_ID INT, Start_from TEXT, Is_full_time bool);
CREATE TABLE evaluation (Employee_ID TEXT, Year_awarded TEXT, Bonus INT);
What are the names of conductors whose nationalities are not "USA"?
CREATE TABLE conductor (Conductor_ID INT, Name TEXT, Age INT, Nationality TEXT, Year_of_Work INT);
CREATE TABLE orchestra (Orchestra_ID INT, Orchestra TEXT, Conductor_ID INT, Record_Company TEXT, Year_of_Founded INT, Major_Record_Format TEXT);
CREATE TABLE performance (Performance_ID INT, Orchestra_ID INT, Type TEXT, Date TEXT, Official_ratings_(millions) INT, Weekly_rank TEXT, Share TEXT);
CREATE TABLE show (Show_ID INT, Performance_ID INT, If_first_show TEXT, Result TEXT, Attendance INT);
Of all the contestants who got voted, what is the contestant number and name of the contestant who got least votes?
CREATE TABLE AREA_CODE_STATE (area_code INT, state TEXT);
CREATE TABLE CONTESTANTS (contestant_number INT, contestant_name TEXT);
CREATE TABLE VOTES (vote_id INT, phone_number INT, state TEXT, contestant_number INT, created TEXT);
Which owner has paid for the most treatments on his or her dogs? List the owner id and last name.
CREATE TABLE Breeds (breed_code TEXT, breed_name TEXT);
CREATE TABLE Charges (charge_id INT, charge_type TEXT, charge_amount INT);
CREATE TABLE Sizes (size_code TEXT, size_description TEXT);
CREATE TABLE Treatment_Types (treatment_type_code TEXT, treatment_type_description TEXT);
CREATE TABLE Owners (owner_id INT, first_name TEXT, last_name TEXT, street TEXT, city TEXT, state TEXT, zip_code TEXT, email_address TEXT, home_phone TEXT, cell_number TEXT);
CREATE TABLE Dogs (dog_id INT, owner_id INT, abandoned_yn TEXT, breed_code TEXT, size_code TEXT, name TEXT, age TEXT, date_of_birth TEXT, gender TEXT, weight TEXT, date_arrived TEXT, date_adopted TEXT, date_departed TEXT);
CREATE TABLE Professionals (professional_id INT, role_code TEXT, first_name TEXT, street TEXT, city TEXT, state TEXT, zip_code TEXT, last_name TEXT, email_address TEXT, home_phone TEXT, cell_number TEXT);
CREATE TABLE Treatments (treatment_id INT, dog_id INT, professional_id INT, treatment_type_code TEXT, date_of_treatment TEXT, cost_of_treatment INT);
What is the total number of singers?
CREATE TABLE stadium (Stadium_ID INT, Location TEXT, Name TEXT, Capacity INT, Highest INT, Lowest INT, Average INT);
CREATE TABLE singer (Singer_ID INT, Name TEXT, Country TEXT, Song_Name TEXT, Song_release_year TEXT, Age INT, Is_male bool);
CREATE TABLE concert (concert_ID INT, concert_Name TEXT, Theme TEXT, Stadium_ID TEXT, Year TEXT);
CREATE TABLE singer_in_concert (concert_ID INT, Singer_ID TEXT);
Find the major and age of students who do not have a cat pet.
CREATE TABLE Student (StuID INT, LName TEXT, Fname TEXT, Age INT, Sex TEXT, Major INT, Advisor INT, city_code TEXT);
CREATE TABLE Has_Pet (StuID INT, PetID INT);
CREATE TABLE Pets (PetID INT, PetType TEXT, pet_age INT, weight INT);
Find the name of the makers that produced some cars in the year of 1970?
CREATE TABLE continents (ContId INT, Continent TEXT);
CREATE TABLE countries (CountryId INT, CountryName TEXT, Continent INT);
CREATE TABLE car_makers (Id INT, Maker TEXT, FullName TEXT, Country TEXT);
CREATE TABLE model_list (ModelId INT, Maker INT, Model TEXT);
CREATE TABLE car_names (MakeId INT, Model TEXT, Make TEXT);
CREATE TABLE cars_data (Id INT, MPG TEXT, Cylinders INT, Edispl INT, Horsepower TEXT, Weight INT, Accelerate INT, Year INT);
What are the names of the dogs for which the owner has not spend more than 1000 for treatment?
CREATE TABLE Breeds (breed_code TEXT, breed_name TEXT);
CREATE TABLE Charges (charge_id INT, charge_type TEXT, charge_amount INT);
CREATE TABLE Sizes (size_code TEXT, size_description TEXT);
CREATE TABLE Treatment_Types (treatment_type_code TEXT, treatment_type_description TEXT);
CREATE TABLE Owners (owner_id INT, first_name TEXT, last_name TEXT, street TEXT, city TEXT, state TEXT, zip_code TEXT, email_address TEXT, home_phone TEXT, cell_number TEXT);
CREATE TABLE Dogs (dog_id INT, owner_id INT, abandoned_yn TEXT, breed_code TEXT, size_code TEXT, name TEXT, age TEXT, date_of_birth TEXT, gender TEXT, weight TEXT, date_arrived TEXT, date_adopted TEXT, date_departed TEXT);
CREATE TABLE Professionals (professional_id INT, role_code TEXT, first_name TEXT, street TEXT, city TEXT, state TEXT, zip_code TEXT, last_name TEXT, email_address TEXT, home_phone TEXT, cell_number TEXT);
CREATE TABLE Treatments (treatment_id INT, dog_id INT, professional_id INT, treatment_type_code TEXT, date_of_treatment TEXT, cost_of_treatment INT);
Which airlines have a flight with destination airport AHD?
CREATE TABLE airlines (uid INT, Airline TEXT, Abbreviation TEXT, Country TEXT);
CREATE TABLE airports (City TEXT, AirportCode TEXT, AirportName TEXT, Country TEXT, CountryAbbrev TEXT);
CREATE TABLE flights (Airline INT, FlightNo INT, SourceAirport TEXT, DestAirport TEXT);
Select a cell to see row details