instruction
stringlengths
151
7.46k
output
stringlengths
2
4.44k
source
stringclasses
26 values
CREATE TABLE table_26996293_2 ( position VARCHAR, cfl_team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- where cfl team is edmonton (2) what are all the position
SELECT position FROM table_26996293_2 WHERE cfl_team = "Edmonton (2)"
sql_create_context
CREATE TABLE Has_Allergy ( StuID INTEGER, Allergy VARCHAR(20) ) CREATE TABLE Allergy_Type ( Allergy VARCHAR(20), AllergyType VARCHAR(20) ) CREATE TABLE Student ( StuID INTEGER, LName VARCHAR(12), Fname VARCHAR(12), Age INTEGER, Sex VARCHAR(1), Major INTEGER, Advisor INTEGER...
SELECT LName, Age FROM Student WHERE StuID IN (SELECT StuID FROM Has_Allergy WHERE Allergy = "Milk" INTERSECT SELECT StuID FROM Has_Allergy WHERE Allergy = "Cat")
nvbench
CREATE TABLE person_info ( CSD text, CSRQ time, GJDM text, GJMC text, JGDM text, JGMC text, MZDM text, MZMC text, RYBH text, XBDM number, XBMC text, XLDM text, XLMC text, XM text, ZYLBDM text, ZYMC text ) CREATE TABLE jyjgzbb ( BGDH text, BGRQ tim...
SELECT * FROM person_info JOIN hz_info JOIN mzjzjlb JOIN hz_info_mzjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = hz_info_mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND hz_info_mzjzjlb.JZLSH = mzjzjlb.JZLSH AND hz_info_mzjzjlb.YLJGDM = hz_info_mzjzjlb.YLJGDM AND hz_info_mzjz...
css
CREATE TABLE student_record ( student_id int, course_id int, semester int, grade varchar, how varchar, transfer_source varchar, earn_credit varchar, repeat_term varchar, test_id varchar ) CREATE TABLE gsi ( course_offering_id int, student_id int ) CREATE TABLE instructor ( ...
SELECT DISTINCT instructor.name FROM instructor INNER JOIN offering_instructor ON offering_instructor.instructor_id = instructor.instructor_id INNER JOIN course_offering ON offering_instructor.offering_id = course_offering.offering_id INNER JOIN course ON course.course_id = course_offering.course_id WHERE course.name L...
advising
CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number, systemicsystolic number, systemicdiastolic number, systemicmean number, observationtime time ) CREATE TABLE allergy ( allergy...
SELECT MAX(vitalperiodic.systemicsystolic) FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '002-58884')) AND NOT vitalperiodic.systemicsy...
eicu
CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text,...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.insurance = "Self Pay" AND demographic.days_stay > "27"
mimicsql_data
CREATE TABLE ref_document_types ( document_type_code text, document_type_name text, document_type_description text ) CREATE TABLE ref_locations ( location_code text, location_name text, location_description text ) CREATE TABLE all_documents ( document_id number, date_stored time, d...
SELECT COUNT(*) FROM ref_locations
spider
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) ...
SELECT demographic.diagnosis FROM demographic WHERE demographic.subject_id = "6983"
mimicsql_data
CREATE TABLE table_name_71 ( surface VARCHAR, week VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the surface that was played on during the week of March 16?
SELECT surface FROM table_name_71 WHERE week = "march 16"
sql_create_context
CREATE TABLE table_14958620_1 ( date VARCHAR, game_site VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- On which date was the game played at Tiger Stadium?
SELECT date FROM table_14958620_1 WHERE game_site = "Tiger Stadium"
sql_create_context
CREATE TABLE table_54055 ( "Week" real, "Date" text, "TV Time" text, "Opponent" text, "Result" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Tell me the date with result of l 13 9
SELECT "Date" FROM table_54055 WHERE "Result" = 'l 13–9'
wikisql
CREATE TABLE table_51170 ( "Season" text, "Races" real, "Podiums" real, "Pole" real, "FLaps" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- WHAT IS THE FLAPS WITH PODIUMS OF 24 AND RACES BIGGER THAN 143?
SELECT MAX("FLaps") FROM table_51170 WHERE "Podiums" = '24' AND "Races" > '143'
wikisql
CREATE TABLE Allergy_Type ( Allergy VARCHAR(20), AllergyType VARCHAR(20) ) CREATE TABLE Has_Allergy ( StuID INTEGER, Allergy VARCHAR(20) ) CREATE TABLE Student ( StuID INTEGER, LName VARCHAR(12), Fname VARCHAR(12), Age INTEGER, Sex VARCHAR(1), Major INTEGER, Advisor INTEGER...
SELECT Allergy, COUNT(*) FROM Has_Allergy GROUP BY Allergy ORDER BY Allergy
nvbench
CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE patient ( uniquepid text, patienthealthsystemstayid number, patientunitstayid number, gender text, age text, ethnicity text, hospitalid num...
SELECT COUNT(*) FROM treatment WHERE treatment.treatmentname = 'hematopoietic growth factors - filgrastim (neupogen)' AND DATETIME(treatment.treatmenttime) <= DATETIME(CURRENT_TIME(), '-3 year')
eicu
CREATE TABLE employees ( EMPLOYEE_ID decimal(6,0), FIRST_NAME varchar(20), LAST_NAME varchar(25), EMAIL varchar(25), PHONE_NUMBER varchar(20), HIRE_DATE date, JOB_ID varchar(10), SALARY decimal(8,2), COMMISSION_PCT decimal(2,2), MANAGER_ID decimal(6,0), DEPARTMENT_ID decimal(...
SELECT T1.SALARY, T1.DEPARTMENT_ID FROM employees AS T1 JOIN departments AS T2 ON T1.DEPARTMENT_ID = T2.DEPARTMENT_ID WHERE T1.EMPLOYEE_ID = T2.MANAGER_ID
nvbench
CREATE TABLE t_kc22 ( MED_EXP_DET_ID text, OVERALL_CD_ORG text, OVERALL_CD_PERSON text, MED_CLINIC_ID text, MED_EXP_BILL_ID text, SOC_SRT_DIRE_CD text, SOC_SRT_DIRE_NM text, DIRE_TYPE number, CHA_ITEM_LEV number, MED_INV_ITEM_TYPE text, MED_DIRE_CD text, MED_DIRE_NM text,...
SELECT COUNT(*) FROM t_kc21 JOIN t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE t_kc21.PERSON_ID = '44192397' AND t_kc22.STA_DATE BETWEEN '2016-04-29' AND '2016-04-30' AND t_kc22.SOC_SRT_DIRE_CD = '130906139'
css
CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number, ReviewTaskResultTypeId number, CreationDate time, RejectionReasonId number, Comment text ) CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId number, UserId number, VoteTypeId number, CreationDate tim...
SELECT TIME_TO_STR(CreationDate, '%Y') AS year, COUNT(Id) AS total FROM Posts WHERE PostTypeId = 1 AND Tags LIKE '%<r>%' GROUP BY TIME_TO_STR(CreationDate, '%Y') ORDER BY TIME_TO_STR(CreationDate, '%Y')
sede
CREATE TABLE table_name_60 ( surface VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the surface on 21 june 1993?
SELECT surface FROM table_name_60 WHERE date = "21 june 1993"
sql_create_context
CREATE TABLE table_53902 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Crowd has an Away team score of 17.8 (110)...
SELECT "Crowd" FROM table_53902 WHERE "Away team score" = '17.8 (110)'
wikisql
CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location t...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "AORTIC VALVE INSUFFIENCY\AORTIC VALVE REPLACEMENT /SDA" AND demographic.dod_year <= "2164.0"
mimicsql_data
CREATE TABLE table_name_23 ( third_place VARCHAR, total VARCHAR, rank VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many third places has a total greater than 2 and a rank less than 2?
SELECT third_place FROM table_name_23 WHERE total > 2 AND rank < 2
sql_create_context
CREATE TABLE Ref_Document_Types ( Document_Type_Code CHAR(15), Document_Type_Name VARCHAR(255), Document_Type_Description VARCHAR(255) ) CREATE TABLE Ref_Budget_Codes ( Budget_Type_Code CHAR(15), Budget_Type_Description VARCHAR(255) ) CREATE TABLE Statements ( Statement_ID INTEGER, Stateme...
SELECT T1.Budget_Type_Code, COUNT(T1.Budget_Type_Code) FROM Documents_with_Expenses AS T1 JOIN Ref_Budget_Codes AS T2 ON T1.Budget_Type_Code = T2.Budget_Type_Code GROUP BY T1.Budget_Type_Code ORDER BY COUNT(T1.Budget_Type_Code) DESC
nvbench
CREATE TABLE table_26914076_4 ( teleplay_by VARCHAR, directed_by VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who wrote the teleplay for the episode directed by Tim Robbins?
SELECT teleplay_by FROM table_26914076_4 WHERE directed_by = "Tim Robbins"
sql_create_context
CREATE TABLE table_72323 ( "Episode title" text, "Air date" text, "Reward" text, "Immunity" text, "Eliminated" text, "Vote" text, "Finish" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the vote on the episode where the finish was '...
SELECT "Vote" FROM table_72323 WHERE "Finish" = '10th Voted Out 3rd Jury Member Day 30'
wikisql
CREATE TABLE table_27614707_1 ( week__number VARCHAR, result VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What week number was the result bottom 3?
SELECT week__number FROM table_27614707_1 WHERE result = "Bottom 3"
sql_create_context
CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) C...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.expire_flag = "0" AND procedures.icd9_code = "5012"
mimicsql_data
CREATE TABLE d_labitems ( row_id number, itemid number, label text ) CREATE TABLE d_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE admissions ( row_id number, subject_id number, hadm_id number, admittime time, dischtime t...
SELECT DISTINCT cost.cost FROM cost WHERE cost.event_type = 'diagnoses_icd' AND cost.event_id IN (SELECT diagnoses_icd.row_id FROM diagnoses_icd WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'open wound site nos'))
mimic_iii
CREATE TABLE table_65191 ( "Rank" real, "Athlete" text, "Country" text, "Time" text, "Notes" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Rank has Notes of fb, and a Time of 5:57.31?
SELECT "Rank" FROM table_65191 WHERE "Notes" = 'fb' AND "Time" = '5:57.31'
wikisql
CREATE TABLE table_1499791_2 ( santee_sisseton VARCHAR, english_gloss VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the santee sisseton for morning
SELECT santee_sisseton FROM table_1499791_2 WHERE english_gloss = "morning"
sql_create_context
CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) C...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.dob_year < "2060" AND prescriptions.drug_type = "MAIN"
mimicsql_data
CREATE TABLE table_7404 ( "Model number" text, "Frequency" text, "L2 cache" text, "Multi 1" text, "Voltage" text, "Socket" text, "Release date" text, "Order part number" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What kind of Socket ...
SELECT "Socket" FROM table_7404 WHERE "Order part number" = 'tmrm72dam22gg'
wikisql
CREATE TABLE table_69656 ( "Player" text, "Score" text, "Balls" real, "Opponent" text, "Ground" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What player has a score of 79?
SELECT "Player" FROM table_69656 WHERE "Score" = '79'
wikisql
CREATE TABLE table_49454 ( "Year" real, "Album" text, "Artist" text, "Song" text, "Note" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When was the note a vocals and the album north (original motion picture soundtrack)?
SELECT "Year" FROM table_49454 WHERE "Note" = 'vocals' AND "Album" = 'north (original motion picture soundtrack)'
wikisql
CREATE TABLE table_name_4 ( reference VARCHAR, romaji_title VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the reference for the romani title da.i.su.ki?
SELECT reference FROM table_name_4 WHERE romaji_title = "da.i.su.ki"
sql_create_context
CREATE TABLE table_name_62 ( height__ft_ INTEGER, height__m_ VARCHAR, year_built VARCHAR, location VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the lowest height in feet for the building located in platz der einheit 1, gallus, that was buil...
SELECT MIN(height__ft_) FROM table_name_62 WHERE year_built > 1961 AND location = "platz der einheit 1, gallus" AND height__m_ < 130
sql_create_context
CREATE TABLE table_train_224 ( "id" int, "leukopenia" int, "urinary_albumin_excretion_rate" int, "cd4_count" int, "body_weight" float, "lymphopenia" int, "hba1c" float, "insulin_requirement" float, "proteinuria" int, "body_mass_index_bmi" float, "NOUSE" float ) -- Using val...
SELECT * FROM table_train_224 WHERE hba1c > 7
criteria2sql
CREATE TABLE paperdataset ( paperid int, datasetid int ) CREATE TABLE paper ( paperid int, title varchar, venueid int, year int, numciting int, numcitedby int, journalid int ) CREATE TABLE writes ( paperid int, authorid int ) CREATE TABLE journal ( journalid int, j...
SELECT DISTINCT paper.paperid FROM dataset, paper, paperdataset, venue WHERE dataset.datasetname = 'COCO' AND paperdataset.datasetid = dataset.datasetid AND paper.paperid = paperdataset.paperid AND paper.year = 2015 AND venue.venueid = paper.venueid AND venue.venuename = 'NIPS'
scholar
CREATE TABLE aircraft ( aid number(9,0), name varchar2(30), distance number(6,0) ) CREATE TABLE employee ( eid number(9,0), name varchar2(30), salary number(10,2) ) CREATE TABLE certificate ( eid number(9,0), aid number(9,0) ) CREATE TABLE flight ( flno number(4,0), origin var...
SELECT name, COUNT(*) FROM flight AS T1 JOIN aircraft AS T2 ON T1.aid = T2.aid GROUP BY T1.aid ORDER BY COUNT(*) DESC
nvbench
CREATE TABLE table_51174 ( "Name of ground" text, "Location" text, "Year" text, "FC matches" text, "LA matches" text, "T20 matches" text, "Total" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What T20 Match has a total of 23?
SELECT "T20 matches" FROM table_51174 WHERE "Total" = '23'
wikisql
CREATE TABLE equipment_sequence ( aircraft_code_sequence varchar, aircraft_code varchar ) CREATE TABLE time_interval ( period text, begin_time int, end_time int ) CREATE TABLE time_zone ( time_zone_code text, time_zone_name text, hours_from_gmt int ) CREATE TABLE compartment_class ( ...
SELECT DISTINCT aircraft_code FROM aircraft WHERE aircraft_code = '733'
atis
CREATE TABLE ReviewTaskStates ( Id number, Name text, Description text ) CREATE TABLE Comments ( Id number, PostId number, Score number, Text text, CreationDate time, UserDisplayName text, UserId number, ContentLicense text ) CREATE TABLE SuggestedEdits ( Id number, ...
WITH tagAndUserStats AS (SELECT t.TagName, p.OwnerUserId AS userid, SUM(p.Score) AS tagScore, COUNT(p.Id) AS postCount FROM Posts AS p INNER JOIN PostTags AS pt ON pt.PostId = COALESCE(p.ParentId, p.Id) INNER JOIN Tags AS t ON pt.TagId = t.Id WHERE p.OwnerUserId >= 1 AND p.PostTypeId = 2 AND p.CreationDate >= '##startd...
sede
CREATE TABLE table_22772 ( "Year" real, "World" real, "Asia" text, "Africa" text, "Europe" text, "Latin America/Caribbean" text, "Northern America" text, "Oceania" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the worlds smalles...
SELECT MIN("World") FROM table_22772
wikisql
CREATE TABLE table_name_35 ( fleet_number_s_ VARCHAR, quantity_made VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which fleet numbers has quanitity of 13?
SELECT fleet_number_s_ FROM table_name_35 WHERE quantity_made = "13"
sql_create_context
CREATE TABLE table_201_19 ( id number, "rank" number, "title" text, "studio" text, "director" text, "actors" text, "gross" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- who is the most high grossing director of 1965 ?
SELECT "director" FROM table_201_19 ORDER BY "gross" DESC LIMIT 1
squall
CREATE TABLE table_25572118_1 ( winning_team VARCHAR, series VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When fr2.0 9 is the series who is the winning team?
SELECT winning_team FROM table_25572118_1 WHERE series = "FR2.0 9"
sql_create_context
CREATE TABLE t_kc21 ( CLINIC_ID text, CLINIC_TYPE text, COMP_ID text, DATA_ID text, DIFF_PLACE_FLG number, FERTILITY_STS number, FLX_MED_ORG_ID text, HOSP_LEV number, HOSP_STS number, IDENTITY_CARD text, INPT_AREA_BED text, INSURED_IDENTITY number, INSURED_STS text, ...
SELECT t_kc21.MED_ORG_DEPT_CD, t_kc21.OUT_DIAG_DIS_CD, AVG(t_kc21.PERSON_AGE) FROM t_kc21 WHERE t_kc21.MED_SER_ORG_NO = '3425465' GROUP BY t_kc21.MED_ORG_DEPT_CD, t_kc21.OUT_DIAG_DIS_CD
css
CREATE TABLE table_name_26 ( home_team VARCHAR, venue VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the home team score at brunswick street oval?
SELECT home_team AS score FROM table_name_26 WHERE venue = "brunswick street oval"
sql_create_context
CREATE TABLE employees ( EMPLOYEE_ID decimal(6,0), FIRST_NAME varchar(20), LAST_NAME varchar(25), EMAIL varchar(25), PHONE_NUMBER varchar(20), HIRE_DATE date, JOB_ID varchar(10), SALARY decimal(8,2), COMMISSION_PCT decimal(2,2), MANAGER_ID decimal(6,0), DEPARTMENT_ID decimal(...
SELECT HIRE_DATE, AVG(SALARY) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' ORDER BY AVG(SALARY)
nvbench
CREATE TABLE table_name_57 ( nationality VARCHAR, player VARCHAR, years_in_orlando VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Nationality has a Player of keith bogans, and a Years in Orlando of 2006 2009?
SELECT nationality FROM table_name_57 WHERE player = "keith bogans" AND years_in_orlando = "2006–2009"
sql_create_context
CREATE TABLE table_23799417_2 ( total_viewers__in_millions_ VARCHAR, rating VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- If the rating is 9.1, what was the total viewers?
SELECT total_viewers__in_millions_ FROM table_23799417_2 WHERE rating = "9.1"
sql_create_context
CREATE TABLE airport ( airport_code varchar, airport_name text, airport_location text, state_code varchar, country_name varchar, time_zone_code varchar, minimum_connect_time int ) CREATE TABLE airport_service ( city_code varchar, airport_code varchar, miles_distant int, dire...
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, flight WHERE (((((((flight.arrival_time < 41 OR flight.time_elapsed >= 60) AND flight.departure_time > flight.arrival_time) AND date_day.day_number = 21 AND d...
atis
CREATE TABLE table_42904 ( "Year" real, "Award" text, "Category" text, "Nominated Work" text, "Result" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the Nominated Work earlier than 2003?
SELECT "Nominated Work" FROM table_42904 WHERE "Year" < '2003'
wikisql
CREATE TABLE code_description ( code varchar, description text ) CREATE TABLE city ( city_code varchar, city_name varchar, state_code varchar, country_name varchar, time_zone_code varchar ) CREATE TABLE flight_stop ( flight_id int, stop_number int, stop_days text, stop_airp...
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, flight WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'OAKLAND' AND date_day.day_number = 15 AND date_day.month_number = 10 AND ...
atis
CREATE TABLE t_kc22 ( AMOUNT number, CHA_ITEM_LEV number, DATA_ID text, DIRE_TYPE number, DOSE_FORM text, DOSE_UNIT text, EACH_DOSAGE text, EXP_OCC_DATE time, FLX_MED_ORG_ID text, FXBZ number, HOSP_DOC_CD text, HOSP_DOC_NM text, MED_CLINIC_ID text, MED_DIRE_CD tex...
SELECT gwyjzb.MED_ORG_DEPT_CD, gwyjzb.IN_DIAG_DIS_CD, MIN(t_kc24.ILL_PAY) FROM gwyjzb JOIN t_kc24 ON gwyjzb.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE gwyjzb.MED_SER_ORG_NO = '9424563' GROUP BY gwyjzb.MED_ORG_DEPT_CD, gwyjzb.IN_DIAG_DIS_CD UNION SELECT fgwyjzb.MED_ORG_DEPT_CD, fgwyjzb.IN_DIAG_DIS_CD, MIN(t_kc24.ILL_PAY...
css
CREATE TABLE table_78068 ( "Rank" real, "Player" text, "Country" text, "Earnings( $ )" real, "Wins" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the lowest level of Earnings($) to have a Wins value of 22 and a Rank lower than 2?
SELECT MIN("Earnings( $ )") FROM table_78068 WHERE "Wins" = '22' AND "Rank" < '2'
wikisql
CREATE TABLE table_13553701_1 ( mens_singles VARCHAR, womens_singles VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who are the mens singles and womens singles with sun yu?
SELECT mens_singles FROM table_13553701_1 WHERE womens_singles = "Sun Yu"
sql_create_context
CREATE TABLE table_name_47 ( surface VARCHAR, score_in_the_final VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- On what surface was the score in the final 0 6, 4 6?
SELECT surface FROM table_name_47 WHERE score_in_the_final = "0–6, 4–6"
sql_create_context
CREATE TABLE table_203_589 ( id number, "protein" text, "natural host" text, "normal function" text, "prion state" text, "prion phenotype" text, "year identified" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how any proteins have podospo...
SELECT COUNT("protein") FROM table_203_589 WHERE "natural host" = 'podospora anserina'
squall
CREATE TABLE characteristics ( characteristic_id number, characteristic_type_code text, characteristic_data_type text, characteristic_name text, other_characteristic_details text ) CREATE TABLE ref_characteristic_types ( characteristic_type_code text, characteristic_type_description text ) ...
SELECT COUNT(*) 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 JOIN ref_colors AS t4 ON t1.color_code = t4.color_code WHERE t4.color_description = "white" OR t3.characteristic_name = "hot"
spider
CREATE TABLE field ( fieldid int ) CREATE TABLE paperfield ( fieldid int, paperid int ) CREATE TABLE journal ( journalid int, journalname varchar ) CREATE TABLE paperkeyphrase ( paperid int, keyphraseid int ) CREATE TABLE keyphrase ( keyphraseid int, keyphrasename varchar ) CREA...
SELECT DISTINCT COUNT(DISTINCT author.authorid) FROM author, writes WHERE author.authorname <> 'Mark Steedman' AND writes.authorid = author.authorid AND writes.paperid IN (SELECT WRITESalias1.paperid FROM author AS AUTHORalias1, writes AS WRITESalias1 WHERE AUTHORalias1.authorname = 'Mark Steedman' AND WRITESalias1.aut...
scholar
CREATE TABLE table_62809 ( "Rank" real, "Athletes" text, "Country" text, "Time" text, "Notes" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What athletes represented the country of germany?
SELECT "Athletes" FROM table_62809 WHERE "Country" = 'germany'
wikisql
CREATE TABLE t_kc21 ( MED_CLINIC_ID text, OVERALL_CD_ORG text, OVERALL_CD_PERSON text, COMP_ID text, PERSON_ID text, PERSON_NM text, IDENTITY_CARD text, SOC_SRT_CARD text, PERSON_SEX number, PERSON_AGE number, IN_HOSP_DATE time, OUT_HOSP_DATE time, DIFF_PLACE_FLG numb...
(SELECT * FROM t_kc21 WHERE MED_SER_ORG_NO = '5161684' AND IN_HOSP_DATE BETWEEN '2000-11-17' AND '2007-11-12') EXCEPT (SELECT * FROM t_kc21 WHERE MED_SER_ORG_NO = '5161684' AND IN_HOSP_DATE BETWEEN '2000-11-17' AND '2007-11-12' AND IN_DIAG_DIS_CD = OUT_DIAG_DIS_CD)
css
CREATE TABLE table_204_824 ( id number, "no." number, "train no:" text, "origin" text, "destination" text, "train name" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the next train number that followed 56661 ?
SELECT "train no:" FROM table_204_824 WHERE "no." = (SELECT "no." FROM table_204_824 WHERE "train no:" = '56661') + 1
squall
CREATE TABLE t_kc22 ( AMOUNT number, CHA_ITEM_LEV number, DATA_ID text, DIRE_TYPE number, DOSE_FORM text, DOSE_UNIT text, EACH_DOSAGE text, EXP_OCC_DATE time, FLX_MED_ORG_ID text, FXBZ number, HOSP_DOC_CD text, HOSP_DOC_NM text, MED_CLINIC_ID text, MED_DIRE_CD tex...
SELECT qtb.MED_CLINIC_ID FROM qtb WHERE qtb.PERSON_ID = '79161122' AND NOT qtb.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.AMOUNT <= 2229.22) UNION SELECT gyb.MED_CLINIC_ID FROM gyb WHERE gyb.PERSON_ID = '79161122' AND NOT gyb.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_...
css
CREATE TABLE PostTags ( PostId number, TagId number ) CREATE TABLE ReviewTaskResultTypes ( Id number, Name text, Description text ) CREATE TABLE ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number ) CREATE TABLE ReviewTaskStates ( Id number, ...
SELECT q.Id AS "post_link", a.Id AS "post_link", CASE Comment WHEN 1 THEN 'Exact Duplicate' WHEN 2 THEN 'Off-topic' WHEN 3 THEN 'Subjective and argumentative' WHEN 4 THEN 'Not a real question' WHEN 7 THEN 'Too localized' WHEN 10 THEN 'General reference' WHEN 20 THEN 'Noise or pointless' WHEN 101 THEN 'Duplicate' WHEN 1...
sede
CREATE TABLE table_64927 ( "Event" text, "Date" text, "Location" text, "Winning skip" text, "Runner-up skip" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the location of the National event with Kevin Martin winning?
SELECT "Location" FROM table_64927 WHERE "Winning skip" = 'kevin martin' AND "Event" = 'the national'
wikisql
CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) ...
SELECT MIN(demographic.age) FROM demographic WHERE demographic.admission_type = "EMERGENCY" AND demographic.dod_year < "2138.0"
mimicsql_data
CREATE TABLE Rooms ( RoomId TEXT, roomName TEXT, beds INTEGER, bedType TEXT, maxOccupancy INTEGER, basePrice INTEGER, decor TEXT ) CREATE TABLE Reservations ( Code INTEGER, Room TEXT, CheckIn TEXT, CheckOut TEXT, Rate REAL, LastName TEXT, FirstName TEXT, Adul...
SELECT bedType, COUNT(*) FROM Rooms GROUP BY bedType ORDER BY COUNT(*)
nvbench
CREATE TABLE equipment_sequence ( aircraft_code_sequence varchar, aircraft_code varchar ) CREATE TABLE fare ( fare_id int, from_airport varchar, to_airport varchar, fare_basis_code text, fare_airline text, restriction_code text, one_direction_cost int, round_trip_cost int, r...
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'BOSTON' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'DALLAS'...
atis
CREATE TABLE table_203_657 ( id number, "call sign" text, "frequency" text, "city of license" text, "licensee" text, "format" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how many radio stations are there in grand junction ?
SELECT COUNT(*) FROM table_203_657 WHERE "city of license" = 'grand junction'
squall
CREATE TABLE table_28925058_1 ( race_winner VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who won the race on May 1?
SELECT race_winner FROM table_28925058_1 WHERE date = "May 1"
sql_create_context
CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE cost ( c...
SELECT intakeoutput.intakeoutputtime FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '032-24135') AND patient.unitdischargetime IS NULL) AN...
eicu
CREATE TABLE table_66813 ( "Position" text, "Player" text, "County team" text, "Club team(s)" text, "Team Number" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What country team had Thurles Sarsfields?
SELECT "County team" FROM table_66813 WHERE "Club team(s)" = 'thurles sarsfields'
wikisql
CREATE TABLE table_58034 ( "Round" real, "Player" text, "Nationality" text, "NHL Team" text, "College/Junior/Club Team (League)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the college/junior/club team (league) when the round is less than...
SELECT "College/Junior/Club Team (League)" FROM table_58034 WHERE "Round" < '7'
wikisql
CREATE TABLE table_name_96 ( pts VARCHAR, div VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Tell me the pts for glasgow rocks
SELECT pts FROM table_name_96 WHERE div = "glasgow rocks"
sql_create_context
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE prescriptions...
SELECT demographic.admission_type, demographic.diagnosis FROM demographic WHERE demographic.name = "Dawn Cooper"
mimicsql_data
CREATE TABLE Order_Items ( order_item_id INTEGER, order_id INTEGER, product_id INTEGER, product_quantity VARCHAR(50), other_order_item_details VARCHAR(255) ) CREATE TABLE Orders ( order_id INTEGER, customer_id INTEGER, date_order_placed DATETIME, order_details VARCHAR(255) ) CREATE...
SELECT date_account_opened, COUNT(date_account_opened) FROM Accounts GROUP BY other_account_details ORDER BY COUNT(date_account_opened)
nvbench
CREATE TABLE table_57450 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What did the home team score at Windy Hill?
SELECT "Home team score" FROM table_57450 WHERE "Venue" = 'windy hill'
wikisql
CREATE TABLE table_name_25 ( dynamo INTEGER, spartak VARCHAR, draw VARCHAR, played VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the average dynamo when draw is more than 0, played is less than 15 and spartak is more than 1?
SELECT AVG(dynamo) FROM table_name_25 WHERE draw > 0 AND played < 15 AND spartak > 1
sql_create_context
CREATE TABLE table_41844 ( "Rank" real, "Name" text, "Team" text, "Games" real, "Rebounds" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the smallest number of games for the fenerbah e team?
SELECT MIN("Games") FROM table_41844 WHERE "Team" = 'fenerbahçe'
wikisql
CREATE TABLE table_79337 ( "Draw" real, "Singer" text, "Song" text, "Televoting (votes)" text, "Jury" text, "Place" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the greatest draw that has 4th for place?
SELECT MAX("Draw") FROM table_79337 WHERE "Place" = '4th'
wikisql
CREATE TABLE t_kc24 ( ACCOUNT_DASH_DATE time, ACCOUNT_DASH_FLG number, CASH_PAY number, CIVIL_SUBSIDY number, CKC102 number, CLINIC_ID text, CLINIC_SLT_DATE time, COMP_ID text, COM_ACC_PAY number, COM_PAY number, DATA_ID text, ENT_ACC_PAY number, ENT_PAY number, F...
SELECT qtb.OUT_DIAG_DIS_CD, qtb.OUT_DIAG_DIS_NM FROM qtb WHERE qtb.PERSON_NM = '朱飞宇' AND qtb.MED_CLINIC_ID IN (SELECT t_kc24.MED_CLINIC_ID FROM t_kc24 WHERE t_kc24.MED_AMOUT >= 1829.32) UNION SELECT gyb.OUT_DIAG_DIS_CD, gyb.OUT_DIAG_DIS_NM FROM gyb WHERE gyb.PERSON_NM = '朱飞宇' AND gyb.MED_CLINIC_ID IN (SELECT t_kc24.MED...
css
CREATE TABLE table_name_88 ( copies_per_particle VARCHAR, size___s_base_pair__ VARCHAR, location VARCHAR, rna_segment__gene_ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the number of copies per particle having a nonstructural location, an ...
SELECT copies_per_particle FROM table_name_88 WHERE location = "nonstructural" AND rna_segment__gene_ > 5 AND size___s_base_pair__ < 751
sql_create_context
CREATE TABLE aircraft ( aircraft_code varchar, aircraft_description varchar, manufacturer varchar, basic_type varchar, engines int, propulsion varchar, wide_body varchar, wing_span int, length int, weight int, capacity int, pay_load int, cruising_speed int, range_...
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'NEWARK' AND flight.departure_time > 823 AND flight.to_airport = AIRPORT_SERVICE_1.airport...
atis
CREATE TABLE jyjgzbb ( BGDH text, BGRQ time, CKZFWDX text, CKZFWSX number, CKZFWXX number, JCFF text, JCRGH text, JCRXM text, JCXMMC text, JCZBDM text, JCZBJGDL number, JCZBJGDW text, JCZBJGDX text, JCZBMC text, JLDW text, JYRQ time, JYZBLSH text, ...
SELECT COUNT(*) FROM wdmzjzjlb WHERE wdmzjzjlb.JZKSMC = '小儿肿瘤科' AND wdmzjzjlb.JZKSRQ BETWEEN '2014-10-06' AND '2018-12-28' UNION SELECT COUNT(*) FROM bdmzjzjlb WHERE bdmzjzjlb.JZKSMC = '小儿肿瘤科' AND bdmzjzjlb.JZKSRQ BETWEEN '2014-10-06' AND '2018-12-28'
css
CREATE TABLE table_61778 ( "Date(s)" text, "City, state" text, "Ticket price(s)" text, "Ticket sold / available" text, "Ticket grossing" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How much were tickets for the show in Indianapolis, Indiana?
SELECT "Ticket price(s)" FROM table_61778 WHERE "City, state" = 'indianapolis, indiana'
wikisql
CREATE TABLE wdmzjzjlb ( HXPLC number, HZXM text, JLSJ time, JZJSSJ time, JZKSBM text, JZKSMC text, JZKSRQ time, JZLSH number, JZZDBM text, JZZDSM text, JZZTDM number, JZZTMC text, KH text, KLX number, MJZH text, ML number, MZZYZDZZBM text, MZZYZDZ...
SELECT (SELECT COUNT(*) FROM hz_info JOIN wdmzjzjlb ON hz_info.YLJGDM = wdmzjzjlb.YLJGDM AND hz_info.KH = wdmzjzjlb.KH AND hz_info.KLX = wdmzjzjlb.KLX WHERE hz_info.RYBH = '27285110' AND wdmzjzjlb.JZKSRQ BETWEEN '2013-01-08' AND '2021-04-27' UNION SELECT COUNT(*) FROM hz_info JOIN bdmzjzjlb ON hz_info.YLJGDM = bdmzjzjl...
css
CREATE TABLE job_history ( EMPLOYEE_ID decimal(6,0), START_DATE date, END_DATE date, JOB_ID varchar(10), DEPARTMENT_ID decimal(4,0) ) CREATE TABLE jobs ( JOB_ID varchar(10), JOB_TITLE varchar(35), MIN_SALARY decimal(6,0), MAX_SALARY decimal(6,0) ) CREATE TABLE locations ( LOCAT...
SELECT JOB_ID, AVG(SALARY) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) GROUP BY JOB_ID ORDER BY JOB_ID
nvbench
CREATE TABLE table_name_60 ( away_team VARCHAR, score VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What away team had a 103-94 score?
SELECT away_team FROM table_name_60 WHERE score = "103-94"
sql_create_context
CREATE TABLE inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, amount number ) CREATE TABLE prescriptions ( row_id number, subject_id number, hadm_id number, startdate time, enddate time, drug text, ...
SELECT procedures_icd.charttime FROM procedures_icd WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'int insert dual-cham dev') AND procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 93571) AND...
mimic_iii
CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name text ) CREATE TABLE outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, va...
SELECT t3.drug FROM (SELECT t2.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE ...
mimic_iii
CREATE TABLE patient ( uniquepid text, patienthealthsystemstayid number, patientunitstayid number, gender text, age text, ethnicity text, hospitalid number, wardid number, admissionheight number, admissionweight number, dischargeweight number, hospitaladmittime time, ...
SELECT COUNT(*) > 0 FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '002-16314')) AND lab.labname = 'vitamin b12' AND STRFTIME('%y-%m', lab.labresulttime) <=...
eicu
CREATE TABLE basketball_match ( Team_ID int, School_ID int, Team_Name text, ACC_Regular_Season text, ACC_Percent text, ACC_Home text, ACC_Road text, All_Games text, All_Games_Percent int, All_Home text, All_Road text, All_Neutral text ) CREATE TABLE university ( Scho...
SELECT ACC_Percent, All_Games_Percent FROM basketball_match GROUP BY All_Home
nvbench
CREATE TABLE hz_info ( KH text, KLX number, RYBH text, YLJGDM text ) CREATE TABLE mzjzjlb ( HXPLC number, HZXM text, JLSJ time, JZJSSJ time, JZKSBM text, JZKSMC text, JZKSRQ time, JZLSH text, JZZDBM text, JZZDSM text, JZZTDM number, JZZTMC text, KH te...
SELECT mzjzjlb.JZLSH FROM hz_info JOIN mzjzjlb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX WHERE hz_info.RYBH = '22165387' AND NOT mzjzjlb.JZLSH IN (SELECT zyjybgb.JZLSH FROM zyjybgb WHERE zyjybgb.BGRQ <= '2014-03-04' UNION SELECT mzjybgb.JZLSH FROM mzjybgb WHERE mzjybgb...
css
CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location t...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.diagnosis = "ABDOMINAL PAIN" AND procedures.short_title = "Suture bladder lacerat"
mimicsql_data
CREATE TABLE table_10392906_2 ( team_record VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many records are listed on Friday, May 25?
SELECT COUNT(team_record) FROM table_10392906_2 WHERE date = "Friday, May 25"
sql_create_context
CREATE TABLE table_name_40 ( wins INTEGER, top_25 VARCHAR, cuts_made VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many total wins have 3 as the Top-35 and less than 5 cuts made?
SELECT SUM(wins) FROM table_name_40 WHERE top_25 = 3 AND cuts_made < 5
sql_create_context
CREATE TABLE table_name_67 ( to_par VARCHAR, finish VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the To par of the player with a Finish of T20?
SELECT to_par FROM table_name_67 WHERE finish = "t20"
sql_create_context
CREATE TABLE publication ( publication_id number, book_id number, publisher text, publication_date text, price number ) CREATE TABLE book ( book_id number, title text, issues number, writer text ) -- Using valid SQLite, answer the following questions for the tables provided above....
SELECT T1.writer FROM book AS T1 JOIN publication AS T2 ON T1.book_id = T2.book_id WHERE T2.price > 4000000
spider
CREATE TABLE table_11529 ( "Date" text, "Ship" text, "Tons" real, "Nationality" text, "Fate and location" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many tons was the ship from norway?
SELECT COUNT("Tons") FROM table_11529 WHERE "Nationality" = 'norway'
wikisql