instruction stringlengths 0 1.06k | input stringlengths 11 5.3k | response stringlengths 2 4.44k |
|---|---|---|
find the name of pilots who did not win the matches held in the country of Australia. | CREATE TABLE pilot (name VARCHAR,pilot_id VARCHAR,Winning_Pilot VARCHAR,country VARCHAR)CREATE TABLE MATCH (name VARCHAR,pilot_id VARCHAR,Winning_Pilot VARCHAR,country VARCHAR) | SELECT name FROM pilot WHERE NOT pilot_id IN (SELECT Winning_Pilot FROM MATCH WHERE country = 'Australia') |
What is the highest championship that has 1 as the league cup, and 17 as the total? | CREATE TABLE table_name_85 (championship INTEGER,league_cup VARCHAR,total VARCHAR) | SELECT MAX(championship) FROM table_name_85 WHERE league_cup = 1 AND total = "17" |
For those employees who do not work in departments with managers that have ids between 100 and 200, return a bar chart about the distribution of hire_date and the average of salary bin hire_date by weekday, display in ascending by the the average of salary. | CREATE TABLE countries (COUNTRY_ID varchar(2),COUNTRY_NAME varchar(40),REGION_ID decimal(10,0))CREATE TABLE regions (REGION_ID decimal(5,0),REGION_NAME varchar(25))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_... | SELECT HIRE_DATE, AVG(SALARY) FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY AVG(SALARY) |
Name the verb meaning for half drosch | CREATE TABLE table_1745843_9 (verb_meaning VARCHAR,part_2 VARCHAR) | SELECT verb_meaning FROM table_1745843_9 WHERE part_2 = "half drosch" |
count the number of patients whose marital status is married and lab test name is albumin? | 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 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 ... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.marital_status = "MARRIED" AND lab.label = "Albumin" |
How many patients admitted as clinic referral (premature) were diagnosed with percutaneous transluminal coronary angioplasty status? | 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)CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,sho... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admission_location = "CLINIC REFERRAL/PREMATURE" AND diagnoses.long_title = "Percutaneous transluminal coronary angioplasty status" |
What's the cores with the part number cl8064701477202? | CREATE TABLE table_13573 ("Model number" text,"sSpec number" text,"Cores" text,"Frequency" text,"Turbo" text,"L2 cache" text,"L3 cache" text,"GPU model" text,"GPU frequency" text,"Socket" text,"I/O bus" text,"Release date" text,"Part number(s)" text,"Release price (USD)" text) | SELECT "Cores" FROM table_13573 WHERE "Part number(s)" = 'cl8064701477202' |
how many countries have at least 10 gold medals in the asian youth games ? | CREATE TABLE table_203_747 (id number,"rank" number,"nation" text,"gold" number,"silver" number,"bronze" number,"total" number) | SELECT COUNT("nation") FROM table_203_747 WHERE "gold" >= 10 |
calculate the maximum age of patients with abdominal pain primary disease who were admitted to hospital for 43 days. | CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)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_fla... | SELECT MAX(demographic.age) FROM demographic WHERE demographic.diagnosis = "ABDOMINAL PAIN" AND demographic.days_stay = "43" |
What is the Chinese title with a premiere rating of 31? | CREATE TABLE table_name_91 (chinese_title VARCHAR,premiere VARCHAR) | SELECT chinese_title FROM table_name_91 WHERE premiere = 31 |
Which mountain range includes Mount Hubbard? | CREATE TABLE table_71991 ("Rank" real,"Mountain Peak" text,"Province" text,"Mountain Range" text,"Location" text) | SELECT "Mountain Range" FROM table_71991 WHERE "Mountain Peak" = 'mount hubbard' |
what flights are available friday from PHILADELPHIA to OAKLAND | CREATE TABLE flight_stop (flight_id int,stop_number int,stop_days text,stop_airport text,arrival_time int,arrival_airline text,arrival_flight_number int,departure_time int,departure_airline text,departure_flight_number int,stop_time int)CREATE TABLE aircraft (aircraft_code varchar,aircraft_description varchar,manufactu... | 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 = 25 AND date_day.month_number = 6 AND d... |
Final that has a Date of january 10, 2004 had what opponent? | CREATE TABLE table_name_23 (opponent_in_the_final VARCHAR,date VARCHAR) | SELECT opponent_in_the_final FROM table_name_23 WHERE date = "january 10, 2004" |
What are the numbers of wines for different grapes Plot them as bar chart, sort by the bar in desc. | CREATE TABLE wine (No INTEGER,Grape TEXT,Winery TEXT,Appelation TEXT,State TEXT,Name TEXT,Year INTEGER,Price INTEGER,Score INTEGER,Cases INTEGER,Drink TEXT)CREATE TABLE appellations (No INTEGER,Appelation TEXT,County TEXT,State TEXT,Area TEXT,isAVA TEXT)CREATE TABLE grapes (ID INTEGER,Grape TEXT,Color TEXT) | SELECT Grape, COUNT(*) FROM wine GROUP BY Grape ORDER BY Grape DESC |
Who was the visiting team at Lincoln Financial Field when the final score was 24-14? | CREATE TABLE table_11235 ("Date" text,"Visiting Team" text,"Final Score" text,"Host Team" text,"Stadium" text) | SELECT "Visiting Team" FROM table_11235 WHERE "Stadium" = 'lincoln financial field' AND "Final Score" = '24-14' |
How many customers do we have? | CREATE TABLE services (service_id number,service_type_code text,workshop_group_id number,product_description text,product_name text,product_price number,other_product_service_details text)CREATE TABLE performers (performer_id number,address_id number,customer_name text,customer_phone text,customer_email_address text,ot... | SELECT COUNT(*) FROM customers |
What unit has an Avoirdupois value of 57.602 gr.? | CREATE TABLE table_37329 ("Unit" text,"Russian" text,"Translation" text,"Ratio" real,"Metric value" text,"Avoirdupois value" text,"Ordinary value" text) | SELECT "Unit" FROM table_37329 WHERE "Avoirdupois value" = '57.602 gr.' |
What date was the result 6 2, 4 6, 6 4? | CREATE TABLE table_11636213_7 (date VARCHAR,result VARCHAR) | SELECT date FROM table_11636213_7 WHERE result = "6–2, 4–6, 6–4" |
How many teams scored exactly 38 points | CREATE TABLE table_19215 ("Team" text,"First Played" real,"Played" real,"Win" real,"Draw" real,"Loss" real,"Points For" real,"Ponts Against" real,"Last Meeting" real) | SELECT COUNT("Team") FROM table_19215 WHERE "Points For" = '38' |
was hot love released before run to me ? | CREATE TABLE table_204_742 (id number,"release date" text,"single title" text,"uk singles chart\nposition" number,"french\ncharts" number,"german\ncharts" number,"irish\ncharts" number,"various" text) | SELECT (SELECT "release date" FROM table_204_742 WHERE "single title" = '"hot love"') < (SELECT "release date" FROM table_204_742 WHERE "single title" = '"run to me"') |
the previous year, what were the five most common input events? | CREATE TABLE intakeoutput (intakeoutputid number,patientunitstayid number,cellpath text,celllabel text,cellvaluenumeric number,intakeoutputtime time)CREATE TABLE diagnosis (diagnosisid number,patientunitstayid number,diagnosisname text,diagnosistime time,icd9code text)CREATE TABLE cost (costid number,uniquepid text,pat... | SELECT t1.celllabel FROM (SELECT intakeoutput.celllabel, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM intakeoutput WHERE intakeoutput.cellpath LIKE '%intake%' AND DATETIME(intakeoutput.intakeoutputtime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year') GROUP BY intakeoutput.celllabel) AS ... |
When the regular season of 2nd, Northeast and the year was less than 2008 what was the total number of Division? | CREATE TABLE table_40634 ("Year" real,"Division" real,"League" text,"Regular Season" text,"Playoffs" text,"Open Cup" text) | SELECT COUNT("Division") FROM table_40634 WHERE "Regular Season" = '2nd, northeast' AND "Year" < '2008' |
Who was the away team in a tie no larger than 16 with forest green rovers at home? | CREATE TABLE table_78226 ("Tie no" real,"Home team" text,"Score" text,"Away team" text,"Attendance" real) | SELECT "Away team" FROM table_78226 WHERE "Tie no" > '16' AND "Home team" = 'forest green rovers' |
What is the largest number of consecutive starts for jason gildon? | CREATE TABLE table_30622 ("Position" text,"Player" text,"Period" text,"Teams" text,"Consecutive starts" real,"Playoffs" real,"Total" real) | SELECT MAX("Consecutive starts") FROM table_30622 WHERE "Player" = 'Jason Gildon' |
What's the record when the attendance was 41,573? | CREATE TABLE table_77731 ("Date" text,"Opponent" text,"Score" text,"Loss" text,"Attendance" text,"Record" text) | SELECT "Record" FROM table_77731 WHERE "Attendance" = '41,573' |
sepsis induced immunosuppression | CREATE TABLE table_train_27 ("id" int,"bone_marrow_transplant" bool,"antimicrobial_therapy" bool,"immune_suppression" bool,"hiv_infection" bool,"autoimmune_disease" bool,"hepatitis_b_infection" bool,"renal_disease" bool,"total_parenteral_nutrition" bool,"surgery" bool,"hepatitis_c_infection" bool,"invasive_candida_infe... | SELECT * FROM table_train_27 WHERE immune_suppression = 1 |
what is the play when the company is cyprus theatre organisation? | CREATE TABLE table_79409 ("play" text,"author" text,"company" text,"base" text,"country" text) | SELECT "play" FROM table_79409 WHERE "company" = 'cyprus theatre organisation' |
Give me the number of unmarried patients who were ordered a transferrin lab test. | CREATE TABLE procedures (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 (subject_id text,hadm_id text,icustay_id text,drug_type text,drug tex... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.marital_status = "SINGLE" AND lab.label = "Transferrin" |
Can you tell me the Opponent that has the Result of w 37-14? | CREATE TABLE table_name_25 (opponent VARCHAR,result VARCHAR) | SELECT opponent FROM table_name_25 WHERE result = "w 37-14" |
What is the Date with a Opponent with wimbledon, and a Result of won 2-0? | CREATE TABLE table_77998 ("Round" text,"Date" text,"Opponent" text,"Venue" text,"Result" text) | SELECT "Date" FROM table_77998 WHERE "Opponent" = 'wimbledon' AND "Result" = 'won 2-0' |
How many wrestlers were born in nara, and have a completed 'career and other notes' section? | CREATE TABLE table_1557974_1 (career_and_other_notes VARCHAR,birthplace VARCHAR) | SELECT COUNT(career_and_other_notes) FROM table_1557974_1 WHERE birthplace = "Nara" |
What is the zodiac sign for the English March? | CREATE TABLE table_60473 ("English name" text,"Thai name" text,"Abbr." text,"Transcription" text,"Sanskrit word" text,"Zodiac sign" text) | SELECT "Zodiac sign" FROM table_60473 WHERE "English name" = 'march' |
show me all the flights between OAKLAND and DENVER | CREATE TABLE class_of_service (booking_class varchar,rank int,class_description text)CREATE TABLE month (month_number int,month_name text)CREATE TABLE airport_service (city_code varchar,airport_code varchar,miles_distant int,direction varchar,minutes_distant int)CREATE TABLE code_description (code varchar,description t... | 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 = 'OAKLAND' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'DENVER... |
only opponent to defeat mocho cota in 1994 | CREATE TABLE table_204_373 (id number,"wager" text,"winner" text,"loser" text,"location" text,"date" text) | SELECT "winner" FROM table_204_373 WHERE "loser" = 'mocho cota' AND "date" = 1994 |
When was the game where the home team score was 8.9 (57)? | CREATE TABLE table_53070 ("Home team" text,"Home team score" text,"Away team" text,"Away team score" text,"Venue" text,"Crowd" real,"Date" text) | SELECT "Date" FROM table_53070 WHERE "Home team score" = '8.9 (57)' |
Top 150 users from China. Top 150 SO users from China | CREATE TABLE Users (Id number,Reputation number,CreationDate time,DisplayName text,LastAccessDate time,WebsiteUrl text,Location text,AboutMe text,Views number,UpVotes number,DownVotes number,ProfileImageUrl text,EmailHash text,AccountId number)CREATE TABLE PendingFlags (Id number,FlagTypeId number,PostId number,Creatio... | SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", Id AS "user_link", Reputation, Location FROM Users WHERE LOWER(Location) LIKE '%sweden%' OR UPPER(Location) LIKE '%SWEDEN%' OR Location LIKE '%SWEDEN%' AND Reputation >= 0 ORDER BY Reputation DESC LIMIT 150 |
When was the successor who got his seat because of 'until august 2, 1813' seated? | CREATE TABLE table_25067 ("District" text,"Vacator" text,"Reason for change" text,"Successor" text,"Date successor seated" text) | SELECT "Date successor seated" FROM table_25067 WHERE "Reason for change" = 'Until August 2, 1813' |
Who was the team when the category is field goal percentage? | CREATE TABLE table_28628309_6 (team VARCHAR,category VARCHAR) | SELECT team FROM table_28628309_6 WHERE category = "Field goal percentage" |
how many points scored by sportivo luque o | CREATE TABLE table_21068 ("Position" real,"Team" text,"Played" real,"Wins" real,"Draws" real,"Losses" real,"Scored" real,"Conceded" real,"Points" real) | SELECT COUNT("Points") FROM table_21068 WHERE "Team" = 'Sportivo Luqueño' |
What is the competition type of the event with a result of 3-2 and a score of 2-1? | CREATE TABLE table_68487 ("Date" text,"Venue" text,"Score" text,"Result" text,"Competition" text) | SELECT "Competition" FROM table_68487 WHERE "Result" = '3-2' AND "Score" = '2-1' |
How many new entries started in the round where winners from the previous round is 32? | CREATE TABLE table_18328569_1 (new_entries_this_round VARCHAR,winners_from_previous_round VARCHAR) | SELECT new_entries_this_round FROM table_18328569_1 WHERE winners_from_previous_round = "32" |
which episode was Transmitted on friday if the episode of '515 the adventures of tintin' was transmitted on monday? | CREATE TABLE table_18173916_8 (friday VARCHAR,monday VARCHAR) | SELECT friday FROM table_18173916_8 WHERE monday = "515 The Adventures of Tintin" |
What is the highest league cup with more than 0 FA cups, a premier league less than 34 and a total of 11? | CREATE TABLE table_name_77 (league_cup INTEGER,total VARCHAR,fa_cup VARCHAR,premier_league VARCHAR) | SELECT MAX(league_cup) FROM table_name_77 WHERE fa_cup > 0 AND premier_league < 34 AND total = 11 |
bmi 25 to 35 inclusive | CREATE TABLE table_train_234 ("id" int,"orthostatic_hypotension" bool,"systolic_blood_pressure_sbp" int,"estimated_glomerular_filtration_rate_egfr" int,"postural_fall_of_dbp" int,"diastolic_blood_pressure_dbp" int,"postural_fall_of_sbp" int,"allergy_to_sglt_2_inhibitors" bool,"body_mass_index_bmi" float,"NOUSE" float) | SELECT * FROM table_train_234 WHERE body_mass_index_bmi >= 25 AND body_mass_index_bmi <= 35 |
What is the year the institution Tougaloo College joined? | CREATE TABLE table_16187 ("Institution" text,"Location" text,"Mens Nickname" text,"Womens Nickname" text,"Founded" real,"Type" text,"Enrollment" real,"Joined" text) | SELECT "Joined" FROM table_16187 WHERE "Institution" = 'Tougaloo College' |
Who had Pole position for the French Grand Prix? | CREATE TABLE table_11142 ("Race" text,"Circuit" text,"Date" text,"Pole position" text,"Fastest lap" text,"Winning driver" text,"Constructor" text,"Tyre" text,"Report" text) | SELECT "Pole position" FROM table_11142 WHERE "Race" = 'french grand prix' |
show me the airlines that fly from DENVER to SAN FRANCISCO | 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_miles int,pressurized varchar)CREATE TABLE airport_service (city_code ... | SELECT DISTINCT airline.airline_code FROM airline, airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'DENVER' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_na... |
Name the record for verizon center 20,173 | CREATE TABLE table_21460 ("Game" real,"Date" text,"Team" text,"Score" text,"High points" text,"High rebounds" text,"High assists" text,"Location Attendance" text,"Record" text) | SELECT "Record" FROM table_21460 WHERE "Location Attendance" = 'Verizon Center 20,173' |
what is the number of patients whose drug code is eryt250 and lab test fluid is cerebrospinal fliuid (csf)? | CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime text,flag text,value_unit text,label text,fluid text)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,ethni... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE prescriptions.formulary_drug_cd = "ERYT250" AND lab.fluid = "Cerebrospinal Fluid (CSF)" |
Name the total number of height for number 32 | CREATE TABLE table_25360865_1 (height VARCHAR,_number VARCHAR) | SELECT COUNT(height) FROM table_25360865_1 WHERE _number = 32 |
Compare the total number of each fate with a bar chart, show from high to low by the x axis. | CREATE TABLE ship (Ship_ID int,Name text,Type text,Nationality text,Tonnage int)CREATE TABLE mission (Mission_ID int,Ship_ID int,Code text,Launched_Year int,Location text,Speed_knots int,Fate text) | SELECT Fate, COUNT(Fate) FROM mission GROUP BY Fate ORDER BY Fate DESC |
what were the new prescriptions of patient 97395 today compared to the prescription they received yesterday? | CREATE TABLE transfers (row_id number,subject_id number,hadm_id number,icustay_id number,eventtype text,careunit text,wardid number,intime time,outtime time)CREATE TABLE microbiologyevents (row_id number,subject_id number,hadm_id number,charttime time,spec_type_desc text,org_name text)CREATE TABLE patients (row_id numb... | SELECT prescriptions.drug FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 97395) AND DATETIME(prescriptions.startdate, 'start of day') = DATETIME(CURRENT_TIME(), 'start of day', '-0 day') EXCEPT SELECT prescriptions.drug FROM prescriptions WHERE... |
What is the best time for a team with a first-qualifying time of 59.448? | CREATE TABLE table_name_6 (best VARCHAR,qual_1 VARCHAR) | SELECT best FROM table_name_6 WHERE qual_1 = "59.448" |
who write the episode that have 14.39 million viewers | CREATE TABLE table_19417244_2 (written_by VARCHAR,us_viewers__millions_ VARCHAR) | SELECT written_by FROM table_19417244_2 WHERE us_viewers__millions_ = "14.39" |
When Thomas Clayton had a gain less than 71, what was the highest long value? | CREATE TABLE table_name_40 (long INTEGER,name VARCHAR,gain VARCHAR) | SELECT MAX(long) FROM table_name_40 WHERE name = "thomas clayton" AND gain < 71 |
Name the gdp per capita for haiti | CREATE TABLE table_26313243_1 (gdp__ppp__per_capita___intl_$___2011 VARCHAR,country VARCHAR) | SELECT gdp__ppp__per_capita___intl_$___2011 FROM table_26313243_1 WHERE country = "Haiti" |
What is the total number of population in the land with an area of 149.32 km2? | CREATE TABLE table_21283 ("Official Name" text,"Status" text,"Area km 2" text,"Population" real,"Census Ranking" text) | SELECT COUNT("Population") FROM table_21283 WHERE "Area km 2" = '149.32' |
Proportion of users who've asked no questions. Counts the number of users with Rep>=1000 who've asked no questions, and the total number of users with Rep>=1000. | CREATE TABLE PendingFlags (Id number,FlagTypeId number,PostId number,CreationDate time,CloseReasonTypeId number,CloseAsOffTopicReasonTypeId number,DuplicateOfQuestionId number,BelongsOnBaseHostAddress text)CREATE TABLE PostsWithDeleted (Id number,PostTypeId number,AcceptedAnswerId number,ParentId number,CreationDate ti... | SELECT (SELECT COUNT(u.DisplayName) FROM Users AS u WHERE u.Reputation >= 1000) AS "significant_users", (SELECT COUNT(u.DisplayName) FROM Users AS u WHERE u.Id NOT IN (SELECT DISTINCT OwnerUserId FROM Posts WHERE PostTypeId = 1 AND OwnerUserId != '') AND u.Reputation >= 94000) AS "with_no_questions" |
What is Player, when Money ( $ ) is less than 387, and when Score is '73-76-74-72=295'? | CREATE TABLE table_name_40 (player VARCHAR,money___$__ VARCHAR,score VARCHAR) | SELECT player FROM table_name_40 WHERE money___$__ < 387 AND score = 73 - 76 - 74 - 72 = 295 |
What's the ijekavian translation of the ikavian word grijati? | CREATE TABLE table_29854 ("English" text,"Predecessor" text,"Ekavian" text,"Ikavian" text,"Ijekavian" text,"Ijekavian development" text) | SELECT "Ijekavian" FROM table_29854 WHERE "Ikavian" = 'grijati' |
What date did the T328 that entered service on 18 June 1956 re-enter service? | CREATE TABLE table_name_22 (re_entered_service__p_ VARCHAR,entered_service__t_ VARCHAR,pre_conversion VARCHAR) | SELECT re_entered_service__p_ FROM table_name_22 WHERE entered_service__t_ = "18 june 1956" AND pre_conversion = "t328" |
Name the country for sky primafila 7 hd | CREATE TABLE table_15887683_6 (country VARCHAR,television_service VARCHAR) | SELECT country FROM table_15887683_6 WHERE television_service = "Sky Primafila 7 HD" |
Which nominating festival nominated Iao Lethem's film? | CREATE TABLE table_15380 ("Category" text,"Film" text,"Director(s)" text,"Country" text,"Nominating Festival" text) | SELECT "Nominating Festival" FROM table_15380 WHERE "Director(s)" = 'iao lethem' |
What is the largest number of Games Played with Losses of 3, and more Wins than 5? | CREATE TABLE table_11772 ("Team" text,"Games Played" real,"Wins" real,"Losses" real,"Ties" real,"Goals For" real,"Goals Against" real) | SELECT MAX("Games Played") FROM table_11772 WHERE "Losses" = '3' AND "Wins" > '5' |
What county has an IHSAA Football Class of A, and a Mascot of royals? | CREATE TABLE table_63746 ("School" text,"Location" text,"Mascot" text,"Enrollment" real,"IHSAA Football Class" text,"Primary Conference" text,"County" text) | SELECT "County" FROM table_63746 WHERE "IHSAA Football Class" = 'a' AND "Mascot" = 'royals' |
what is during the first hospital encounter maximum neutrophils value of patient 99647? | CREATE TABLE d_icd_diagnoses (row_id number,icd9_code text,short_title text,long_title text)CREATE TABLE labevents (row_id number,subject_id number,hadm_id number,itemid number,charttime time,valuenum number,valueuom text)CREATE TABLE microbiologyevents (row_id number,subject_id number,hadm_id number,charttime time,spe... | SELECT MAX(labevents.valuenum) FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 99647 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime LIMIT 1) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = '... |
Overlap between a given tag and related ones. | CREATE TABLE CloseReasonTypes (Id number,Name text,Description text)CREATE TABLE PostHistory (Id number,PostHistoryTypeId number,PostId number,RevisionGUID other,CreationDate time,UserId number,UserDisplayName text,Comment text,Text text,ContentLicense text)CREATE TABLE ReviewTaskResults (Id number,ReviewTaskId number,... | SELECT *, CAST(100.0 * without_tag / (without_tag + with_tag) AS FLOAT(18, 2)) AS perc_not_tag FROM (SELECT COUNT(p.Id) AS post_count, t.TagName, SUM(CASE WHEN p.Tags LIKE '%<##Tag##>%' THEN 1 ELSE 0 END) AS with_tag, SUM(CASE WHEN NOT p.Tags LIKE '%<##Tag##>%' THEN 1 ELSE 0 END) AS without_tag FROM Posts AS p JOIN Pos... |
Give me a bar chart to show the revenue of the company that earns the highest revenue in each headquarter city. | CREATE TABLE Manufacturers (Code INTEGER,Name VARCHAR(255),Headquarter VARCHAR(255),Founder VARCHAR(255),Revenue REAL)CREATE TABLE Products (Code INTEGER,Name VARCHAR(255),Price DECIMAL,Manufacturer INTEGER) | SELECT Headquarter, MAX(Revenue) FROM Manufacturers GROUP BY Headquarter |
What is the lowest Grid, when Laps is 21, when Manufacturer is Yamaha, and when Time is +18.802? | CREATE TABLE table_name_10 (grid INTEGER,time VARCHAR,laps VARCHAR,manufacturer VARCHAR) | SELECT MIN(grid) FROM table_name_10 WHERE laps = 21 AND manufacturer = "yamaha" AND time = "+18.802" |
What's the lowest grid with and entrant of fred saunders? | CREATE TABLE table_62894 ("Driver" text,"Entrant" text,"Constructor" text,"Time/Retired" text,"Grid" real) | SELECT MIN("Grid") FROM table_62894 WHERE "Entrant" = 'fred saunders' |
What name was proposed on 12/30/1982 in rockingham county with a CERCLIS ID of nhd062004569? | CREATE TABLE table_9427 ("CERCLIS ID" text,"Name" text,"County" text,"Proposed" text,"Listed" text,"Construction completed" text,"Partially deleted" text) | SELECT "Name" FROM table_9427 WHERE "Proposed" = '12/30/1982' AND "County" = 'rockingham' AND "CERCLIS ID" = 'nhd062004569' |
Name the stock for colt model mt6601 | CREATE TABLE table_12834315_4 (stock VARCHAR,colt_model_no VARCHAR) | SELECT stock FROM table_12834315_4 WHERE colt_model_no = "MT6601" |
What year was the West Coast League established than the championships are greater than 0? | CREATE TABLE table_36871 ("Club" text,"Sport" text,"League" text,"Venue" text,"Established" real,"Championships" real) | SELECT "Established" FROM table_36871 WHERE "Championships" > '0' AND "League" = 'west coast league' |
Show the name of each party and the corresponding number of delegates from that party Plot them as bar chart, sort by the x axis from low to high please. | CREATE TABLE county (County_Id int,County_name text,Population real,Zip_code text)CREATE TABLE party (Party_ID int,Year real,Party text,Governor text,Lieutenant_Governor text,Comptroller text,Attorney_General text,US_Senate text)CREATE TABLE election (Election_ID int,Counties_Represented text,District int,Delegate text... | SELECT T2.Party, SUM(COUNT(*)) FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID GROUP BY T2.Party ORDER BY T2.Party |
Which Institutional authority has a Rocket launch of rehnuma-10? | CREATE TABLE table_57777 ("Rocket launch" text,"Launch Date" text,"Mission" text,"Institutional authority" text,"Launch Site" text,"Outcomes" text,"Derivatives" text) | SELECT "Institutional authority" FROM table_57777 WHERE "Rocket launch" = 'rehnuma-10' |
What are Utah's high points? | CREATE TABLE table_name_49 (high_points VARCHAR,team VARCHAR) | SELECT high_points FROM table_name_49 WHERE team = "utah" |
Give swimsuit scores of participants 8.847 in preliminary | CREATE TABLE table_21281 ("Country" text,"Preliminary" text,"Interview" text,"Swimsuit" text,"Evening Gown" text,"Average" text) | SELECT "Swimsuit" FROM table_21281 WHERE "Preliminary" = '8.847' |
i want a flight on CO from BOSTON to SAN FRANCISCO | CREATE TABLE time_interval (period text,begin_time int,end_time int)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,round_trip_required varchar)CREATE TABLE date_day (month_number int,day_numbe... | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE (CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'SAN FRANCISCO' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = ... |
The Catalog of ilps 9153 is from what region? | CREATE TABLE table_8574 ("Region" text,"Date" text,"Label" text,"Format" text,"Catalog" text) | SELECT "Region" FROM table_8574 WHERE "Catalog" = 'ilps 9153' |
What is the February number of the game with the Vancouver Canucks as the opponent and a game number greater than 55? | CREATE TABLE table_name_48 (february VARCHAR,opponent VARCHAR,game VARCHAR) | SELECT COUNT(february) FROM table_name_48 WHERE opponent = "vancouver canucks" AND game > 55 |
what was the name of the drug, which patient 52898 was last prescribed via right ear route since 02/2105? | CREATE TABLE prescriptions (row_id number,subject_id number,hadm_id number,startdate time,enddate time,drug text,dose_val_rx text,dose_unit_rx text,route text)CREATE TABLE admissions (row_id number,subject_id number,hadm_id number,admittime time,dischtime time,admission_type text,admission_location text,discharge_locat... | SELECT prescriptions.drug FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 52898) AND prescriptions.route = 'right ear' AND STRFTIME('%y-%m', prescriptions.startdate) >= '2105-02' ORDER BY prescriptions.startdate DESC LIMIT 1 |
What is the average rank of one who is at 76 laps? | CREATE TABLE table_10504 ("Grid" real,"Constructor" text,"Qual" real,"Rank" real,"Laps" real,"Time/retired" text) | SELECT AVG("Rank") FROM table_10504 WHERE "Laps" = '76' |
count the number of patients whose diagnoses short title is atrial fibrillation and drug route is tp? | CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)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_fla... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.short_title = "Atrial fibrillation" AND prescriptions.route = "TP" |
What country is the film that has music of nino oliviero? | CREATE TABLE table_name_10 (country VARCHAR,music VARCHAR) | SELECT country FROM table_name_10 WHERE music = "nino oliviero" |
When can I take 421 ? | CREATE TABLE area (course_id int,area varchar)CREATE TABLE requirement (requirement_id int,requirement varchar,college varchar)CREATE TABLE ta (campus_job_id int,student_id int,location varchar)CREATE TABLE program (program_id int,name varchar,college varchar,introduction varchar)CREATE TABLE gsi (course_offering_id in... | SELECT DISTINCT semester.semester, semester.year FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND course.department = 'EECS' AND course.number = 421 AND course_offering.semester = semester.semester_id AND semester.semester_id > (SELECT SEMESTERalias1.semester_id FROM semeste... |
Show the relationship between the number of schools in each county and total enrollment in each county by a scatter plot. | CREATE TABLE School (School_id text,School_name text,Location text,Mascot text,Enrollment int,IHSAA_Class text,IHSAA_Football_Class text,County text)CREATE TABLE endowment (endowment_id int,School_id int,donator_name text,amount real)CREATE TABLE budget (School_id int,Year int,Budgeted int,total_budget_percent_budgeted... | SELECT COUNT(*), SUM(Enrollment) FROM School GROUP BY County |
For those records from the products and each product's manufacturer, visualize a bar chart about the distribution of name and the average of manufacturer , and group by attribute name, I want to show by the X in desc. | CREATE TABLE Products (Code INTEGER,Name VARCHAR(255),Price DECIMAL,Manufacturer INTEGER)CREATE TABLE Manufacturers (Code INTEGER,Name VARCHAR(255),Headquarter VARCHAR(255),Founder VARCHAR(255),Revenue REAL) | SELECT T1.Name, T1.Manufacturer FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T1.Name ORDER BY T1.Name DESC |
Who played Richmond at home? | CREATE TABLE table_14312471_7 (home_team VARCHAR,away_team VARCHAR) | SELECT home_team FROM table_14312471_7 WHERE away_team = "Richmond" |
What label is after 2004? | CREATE TABLE table_53217 ("Year" real,"Tracks" text,"Title" text,"Format,Special Notes" text,"Label" text) | SELECT "Label" FROM table_53217 WHERE "Year" > '2004' |
how many seats in a 734 | CREATE TABLE dual_carrier (main_airline varchar,low_flight_number int,high_flight_number int,dual_airline varchar,service_name text)CREATE TABLE ground_service (city_code text,airport_code text,transport_type text,ground_fare int)CREATE TABLE airline (airline_code varchar,airline_name text,note text)CREATE TABLE restri... | SELECT DISTINCT aircraft_code FROM aircraft WHERE aircraft_code = '734' |
what is the name when the constituency number is 150? | CREATE TABLE table_63371 ("Constituency number" text,"Name" text,"Reserved for (SC / ST /None)" text,"District" text,"Number of electorates (2009)" real) | SELECT "Name" FROM table_63371 WHERE "Constituency number" = '150' |
WHAT PLACE WAS A SCORE 67-70=137? | CREATE TABLE table_name_48 (place VARCHAR,score VARCHAR) | SELECT place FROM table_name_48 WHERE score = 67 - 70 = 137 |
mention the discharge time and diagnosis icd9 code of subject id 42820. | 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 procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title ... | SELECT demographic.dischtime, diagnoses.icd9_code FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.subject_id = "42820" |
For those employees who do not work in departments with managers that have ids between 100 and 200, a bar chart shows the distribution of job_id and department_id , and could you rank names from high to low order? | CREATE TABLE countries (COUNTRY_ID varchar(2),COUNTRY_NAME varchar(40),REGION_ID decimal(10,0))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 locations (LOCATION_ID decimal(4,0),STREET_ADDRESS varchar(40),POSTAL_CODE varchar(12... | SELECT JOB_ID, DEPARTMENT_ID FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY JOB_ID DESC |
provide the number of patients whose primary disease is ruq pain and year of birth is less than 2112? | 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)CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,sho... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "RUQ PAIN" AND demographic.dob_year < "2112" |
How many patients are with discharge location short term hospital and below age 67? | CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)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 ... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.discharge_location = "SHORT TERM HOSPITAL" AND demographic.age < "67" |
When was the church in Arnafjord built? | CREATE TABLE table_59057 ("Parish (Prestegjeld)" text,"Sub-Parish (Sokn)" text,"Church Name" text,"Year Built" text,"Location of the Church" text) | SELECT "Year Built" FROM table_59057 WHERE "Location of the Church" = 'arnafjord' |
What was the result of the game that had 56,500 in attendance? | CREATE TABLE table_59320 ("Date" text,"Time" text,"Opponent#" text,"Rank #" text,"Result" text,"Attendance" text) | SELECT "Result" FROM table_59320 WHERE "Attendance" = '56,500' |
How many rounds have School/club team of pan american? | CREATE TABLE table_name_91 (round INTEGER,school_club_team VARCHAR) | SELECT SUM(round) FROM table_name_91 WHERE school_club_team = "pan american" |
What is the number of people in attendance when the time is 3:00? | CREATE TABLE table_77393 ("Game" real,"Date" text,"Score" text,"Location" text,"Time" text,"Attendance" real) | SELECT "Attendance" FROM table_77393 WHERE "Time" = '3:00' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.