db_id stringclasses 140
values | schema stringclasses 140
values | question stringlengths 16 224 | sql stringlengths 18 416 |
|---|---|---|---|
chinook_1 | Album : AlbumId (number) , Title (text) , ArtistId (number) | Artist : ArtistId (number) , Name (text) | Customer : CustomerId (number) , FirstName (text) , LastName (text) , Company (text) , Address (text) , City (text) , State (text) , Country (text) , PostalCode (text) , Phone (text) , Fax (text) , Email (text) , Su... | Find the full names of employees living in the city of Calgary. | SELECT firstname , lastname FROM employee WHERE city = "Calgary" |
cre_Doc_Tracking_DB | Ref_Document_Types : Document_Type_Code (text) , Document_Type_Name (text) , Document_Type_Description (text) | Ref_Calendar : Calendar_Date (time) , Day_Number (number) | Ref_Locations : Location_Code (text) , Location_Name (text) , Location_Description (text) | Roles : Role_Code (text) , Role_Name (text) , Role_Descr... | Show the ids of all employees who have destroyed a document. | SELECT DISTINCT destroyed_by_employee_id FROM documents_to_be_destroyed |
tracking_orders | Customers : customer_id (number) , customer_name (text) , customer_details (text) | Invoices : invoice_number (number) , invoice_date (time) , invoice_details (text) | Orders : order_id (number) , customer_id (number) , order_status (text) , date_order_placed (time) , order_details (text) | Products : product_id (numbe... | List the names of all distinct products in alphabetical order. | SELECT DISTINCT product_name FROM products ORDER BY product_name |
college_1 | CLASS : CLASS_CODE (text) , CRS_CODE (text) , CLASS_SECTION (text) , CLASS_TIME (text) , CLASS_ROOM (text) , PROF_NUM (number) | COURSE : CRS_CODE (text) , DEPT_CODE (text) , CRS_DESCRIPTION (text) , CRS_CREDIT (number) | DEPARTMENT : DEPT_CODE (text) , DEPT_NAME (text) , SCHOOL_CODE (text) , EMP_NUM (number) , DEPT_AD... | What are the description and credit of the course which the student whose last name is Smithson took? | SELECT t4 . crs_description , t4 . crs_credit FROM CLASS AS t1 JOIN enroll AS t2 ON t1 . class_code = t2 . class_code JOIN student AS t3 ON t3 . stu_num = t2 . stu_num JOIN course AS t4 ON t4 . crs_code = t1 . crs_code WHERE t3 . stu_lname = 'smithson' |
flight_1 | flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number) | What is the id and salary of the employee named Mark Young? | SELECT eid , salary FROM employee WHERE name = 'mark young' |
chinook_1 | Album : AlbumId (number) , Title (text) , ArtistId (number) | Artist : ArtistId (number) , Name (text) | Customer : CustomerId (number) , FirstName (text) , LastName (text) , Company (text) , Address (text) , City (text) , State (text) , Country (text) , PostalCode (text) , Phone (text) , Fax (text) , Email (text) , Su... | Find the average millisecond length of Latin and Pop tracks. | SELECT avg ( milliseconds ) FROM genre AS t1 JOIN track AS t2 ON t1 . genreid = t2 . genreid WHERE t1 . name = "Latin" OR t1 . name = "Pop" |
scientist_1 | Scientists : SSN (number) , Name (text) | Projects : Code (text) , Name (text) , Hours (number) | AssignedTo : Scientist (number) , Project (text) | What is the average hours across all projects? | SELECT avg ( hours ) FROM projects |
customer_complaints | Staff : staff_id (number) , gender (text) , first_name (text) , last_name (text) , email_address (text) , phone_number (text) | Customers : customer_id (number) , customer_type_code (text) , address_line_1 (text) , address_line_2 (text) , town_city (text) , state (text) , email_address (text) , phone_number (text) | Pr... | What is the description of the product named "Chocolate"? | SELECT product_description FROM products WHERE product_name = "Chocolate" |
book_2 | publication : Publication_ID (number) , Book_ID (number) , Publisher (text) , Publication_Date (text) , Price (number) | book : Book_ID (number) , Title (text) , Issues (number) , Writer (text) | How many distinct publication dates are there in our record? | SELECT COUNT ( DISTINCT publication_date ) FROM publication |
college_2 | classroom : building (text) , room_number (text) , capacity (number) | department : dept_name (text) , building (text) , budget (number) | course : course_id (text) , title (text) , dept_name (text) , credits (number) | instructor : ID (text) , name (text) , dept_name (text) , salary (number) | section : course_id (tex... | Find courses that ran in Fall 2009 and in Spring 2010. | SELECT course_id FROM SECTION WHERE semester = 'fall' AND YEAR = 2009 INTERSECT SELECT course_id FROM SECTION WHERE semester = 'spring' AND YEAR = 2010 |
music_4 | artist : Artist_ID (number) , Artist (text) , Age (number) , Famous_Title (text) , Famous_Release_date (text) | volume : Volume_ID (number) , Volume_Issue (text) , Issue_Date (text) , Weeks_on_Top (number) , Song (text) , Artist_ID (number) | music_festival : ID (number) , Music_Festival (text) , Date_of_ceremony (text... | Return the average number of weeks on top for volumes by artists that are at most 25 years old. | SELECT avg ( t2 . weeks_on_top ) FROM artist AS t1 JOIN volume AS t2 ON t1 . artist_id = t2 . artist_id WHERE t1 . age <= 25 |
sakila_1 | actor : actor_id (number) , first_name (text) , last_name (text) , last_update (time) | address : address_id (number) , address (text) , address2 (text) , district (text) , city_id (number) , postal_code (text) , phone (text) , last_update (time) | category : category_id (number) , name (text) , last_update (time) | ci... | Which districts have at least two addresses? | SELECT district FROM address GROUP BY district HAVING count ( * ) >= 2 |
student_assessment | Addresses : address_id (number) , line_1 (text) , line_2 (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | People : person_id (number) , first_name (text) , middle_name (text) , last_name (text) , cell_mobile_number (text) , email_address (text) , login_name (text) , password ... | Find the cell mobile number of the candidates whose assessment code is "Fail"? | SELECT t3 . cell_mobile_number FROM candidates AS t1 JOIN candidate_assessments AS t2 ON t1 . candidate_id = t2 . candidate_id JOIN people AS t3 ON t1 . candidate_id = t3 . person_id WHERE t2 . asessment_outcome_code = "Fail" |
apartment_rentals | Apartment_Buildings : building_id (number) , building_short_name (text) , building_full_name (text) , building_description (text) , building_address (text) , building_manager (text) , building_phone (text) | Apartments : apt_id (number) , building_id (number) , apt_type_code (text) , apt_number (text) , bathroom_count ... | What is the average room count of the apartments whose booking status code is "Provisional"? | SELECT avg ( room_count ) FROM apartment_bookings AS t1 JOIN apartments AS t2 ON t1 . apt_id = t2 . apt_id WHERE t1 . booking_status_code = "Provisional" |
ship_mission | mission : Mission_ID (number) , Ship_ID (number) , Code (text) , Launched_Year (number) , Location (text) , Speed_knots (number) , Fate (text) | ship : Ship_ID (number) , Name (text) , Type (text) , Nationality (text) , Tonnage (number) | What are the names of ships that were involved in a mission launched after 1928? | SELECT t2 . name FROM mission AS t1 JOIN ship AS t2 ON t1 . ship_id = t2 . ship_id WHERE t1 . launched_year > 1928 |
game_1 | Student : StuID (number) , LName (text) , Fname (text) , Age (number) , Sex (text) , Major (number) , Advisor (number) , city_code (text) | Video_Games : GameID (number) , GName (text) , GType (text) | Plays_Games : StuID (number) , GameID (number) , Hours_Played (number) | SportsInfo : StuID (number) , SportName (text... | What are the student ids for those on scholarship in major number 600? | SELECT stuid FROM student WHERE major = 600 INTERSECT SELECT stuid FROM sportsinfo WHERE onscholarship = 'y' |
county_public_safety | county_public_safety : County_ID (number) , Name (text) , Population (number) , Police_officers (number) , Residents_per_officer (number) , Case_burden (number) , Crime_rate (number) , Police_force (text) , Location (text) | city : City_ID (number) , County_ID (number) , Name (text) , White (number) , Black (number) , ... | What are the names of cities, as well as the names of the counties they correspond to? | SELECT t1 . name , t2 . name FROM city AS t1 JOIN county_public_safety AS t2 ON t1 . county_id = t2 . county_id |
cre_Theme_park | Ref_Hotel_Star_Ratings : star_rating_code (text) , star_rating_description (text) | Locations : Location_ID (number) , Location_Name (text) , Address (text) , Other_Details (text) | Ref_Attraction_Types : Attraction_Type_Code (text) , Attraction_Type_Description (text) | Visitors : Tourist_ID (number) , Tourist_Details... | What are the names of the tourist attractions that can be accessed by bus? | SELECT name FROM tourist_attractions WHERE how_to_get_there = "bus" |
college_2 | classroom : building (text) , room_number (text) , capacity (number) | department : dept_name (text) , building (text) , budget (number) | course : course_id (text) , title (text) , dept_name (text) , credits (number) | instructor : ID (text) , name (text) , dept_name (text) , salary (number) | section : course_id (tex... | How many instructors are in the department with the highest budget, and what is their average salary? | SELECT avg ( t1 . salary ) , count ( * ) FROM instructor AS t1 JOIN department AS t2 ON t1 . dept_name = t2 . dept_name ORDER BY t2 . budget DESC LIMIT 1 |
bike_1 | station : id (number) , name (text) , lat (number) , long (number) , dock_count (number) , city (text) , installation_date (text) | status : station_id (number) , bikes_available (number) , docks_available (number) , time (text) | trip : id (number) , duration (number) , start_date (text) , start_station_name (text) , ... | What is the name, latitude, and city of the station that is located the furthest South? | SELECT name , lat , city FROM station ORDER BY lat LIMIT 1 |
voter_2 | Student : StuID (number) , LName (text) , Fname (text) , Age (number) , Sex (text) , Major (number) , Advisor (number) , city_code (text) | Voting_record : StuID (number) , Registration_Date (text) , Election_Cycle (text) , President_Vote (number) , Vice_President_Vote (number) , Secretary_Vote (number) , Treasurer_Vot... | What is the average age of the female students with secretary votes in the spring election cycle? | SELECT avg ( t1 . age ) FROM student AS t1 JOIN voting_record AS t2 ON t1 . stuid = secretary_vote WHERE t1 . sex = "F" AND t2 . election_cycle = "Spring" |
college_3 | Student : StuID (number) , LName (text) , Fname (text) , Age (number) , Sex (text) , Major (number) , Advisor (number) , city_code (text) | Faculty : FacID (number) , Lname (text) , Fname (text) , Rank (text) , Sex (text) , Phone (number) , Room (text) , Building (text) | Department : DNO (number) , Division (text) , D... | Give the names of the courses with at least five enrollments. | SELECT t1 . cname FROM course AS t1 JOIN enrolled_in AS t2 ON t1 . cid = t2 . cid GROUP BY t2 . cid HAVING count ( * ) >= 5 |
store_1 | artists : id (number) , name (text) | sqlite_sequence : name (text) , seq (text) | albums : id (number) , title (text) , artist_id (number) | employees : id (number) , last_name (text) , first_name (text) , title (text) , reports_to (number) , birth_date (time) , hire_date (time) , address (text) , city (text) , state ... | What are the names of all Rock tracks that are stored on MPEG audio files? | SELECT t2 . name FROM genres AS t1 JOIN tracks AS t2 ON t1 . id = t2 . genre_id JOIN media_types AS t3 ON t3 . id = t2 . media_type_id WHERE t1 . name = "Rock" AND t3 . name = "MPEG audio file" ; |
movie_1 | Movie : mID (number) , title (text) , year (number) , director (text) | Reviewer : rID (number) , name (text) | Rating : rID (number) , mID (number) , stars (number) , ratingDate (time) | What are the titles of all movies that James Cameron directed after 2000? | SELECT title FROM movie WHERE director = 'james cameron' AND YEAR > 2000 |
csu_1 | Campuses : Id (number) , Campus (text) , Location (text) , County (text) , Year (number) | csu_fees : Campus (number) , Year (number) , CampusFee (number) | degrees : Year (number) , Campus (number) , Degrees (number) | discipline_enrollments : Campus (number) , Discipline (number) , Year (number) , Undergraduate (numb... | Find the count of universities whose campus fee is greater than the average campus fee. | SELECT count ( * ) FROM csu_fees WHERE campusfee > ( SELECT avg ( campusfee ) FROM csu_fees ) |
train_station | station : Station_ID (number) , Name (text) , Annual_entry_exit (number) , Annual_interchanges (number) , Total_Passengers (number) , Location (text) , Main_Services (text) , Number_of_Platforms (number) | train : Train_ID (number) , Name (text) , Time (text) , Service (text) | train_station : Train_ID (number) , Stati... | Find the names of the trains that do not pass any station located in London. | SELECT t2 . name FROM train_station AS t1 JOIN train AS t2 ON t1 . train_id = t2 . train_id WHERE t1 . station_id NOT IN ( SELECT t4 . station_id FROM train_station AS t3 JOIN station AS t4 ON t3 . station_id = t4 . station_id WHERE t4 . location = "London" ) |
small_bank_1 | ACCOUNTS : custid (number) , name (text) | SAVINGS : custid (number) , balance (number) | CHECKING : custid (number) , balance (number) | What is the name and checking balance of the account which has the lowest savings balance? | SELECT t2 . balance , t1 . name FROM accounts AS t1 JOIN checking AS t2 ON t1 . custid = t2 . custid JOIN savings AS t3 ON t1 . custid = t3 . custid ORDER BY t3 . balance LIMIT 1 |
match_season | country : Country_id (number) , Country_name (text) , Capital (text) , Official_native_language (text) | team : Team_id (number) , Name (text) | match_season : Season (number) , Player (text) , Position (text) , Country (number) , Team (number) , Draft_Pick_Number (number) , Draft_Class (text) , College (text) | player... | What are the names of all colleges that have two or more players? | SELECT college FROM match_season GROUP BY college HAVING count ( * ) >= 2 |
college_2 | classroom : building (text) , room_number (text) , capacity (number) | department : dept_name (text) , building (text) , budget (number) | course : course_id (text) , title (text) , dept_name (text) , credits (number) | instructor : ID (text) , name (text) , dept_name (text) , salary (number) | section : course_id (tex... | What are the names of all instructors who advise students in the math depart sorted by total credits of the student. | SELECT t2 . name FROM advisor AS t1 JOIN instructor AS t2 ON t1 . i_id = t2 . id JOIN student AS t3 ON t1 . s_id = t3 . id WHERE t3 . dept_name = 'math' ORDER BY t3 . tot_cred |
product_catalog | Attribute_Definitions : attribute_id (number) , attribute_name (text) , attribute_data_type (text) | Catalogs : catalog_id (number) , catalog_name (text) , catalog_publisher (text) , date_of_publication (time) , date_of_latest_revision (time) | Catalog_Structure : catalog_level_number (number) , catalog_id (number) , c... | Which catalog contents have a product stock number that starts from "2"? Show the catalog entry names. | SELECT catalog_entry_name FROM catalog_contents WHERE product_stock_number LIKE "2%" |
department_management | department : Department_ID (number) , Name (text) , Creation (text) , Ranking (number) , Budget_in_Billions (number) , Num_Employees (number) | head : head_ID (number) , name (text) , born_state (text) , age (number) | management : department_ID (number) , head_ID (number) , temporary_acting (text) | List the name, born state and age of the heads of departments ordered by age. | SELECT name , born_state , age FROM head ORDER BY age |
wine_1 | grapes : ID (number) , Grape (text) , Color (text) | appellations : No (number) , Appelation (text) , County (text) , State (text) , Area (text) , isAVA (text) | wine : No (number) , Grape (text) , Winery (text) , Appelation (text) , State (text) , Name (text) , Year (number) , Price (number) , Score (number) , Cases (... | Find the appelations that produce wines after the year of 2008 but not in Central Coast area. | SELECT appelation FROM wine WHERE YEAR > 2008 EXCEPT SELECT appelation FROM appellations WHERE area = "Central Coast" |
products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (nu... | What are the names, color descriptions, and product descriptions for products in the 'Herbs' category? | SELECT t1 . product_name , t2 . color_description , t1 . product_description FROM products AS t1 JOIN ref_colors AS t2 ON t1 . color_code = t2 . color_code WHERE product_category_code = "Herbs" |
railway | railway : Railway_ID (number) , Railway (text) , Builder (text) , Built (text) , Wheels (text) , Location (text) , ObjectNumber (text) | train : Train_ID (number) , Train_Num (text) , Name (text) , From (text) , Arrival (text) , Railway_ID (number) | manager : Manager_ID (number) , Name (text) , Country (text) , Workin... | List the object number of railways that do not have any trains. | SELECT objectnumber FROM railway WHERE railway_id NOT IN ( SELECT railway_id FROM train ) |
ship_1 | captain : Captain_ID (number) , Name (text) , Ship_ID (number) , age (text) , Class (text) , Rank (text) | Ship : Ship_ID (number) , Name (text) , Type (text) , Built_Year (number) , Class (text) , Flag (text) | What are the average and minimum age of captains in different class? | SELECT avg ( age ) , min ( age ) , CLASS FROM captain GROUP BY CLASS |
protein_institute | building : building_id (text) , Name (text) , Street_address (text) , Years_as_tallest (text) , Height_feet (number) , Floors (number) | Institution : Institution_id (text) , Institution (text) , Location (text) , Founded (number) , Type (text) , Enrollment (number) , Team (text) , Primary_Conference (text) , building_... | List the names of buildings with at least 200 feet of height and with at least 20 floors. | SELECT name FROM building WHERE height_feet >= 200 AND floors >= 20 |
manufactory_1 | Manufacturers : Code (number) , Name (text) , Headquarter (text) , Founder (text) , Revenue (number) | Products : Code (number) , Name (text) , Price (number) , Manufacturer (number) | Find the total revenue of companies whose revenue is larger than the revenue of some companies based in Austin. | SELECT sum ( revenue ) FROM manufacturers WHERE revenue > ( SELECT min ( revenue ) FROM manufacturers WHERE headquarter = 'austin' ) |
student_assessment | Addresses : address_id (number) , line_1 (text) , line_2 (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | People : person_id (number) , first_name (text) , middle_name (text) , last_name (text) , cell_mobile_number (text) , email_address (text) , login_name (text) , password ... | How many courses does the student with id 171 actually attend? | SELECT count ( * ) FROM courses AS t1 JOIN student_course_attendance AS t2 ON t1 . course_id = t2 . course_id WHERE t2 . student_id = 171 |
hospital_1 | Physician : EmployeeID (number) , Name (text) , Position (text) , SSN (number) | Department : DepartmentID (number) , Name (text) , Head (number) | Affiliated_With : Physician (number) , Department (number) , PrimaryAffiliation (boolean) | Procedures : Code (number) , Name (text) , Cost (number) | Trained_In : Physicia... | Find the names of all procedures such that the cost is less than 5000 and physician John Wen was trained in. | SELECT name FROM procedures WHERE cost < 5000 INTERSECT SELECT t3 . name FROM physician AS t1 JOIN trained_in AS t2 ON t1 . employeeid = t2 . physician JOIN procedures AS t3 ON t3 . code = t2 . treatment WHERE t1 . name = "John Wen" |
workshop_paper | workshop : Workshop_ID (number) , Date (text) , Venue (text) , Name (text) | submission : Submission_ID (number) , Scores (number) , Author (text) , College (text) | Acceptance : Submission_ID (number) , Workshop_ID (number) , Result (text) | Which college has the most authors with submissions? | SELECT college FROM submission GROUP BY college ORDER BY count ( * ) DESC LIMIT 1 |
gymnast | gymnast : Gymnast_ID (number) , Floor_Exercise_Points (number) , Pommel_Horse_Points (number) , Rings_Points (number) , Vault_Points (number) , Parallel_Bars_Points (number) , Horizontal_Bar_Points (number) , Total_Points (number) | people : People_ID (number) , Name (text) , Age (number) , Height (number) , Hometown (... | What is the average age of all gymnasts? | SELECT avg ( t2 . age ) FROM gymnast AS t1 JOIN people AS t2 ON t1 . gymnast_id = t2 . people_id |
customers_and_products_contacts | Addresses : address_id (number) , line_1_number_building (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | Products : product_id (number) , product_type_code (text) , product_name (text) , product_price (number) | Customers : customer_id (number) , payment_method_code (text) ,... | Show each state and the number of addresses in each state. | SELECT state_province_county , count ( * ) FROM addresses GROUP BY state_province_county |
cre_Docs_and_Epenses | Ref_Document_Types : Document_Type_Code (text) , Document_Type_Name (text) , Document_Type_Description (text) | Ref_Budget_Codes : Budget_Type_Code (text) , Budget_Type_Description (text) | Projects : Project_ID (number) , Project_Details (text) | Documents : Document_ID (number) , Document_Type_Code (text) , Project_I... | Count the number of accounts. | SELECT count ( * ) FROM accounts |
college_1 | CLASS : CLASS_CODE (text) , CRS_CODE (text) , CLASS_SECTION (text) , CLASS_TIME (text) , CLASS_ROOM (text) , PROF_NUM (number) | COURSE : CRS_CODE (text) , DEPT_CODE (text) , CRS_DESCRIPTION (text) , CRS_CREDIT (number) | DEPARTMENT : DEPT_CODE (text) , DEPT_NAME (text) , SCHOOL_CODE (text) , EMP_NUM (number) , DEPT_AD... | Find the total number of hours have done for all students in each department. | SELECT sum ( stu_hrs ) , dept_code FROM student GROUP BY dept_code |
coffee_shop | shop : Shop_ID (number) , Address (text) , Num_of_staff (text) , Score (number) , Open_Year (text) | member : Member_ID (number) , Name (text) , Membership_card (text) , Age (number) , Time_of_purchase (number) , Level_of_membership (number) , Address (text) | happy_hour : HH_ID (number) , Shop_ID (number) , Month (tex... | Find the ids and names of members who are under age 30 or with black membership card. | SELECT name , member_id FROM member WHERE membership_card = 'black' OR age < 30 |
student_1 | list : LastName (text) , FirstName (text) , Grade (number) , Classroom (number) | teachers : LastName (text) , FirstName (text) , Classroom (number) | Which grade is studying in classroom 103? | SELECT DISTINCT grade FROM list WHERE classroom = 103 |
wrestler | wrestler : Wrestler_ID (number) , Name (text) , Reign (text) , Days_held (text) , Location (text) , Event (text) | Elimination : Elimination_ID (text) , Wrestler_ID (text) , Team (text) , Eliminated_By (text) , Elimination_Move (text) , Time (text) | Show the times of elimination by "Punk" or "Orton". | SELECT TIME FROM elimination WHERE eliminated_by = "Punk" OR eliminated_by = "Orton" |
hr_1 | regions : REGION_ID (number) , REGION_NAME (text) | countries : COUNTRY_ID (text) , COUNTRY_NAME (text) , REGION_ID (number) | departments : DEPARTMENT_ID (number) , DEPARTMENT_NAME (text) , MANAGER_ID (number) , LOCATION_ID (number) | jobs : JOB_ID (text) , JOB_TITLE (text) , MIN_SALARY (number) , MAX_SALARY (number) ... | what is the phone number of employees whose salary is in the range of 8000 and 12000? | SELECT phone_number FROM employees WHERE salary BETWEEN 8000 AND 12000 |
e_learning | Course_Authors_and_Tutors : author_id (number) , author_tutor_ATB (text) , login_name (text) , password (text) , personal_name (text) , middle_name (text) , family_name (text) , gender_mf (text) , address_line_1 (text) | Students : student_id (number) , date_of_registration (time) , date_of_latest_logon (time) , login_... | How many students have personal names that contain the word "son"? | SELECT count ( * ) FROM students WHERE personal_name LIKE "%son%" |
college_2 | classroom : building (text) , room_number (text) , capacity (number) | department : dept_name (text) , building (text) , budget (number) | course : course_id (text) , title (text) , dept_name (text) , credits (number) | instructor : ID (text) , name (text) , dept_name (text) , salary (number) | section : course_id (tex... | What are the distinct salaries of all instructors who earned less than the maximum salary? | SELECT DISTINCT salary FROM instructor WHERE salary < ( SELECT max ( salary ) FROM instructor ) |
culture_company | book_club : book_club_id (number) , Year (number) , Author_or_Editor (text) , Book_Title (text) , Publisher (text) , Category (text) , Result (text) | movie : movie_id (number) , Title (text) , Year (number) , Director (text) , Budget_million (number) , Gross_worldwide (number) | culture_company : Company_name (text) ,... | Show all director names who have a movie in the year 1999 or 2000. | SELECT director FROM movie WHERE YEAR = 1999 OR YEAR = 2000 |
hr_1 | regions : REGION_ID (number) , REGION_NAME (text) | countries : COUNTRY_ID (text) , COUNTRY_NAME (text) , REGION_ID (number) | departments : DEPARTMENT_ID (number) , DEPARTMENT_NAME (text) , MANAGER_ID (number) , LOCATION_ID (number) | jobs : JOB_ID (text) , JOB_TITLE (text) , MIN_SALARY (number) , MAX_SALARY (number) ... | What are the emails of employees with null commission, salary between 7000 and 12000, and who work in department 50? | SELECT email FROM employees WHERE commission_pct = "null" AND salary BETWEEN 7000 AND 12000 AND department_id = 50 |
products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (nu... | Find the category descriptions of the products whose descriptions include letter 't'. | SELECT t1 . product_category_description FROM ref_product_categories AS t1 JOIN products AS t2 ON t1 . product_category_code = t2 . product_category_code WHERE t2 . product_description LIKE '%t%' |
driving_school | Addresses : address_id (number) , line_1_number_building (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | Staff : staff_id (number) , staff_address_id (number) , nickname (text) , first_name (text) , middle_name (text) , last_name (text) , date_of_birth (time) , date_joined_s... | What are the last names that are used by customers and staff? | SELECT last_name FROM customers INTERSECT SELECT last_name FROM staff |
college_2 | classroom : building (text) , room_number (text) , capacity (number) | department : dept_name (text) , building (text) , budget (number) | course : course_id (text) , title (text) , dept_name (text) , credits (number) | instructor : ID (text) , name (text) , dept_name (text) , salary (number) | section : course_id (tex... | What is the year and semester with the most courses? | SELECT semester , YEAR FROM SECTION GROUP BY semester , YEAR ORDER BY count ( * ) DESC LIMIT 1 |
driving_school | Addresses : address_id (number) , line_1_number_building (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | Staff : staff_id (number) , staff_address_id (number) , nickname (text) , first_name (text) , middle_name (text) , last_name (text) , date_of_birth (time) , date_joined_s... | What is the first name of the staff who did not give any lesson? | SELECT first_name FROM staff EXCEPT SELECT t2 . first_name FROM lessons AS t1 JOIN staff AS t2 ON t1 . staff_id = t2 . staff_id |
flight_4 | routes : rid (number) , dst_apid (number) , dst_ap (text) , src_apid (number) , src_ap (text) , alid (number) , airline (text) , codeshare (text) | airports : apid (number) , name (text) , city (text) , country (text) , x (number) , y (number) , elevation (number) , iata (text) , icao (text) | airlines : alid (number) ... | What is the number of airlines based in Russia? | SELECT count ( * ) FROM airlines WHERE country = 'russia' |
election | county : County_Id (number) , County_name (text) , Population (number) , Zip_code (text) | party : Party_ID (number) , Year (number) , Party (text) , Governor (text) , Lieutenant_Governor (text) , Comptroller (text) , Attorney_General (text) , US_Senate (text) | election : Election_ID (number) , Counties_Represented (t... | Show the name of the county with the biggest population. | SELECT county_name FROM county ORDER BY population DESC LIMIT 1 |
student_assessment | Addresses : address_id (number) , line_1 (text) , line_2 (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | People : person_id (number) , first_name (text) , middle_name (text) , last_name (text) , cell_mobile_number (text) , email_address (text) , login_name (text) , password ... | What are the first and last names of all the candidates? | SELECT t2 . first_name , t2 . last_name FROM candidates AS t1 JOIN people AS t2 ON t1 . candidate_id = t2 . person_id |
cre_Doc_Tracking_DB | Ref_Document_Types : Document_Type_Code (text) , Document_Type_Name (text) , Document_Type_Description (text) | Ref_Calendar : Calendar_Date (time) , Day_Number (number) | Ref_Locations : Location_Code (text) , Location_Name (text) , Location_Description (text) | Roles : Role_Code (text) , Role_Name (text) , Role_Descr... | What is the date when the document "Marry CV" was stored? | SELECT date_stored FROM all_documents WHERE document_name = "Marry CV" |
baseball_1 | all_star : player_id (text) , year (number) , game_num (number) , game_id (text) , team_id (text) , league_id (text) , gp (number) , starting_pos (number) | appearances : year (number) , team_id (text) , league_id (text) , player_id (text) , g_all (number) , gs (number) , g_batting (number) , g_defense (number) , g_p (... | Find the id and rank of the team that has the highest average attendance rate in 2014. | SELECT t2 . team_id , t2 . rank FROM home_game AS t1 JOIN team AS t2 ON t1 . team_id = t2 . team_id WHERE t1 . year = 2014 GROUP BY t1 . team_id ORDER BY avg ( t1 . attendance ) DESC LIMIT 1 ; |
aircraft | pilot : Pilot_Id (number) , Name (text) , Age (number) | aircraft : Aircraft_ID (number) , Aircraft (text) , Description (text) , Max_Gross_Weight (text) , Total_disk_area (text) , Max_disk_Loading (text) | match : Round (number) , Location (text) , Country (text) , Date (text) , Fastest_Qualifying (text) , Winning_Pil... | Please list the location and the winning aircraft name. | SELECT t2 . location , t1 . aircraft FROM aircraft AS t1 JOIN MATCH AS t2 ON t1 . aircraft_id = t2 . winning_aircraft |
inn_1 | Rooms : RoomId (text) , roomName (text) , beds (number) , bedType (text) , maxOccupancy (number) , basePrice (number) , decor (text) | Reservations : Code (number) , Room (text) , CheckIn (text) , CheckOut (text) , Rate (number) , LastName (text) , FirstName (text) , Adults (number) , Kids (number) | Find all the rooms that have a price higher than 160 and can accommodate more than 2 people. Report room names and ids. | SELECT roomname , roomid FROM rooms WHERE baseprice > 160 AND maxoccupancy > 2 ; |
flight_1 | flight : flno (number) , origin (text) , destination (text) , distance (number) , departure_date (time) , arrival_date (time) , price (number) , aid (number) | aircraft : aid (number) , name (text) , distance (number) | employee : eid (number) , name (text) , salary (number) | certificate : eid (number) , aid (number) | Show the id and name of the aircraft with the maximum distance. | SELECT aid , name FROM aircraft ORDER BY distance DESC LIMIT 1 |
music_4 | artist : Artist_ID (number) , Artist (text) , Age (number) , Famous_Title (text) , Famous_Release_date (text) | volume : Volume_ID (number) , Volume_Issue (text) , Issue_Date (text) , Weeks_on_Top (number) , Song (text) , Artist_ID (number) | music_festival : ID (number) , Music_Festival (text) , Date_of_ceremony (text... | What are the songs in volumes with more than 1 week on top? | SELECT song FROM volume WHERE weeks_on_top > 1 |
climbing | mountain : Mountain_ID (number) , Name (text) , Height (number) , Prominence (number) , Range (text) , Country (text) | climber : Climber_ID (number) , Name (text) , Country (text) , Time (text) , Points (number) , Mountain_ID (number) | Show the height of the mountain climbed by the climber with the maximum points. | SELECT t2 . height FROM climber AS t1 JOIN mountain AS t2 ON t1 . mountain_id = t2 . mountain_id ORDER BY t1 . points DESC LIMIT 1 |
cre_Doc_Tracking_DB | Ref_Document_Types : Document_Type_Code (text) , Document_Type_Name (text) , Document_Type_Description (text) | Ref_Calendar : Calendar_Date (time) , Day_Number (number) | Ref_Locations : Location_Code (text) , Location_Name (text) , Location_Description (text) | Roles : Role_Code (text) , Role_Name (text) , Role_Descr... | Show the number of document types. | SELECT count ( * ) FROM ref_document_types |
baseball_1 | all_star : player_id (text) , year (number) , game_num (number) , game_id (text) , team_id (text) , league_id (text) , gp (number) , starting_pos (number) | appearances : year (number) , team_id (text) , league_id (text) , player_id (text) , g_all (number) , gs (number) , g_batting (number) , g_defense (number) , g_p (... | What are the first name and last name of the players whose death record is empty? | SELECT name_first , name_last FROM player WHERE death_year = '' ; |
ship_mission | mission : Mission_ID (number) , Ship_ID (number) , Code (text) , Launched_Year (number) , Location (text) , Speed_knots (number) , Fate (text) | ship : Ship_ID (number) , Name (text) , Type (text) , Nationality (text) , Tonnage (number) | What are the mission codes, fates, and names of the ships involved? | SELECT t1 . code , t1 . fate , t2 . name FROM mission AS t1 JOIN ship AS t2 ON t1 . ship_id = t2 . ship_id |
manufacturer | manufacturer : Manufacturer_ID (number) , Open_Year (number) , Name (text) , Num_of_Factories (number) , Num_of_Shops (number) | furniture : Furniture_ID (number) , Name (text) , Num_of_Component (number) , Market_Rate (number) | furniture_manufacte : Manufacturer_ID (number) , Furniture_ID (number) , Price_in_Dollar (... | Find the id and number of shops for the company that produces the most expensive furniture. | SELECT t1 . manufacturer_id , t1 . num_of_shops FROM manufacturer AS t1 JOIN furniture_manufacte AS t2 ON t1 . manufacturer_id = t2 . manufacturer_id ORDER BY t2 . price_in_dollar DESC LIMIT 1 |
products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (nu... | What is the unit of measuerment of the product category code "Herbs"? | SELECT unit_of_measure FROM ref_product_categories WHERE product_category_code = "Herbs" |
e_government | Addresses : address_id (number) , line_1_number_building (text) , town_city (text) , zip_postcode (text) , state_province_county (text) , country (text) | Services : service_id (number) , service_type_code (text) , service_name (text) , service_descriptio (text) | Forms : form_id (number) , form_type_code (text) , serv... | Find the last name of the individuals that have been contact individuals of an organization. | SELECT DISTINCT t1 . individual_last_name FROM individuals AS t1 JOIN organization_contact_individuals AS t2 ON t1 . individual_id = t2 . individual_id |
formula_1 | circuits : circuitId (number) , circuitRef (text) , name (text) , location (text) , country (text) , lat (number) , lng (number) , alt (number) , url (text) | races : raceId (number) , year (number) , round (number) , circuitId (number) , name (text) , date (text) , time (text) , url (text) | drivers : driverId (number... | For each race name, What is the maximum fastest lap speed for races after 2004 ordered by year? | SELECT max ( t2 . fastestlapspeed ) , t1 . name , t1 . year FROM races AS t1 JOIN results AS t2 ON t1 . raceid = t2 . raceid WHERE t1 . year > 2014 GROUP BY t1 . name ORDER BY t1 . year |
loan_1 | bank : branch_ID (number) , bname (text) , no_of_customers (number) , city (text) , state (text) | customer : cust_ID (text) , cust_name (text) , acc_type (text) , acc_bal (number) , no_of_loans (number) , credit_score (number) , branch_ID (number) , state (text) | loan : loan_ID (text) , loan_type (text) , cust_ID (te... | What city and state is the bank with the name morningside in? | SELECT city , state FROM bank WHERE bname = 'morningside' |
department_store | Addresses : address_id (number) , address_details (text) | Staff : staff_id (number) , staff_gender (text) , staff_name (text) | Suppliers : supplier_id (number) , supplier_name (text) , supplier_phone (text) | Department_Store_Chain : dept_store_chain_id (number) , dept_store_chain_name (text) | Customers : customer_i... | List the names of all the distinct customers who bought a keyboard. | SELECT DISTINCT t1 . customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1 . customer_id = t2 . customer_id JOIN order_items AS t3 ON t2 . order_id = t3 . order_id JOIN products AS t4 ON t3 . product_id = t4 . product_id WHERE t4 . product_name = "keyboard" |
network_2 | Person : name (text) , age (number) , city (text) , gender (text) , job (text) | PersonFriend : name (text) , friend (text) , year (number) | Whare the names, friends, and ages of all people who are older than the average age of a person? | SELECT DISTINCT t2 . name , t2 . friend , t1 . age FROM person AS t1 JOIN personfriend AS t2 ON t1 . name = t2 . friend WHERE t1 . age > ( SELECT avg ( age ) FROM person ) |
flight_4 | routes : rid (number) , dst_apid (number) , dst_ap (text) , src_apid (number) , src_ap (text) , alid (number) , airline (text) , codeshare (text) | airports : apid (number) , name (text) , city (text) , country (text) , x (number) , y (number) , elevation (number) , iata (text) , icao (text) | airlines : alid (number) ... | What are the names of the airports in the city of Goroka? | SELECT name FROM airports WHERE city = 'goroka' |
manufactory_1 | Manufacturers : Code (number) , Name (text) , Headquarter (text) , Founder (text) , Revenue (number) | Products : Code (number) , Name (text) , Price (number) , Manufacturer (number) | What is the average price of products with manufacturer codes equal to 2? | SELECT avg ( price ) FROM products WHERE manufacturer = 2 |
protein_institute | building : building_id (text) , Name (text) , Street_address (text) , Years_as_tallest (text) , Height_feet (number) , Floors (number) | Institution : Institution_id (text) , Institution (text) , Location (text) , Founded (number) , Type (text) , Enrollment (number) , Team (text) , Primary_Conference (text) , building_... | Show the protein name and the institution name. | SELECT t2 . protein_name , t1 . institution FROM institution AS t1 JOIN protein AS t2 ON t1 . institution_id = t2 . institution_id |
music_1 | genre : g_name (text) , rating (text) , most_popular_in (text) | artist : artist_name (text) , country (text) , gender (text) , preferred_genre (text) | files : f_id (number) , artist_name (text) , file_size (text) , duration (text) , formats (text) | song : song_name (text) , artist_name (text) , country (text) , f_id... | What is the language that was used most often in songs with resolution above 500? | SELECT artist_name FROM song WHERE resolution > 500 GROUP BY languages ORDER BY count ( * ) DESC LIMIT 1 |
icfp_1 | Inst : instID (number) , name (text) , country (text) | Authors : authID (number) , lname (text) , fname (text) | Papers : paperID (number) , title (text) | Authorship : authID (number) , instID (number) , paperID (number) , authOrder (number) | Which author has written the most papers? Find his or her last name. | SELECT t1 . lname FROM authors AS t1 JOIN authorship AS t2 ON t1 . authid = t2 . authid JOIN papers AS t3 ON t2 . paperid = t3 . paperid GROUP BY t1 . fname , t1 . lname ORDER BY count ( * ) DESC LIMIT 1 |
chinook_1 | Album : AlbumId (number) , Title (text) , ArtistId (number) | Artist : ArtistId (number) , Name (text) | Customer : CustomerId (number) , FirstName (text) , LastName (text) , Company (text) , Address (text) , City (text) , State (text) , Country (text) , PostalCode (text) , Phone (text) , Fax (text) , Email (text) , Su... | What are the names of artist who have the letter 'a' in their names? | SELECT name FROM artist WHERE name LIKE "%a%" |
apartment_rentals | Apartment_Buildings : building_id (number) , building_short_name (text) , building_full_name (text) , building_description (text) , building_address (text) , building_manager (text) , building_phone (text) | Apartments : apt_id (number) , building_id (number) , apt_type_code (text) , apt_number (text) , bathroom_count ... | Sort the apartment numbers in ascending order of room count. | SELECT apt_number FROM apartments ORDER BY room_count ASC |
hr_1 | regions : REGION_ID (number) , REGION_NAME (text) | countries : COUNTRY_ID (text) , COUNTRY_NAME (text) , REGION_ID (number) | departments : DEPARTMENT_ID (number) , DEPARTMENT_NAME (text) , MANAGER_ID (number) , LOCATION_ID (number) | jobs : JOB_ID (text) , JOB_TITLE (text) , MIN_SALARY (number) , MAX_SALARY (number) ... | display the department name and number of employees in each of the department. | SELECT t2 . department_name , count ( * ) FROM employees AS t1 JOIN departments AS t2 ON t1 . department_id = t2 . department_id GROUP BY t2 . department_name |
wine_1 | grapes : ID (number) , Grape (text) , Color (text) | appellations : No (number) , Appelation (text) , County (text) , State (text) , Area (text) , isAVA (text) | wine : No (number) , Grape (text) , Winery (text) , Appelation (text) , State (text) , Name (text) , Year (number) , Price (number) , Score (number) , Cases (... | Find the white grape used to produce wines with scores above 90. | SELECT DISTINCT t1 . grape FROM grapes AS t1 JOIN wine AS t2 ON t1 . grape = t2 . grape WHERE t1 . color = "White" AND t2 . score > 90 |
local_govt_mdm | Customer_Master_Index : master_customer_id (number) , cmi_details (text) | CMI_Cross_References : cmi_cross_ref_id (number) , master_customer_id (number) , source_system_code (text) | Council_Tax : council_tax_id (number) , cmi_cross_ref_id (number) | Business_Rates : business_rates_id (number) , cmi_cross_ref_id (numb... | what are the details of the cmi masters that have the cross reference code 'Tax'? | SELECT t1 . cmi_details FROM customer_master_index AS t1 JOIN cmi_cross_references AS t2 ON t1 . master_customer_id = t2 . master_customer_id WHERE t2 . source_system_code = 'tax' |
dorm_1 | Student : StuID (number) , LName (text) , Fname (text) , Age (number) , Sex (text) , Major (number) , Advisor (number) , city_code (text) | Dorm : dormid (number) , dorm_name (text) , student_capacity (number) , gender (text) | Dorm_amenity : amenid (number) , amenity_name (text) | Has_amenity : dormid (number) , ameni... | What are the names of the dorm that does not have a TV Lounge? | SELECT dorm_name FROM dorm EXCEPT SELECT t1 . dorm_name FROM dorm AS t1 JOIN has_amenity AS t2 ON t1 . dormid = t2 . dormid JOIN dorm_amenity AS t3 ON t2 . amenid = t3 . amenid WHERE t3 . amenity_name = 'tv lounge' |
music_4 | artist : Artist_ID (number) , Artist (text) , Age (number) , Famous_Title (text) , Famous_Release_date (text) | volume : Volume_ID (number) , Volume_Issue (text) , Issue_Date (text) , Weeks_on_Top (number) , Song (text) , Artist_ID (number) | music_festival : ID (number) , Music_Festival (text) , Date_of_ceremony (text... | Return the issue date of the volume that has spent the fewest weeks on top. | SELECT issue_date FROM volume ORDER BY weeks_on_top ASC LIMIT 1 |
election | county : County_Id (number) , County_name (text) , Population (number) , Zip_code (text) | party : Party_ID (number) , Year (number) , Party (text) , Governor (text) , Lieutenant_Governor (text) , Comptroller (text) , Attorney_General (text) , US_Senate (text) | election : Election_ID (number) , Counties_Represented (t... | Show the people that have been governor the most times. | SELECT governor FROM party GROUP BY governor ORDER BY count ( * ) DESC LIMIT 1 |
insurance_policies | Customers : Customer_ID (number) , Customer_Details (text) | Customer_Policies : Policy_ID (number) , Customer_ID (number) , Policy_Type_Code (text) , Start_Date (time) , End_Date (time) | Claims : Claim_ID (number) , Policy_ID (number) , Date_Claim_Made (time) , Date_Claim_Settled (time) , Amount_Claimed (number) , Am... | List the method, date and amount of all the payments, in ascending order of date. | SELECT payment_method_code , date_payment_made , amount_payment FROM payments ORDER BY date_payment_made ASC |
entrepreneur | entrepreneur : Entrepreneur_ID (number) , People_ID (number) , Company (text) , Money_Requested (number) , Investor (text) | people : People_ID (number) , Name (text) , Height (number) , Weight (number) , Date_of_Birth (text) | What are the investors of entrepreneurs and the corresponding number of entrepreneurs invested by each investor? | SELECT investor , count ( * ) FROM entrepreneur GROUP BY investor |
gymnast | gymnast : Gymnast_ID (number) , Floor_Exercise_Points (number) , Pommel_Horse_Points (number) , Rings_Points (number) , Vault_Points (number) , Parallel_Bars_Points (number) , Horizontal_Bar_Points (number) , Total_Points (number) | people : People_ID (number) , Name (text) , Age (number) , Height (number) , Hometown (... | Return the names of gymnasts who did not grow up in Santo Domingo. | SELECT t2 . name FROM gymnast AS t1 JOIN people AS t2 ON t1 . gymnast_id = t2 . people_id WHERE t2 . hometown != "Santo Domingo" |
products_for_hire | Discount_Coupons : coupon_id (number) , date_issued (time) , coupon_amount (number) | Customers : customer_id (number) , coupon_id (number) , good_or_bad_customer (text) , first_name (text) , last_name (text) , gender_mf (text) , date_became_customer (time) , date_last_hire (time) | Bookings : booking_id (number) , cus... | What are the coupon amount of the coupons owned by both good and bad customers? | SELECT t1 . coupon_amount FROM discount_coupons AS t1 JOIN customers AS t2 ON t1 . coupon_id = t2 . coupon_id WHERE t2 . good_or_bad_customer = 'good' INTERSECT SELECT t1 . coupon_amount FROM discount_coupons AS t1 JOIN customers AS t2 ON t1 . coupon_id = t2 . coupon_id WHERE t2 . good_or_bad_customer = 'bad' |
music_2 | Songs : SongId (number) , Title (text) | Albums : AId (number) , Title (text) , Year (number) , Label (text) , Type (text) | Band : Id (number) , Firstname (text) , Lastname (text) | Instruments : SongId (number) , BandmateId (number) , Instrument (text) | Performance : SongId (number) , Bandmate (number) , StagePositi... | What instruments did the musician with the last name "Heilo" play in "Badlands"? | SELECT t4 . instrument FROM performance AS t1 JOIN band AS t2 ON t1 . bandmate = t2 . id JOIN songs AS t3 ON t3 . songid = t1 . songid JOIN instruments AS t4 ON t4 . songid = t3 . songid AND t4 . bandmateid = t2 . id WHERE t2 . lastname = "Heilo" AND t3 . title = "Badlands" |
student_1 | list : LastName (text) , FirstName (text) , Grade (number) , Classroom (number) | teachers : LastName (text) , FirstName (text) , Classroom (number) | Which students study under the teacher named OTHA MOYER? Give me the first and last names of the students. | SELECT t1 . firstname , t1 . lastname FROM list AS t1 JOIN teachers AS t2 ON t1 . classroom = t2 . classroom WHERE t2 . firstname = "OTHA" AND t2 . lastname = "MOYER" |
student_assessment | Addresses : address_id (number) , line_1 (text) , line_2 (text) , city (text) , zip_postcode (text) , state_province_county (text) , country (text) | People : person_id (number) , first_name (text) , middle_name (text) , last_name (text) , cell_mobile_number (text) , email_address (text) , login_name (text) , password ... | Find distinct cities of addresses of people? | SELECT DISTINCT t1 . city FROM addresses AS t1 JOIN people_addresses AS t2 ON t1 . address_id = t2 . address_id |
customers_and_invoices | Customers : customer_id (number) , customer_first_name (text) , customer_middle_initial (text) , customer_last_name (text) , gender (text) , email_address (text) , login_name (text) , login_password (text) , phone_number (text) , town_city (text) , state_county_province (text) , country (text) | Orders : order_id (numb... | What are the different product sizes? | SELECT DISTINCT product_size FROM products |
document_management | Roles : role_code (text) , role_description (text) | Users : user_id (number) , role_code (text) , user_name (text) , user_login (text) , password (text) | Document_Structures : document_structure_code (text) , parent_document_structure_code (text) , document_structure_description (text) | Functional_Areas : functional... | What is the type of the document named "David CV"? | SELECT document_type_code FROM documents WHERE document_name = "David CV" |
products_gen_characteristics | Ref_Characteristic_Types : characteristic_type_code (text) , characteristic_type_description (text) | Ref_Colors : color_code (text) , color_description (text) | Ref_Product_Categories : product_category_code (text) , product_category_description (text) , unit_of_measure (text) | Characteristics : characteristic_id (nu... | List all characteristics of product named "sesame" with type code "Grade". | SELECT t3 . characteristic_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1 . product_id = t2 . product_id JOIN CHARACTERISTICS AS t3 ON t2 . characteristic_id = t3 . characteristic_id WHERE t1 . product_name = "sesame" AND t3 . characteristic_type_code = "Grade" |
film_rank | film : Film_ID (number) , Title (text) , Studio (text) , Director (text) , Gross_in_dollar (number) | market : Market_ID (number) , Country (text) , Number_cities (number) | film_market_estimation : Estimation_ID (number) , Low_Estimate (number) , High_Estimate (number) , Film_ID (number) , Type (text) , Market_ID (num... | Find the titles and studios of the films that are produced by some film studios that contained the word "Universal". | SELECT title , studio FROM film WHERE studio LIKE "%Universal%" |
End of preview. Expand in Data Studio
README.md exists but content is empty.
- Downloads last month
- 36