schema stringlengths 20 14.6k | query stringlengths 17 2.58k | question stringlengths 8 1.06k |
|---|---|---|
<table0>[authors] { <col0>[au_id]:[text] <col1>[au_lname]:[text] <col2>[au_fname]:[text] <col3>[phone]:[text] <col4>[address]:[text] <col5>[city]:[text] <col6>[state]:[text] <col7>[zip]:[text] <col8>[contract]:[text] } <table1>[jobs] { <col0>[job_id]:[integer] <col1>[job_desc]:[text] <col2>[min_lvl]:[integer] <col3>[m... | SELECT CAST( SUM( CASE WHEN T2.city = 'Fremont' THEN `<col3>` END ) - SUM( CASE WHEN T2.city = 'Portland' THEN `<col3>` END ) AS REAL ) * 100 / SUM( CASE WHEN T2.city = 'Fremont' THEN `<col3>` END ) FROM `<table9>` AS T1 INNER JOIN stores AS T2 ON T1.stor_id = T2.stor_id WHERE STRFTIME( '%Y', T1.ord_date ) = '1993' | For the quantities, what percent more did the store in Fremont sell than the store in Portland in 1993? |
<table0>[table_17016] { <col0>[Ships]:[name] <col1>[text]:[Entered] <col2>[service]:[text] <col3>[Ended]:[service] <col4>[text]:[Gross] <col5>[Tonnage]:[real] <col6>[Type]:[Vessel] } | SELECT MIN( "Gross Tonnage" ) FROM `<table0>` WHERE "Ships name" = 'Munich' | What is the minimum gross tonnage of the Munich? |
<table0>[Attendees] { <col0>[attendee_id]:[INT] <col1>[event_id]:[INT] <col2>[age_group]:[VARCHAR] <col3>[attendee_date]:[DATE] } | SELECT event_id, age_group, COUNT( * ) AS num_attendees FROM `<table0>` WHERE YEAR( `<col3>` ) = 2020 GROUP BY event_id, age_group; | What was the distribution of attendees by age group for each event in '2020'? |
<table0>[table_204_495] { <col0>[number]:[date] <col1>[text]:[opponent] <col2>[text]:[venue] <col3>[text]:[result] <col4>[text]:[attendance] <col5>[number]:[scorers] } | SELECT COUNT( * ) FROM `<table0>` WHERE "attendance" > 10000 | how many games had an attendance of more than 10,000 ? |
<table0>[table_name_24] { <col0>[grand_prix]:[VARCHAR] <col1>[fastest_lap]:[VARCHAR] <col2>[pole_position]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "gerhard berger" AND `<col2>` = "jacques villeneuve" | Which grand prix had gerhard berger in his fastest lap and a jacques villeneuve pole position?
|
<table0>[university] { <col0>[School_ID]:[int] <col1>[School]:[text] <col2>[Location]:[text] <col3>[Founded]:[real] <col4>[Affiliation]:[text] <col5>[Enrollment]:[real] <col6>[Nickname]:[text] <col7>[Primary_conference]:[text] } <table1>[basketball_match] { <col0>[Team_ID]:[int] <col1>[School_ID]:[int] <col2>[Team_Nam... | SELECT ACC_Road, SUM( `<col0>` ) FROM `<table1>` GROUP BY `<col6>` ORDER BY SUM( `<col0>` ) | Return a bar chart about the distribution of ACC_Road and the sum of Team_ID , and group by attribute ACC_Road, and display by the total number in asc.
|
<table0>[water_usage] { <col0>[state]:[VARCHAR] <col1>[year]:[INT] <col2>[consumption]:[INT] } | SELECT MAX( `<col2>` ) FROM `<table0>` WHERE `<col0>` = 'Texas' AND `<col1>` BETWEEN 2015 AND 2018; | What is the maximum water consumption in Texas from 2015 to 2018? |
<table0>[table_26461] { <col0>[Overall]:[Episode] <col1>[real]:[Original] <col2>[airdate]:[text] <col3>[Iron]:[Chef] <col4>[text]:[Challenger] <col5>[text]:[Challenger] <col6>[Specialty]:[text] <col7>[Theme]:[Ingredient] <col8>[text]:[Winner] } | SELECT MAX( "Overall Episode #" ) FROM `<table0>` WHERE "Original airdate" = 'November 21, 1993' | What episode number originally aired on November 21, 1993?
|
<table0>[food_safety_inspections] { <col0>[record_id]:[INT] <col1>[inspection_date]:[DATE] <col2>[violation_count]:[INT] } | DELETE FROM `<table0>` WHERE `<col1>` >= '2022-01-01' AND `<col1>` <= '2022-01-31'; | Delete all food safety inspection records from January 2022 |
<table0>[bridges] { <col0>[INT]:[name] <col1>[VARCHAR]:[255] <col2>[design_load]:[FLOAT] <col3>[construction_year]:[INT] } | SELECT name, design_load, construction_year, ROW_NUMBER( ) OVER ( ORDER BY `<col2>` DESC ) as rank FROM `<table0>` WHERE location = 'Pacific Northwest' GROUP BY name, design_load, `<col3>` HAVING rank <= 3; | Identify the top three bridges with the highest design load in the Pacific Northwest, including the bridge name, design load, and construction year, and rank them by the design load in descending order. |
<table0>[table_70684] { <col0>[Date]:[text] <col1>[Visiting]:[Team] <col2>[text]:[Final] <col3>[Score]:[text] <col4>[Host]:[Team] <col5>[text]:[Stadium] } | SELECT "Final Score" FROM `<table0>` WHERE "Visiting Team" = 'denver broncos' | What was the final score when the Denver Broncos were the visiting team?
|
<table0>[outputevents] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[charttime]:[time] <col5>[itemid]:[number] <col6>[value]:[number] } <table1>[procedures_icd] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icd9... | SELECT COUNT( * ) > 0 FROM `<table14>` WHERE `<table14>`.hadm_id IN ( SELECT `<table4>`.hadm_id FROM `<table4>` WHERE `<table4>`.subject_id = 60347 AND NOT `<table4>`.dischtime IS NULL ORDER BY `<table4>`.admittime LIMIT 1 ) AND `<table14>`.drug = 'ipratropium bromide neb' | when they visited the hospital first time, had ipratropium bromide neb ever been prescribed to patient 60347? |
<table0>[paper] { <col0>[paperid]:[int] <col1>[title]:[varchar] <col2>[venueid]:[int] <col3>[year]:[int] <col4>[numciting]:[int] <col5>[numcitedby]:[int] <col6>[journalid]:[int] } <table1>[paperkeyphrase] { <col0>[paperid]:[int] <col1>[keyphraseid]:[int] } <table2>[paperdataset] { <col0>[paperid]:[int] <col1>[dataset... | SELECT DISTINCT writes.paperid FROM author, writes WHERE author.authorname = 'srinivasan iyer' AND writes.authorid = author.authorid | What papers has srinivasan iyer written ?
|
<table0>[table_11368] { <col0>[Nat]:[text] <col1>[text]:[real] <col2>[Goals]:[real] <col3>[Ends]:[real] <col4>[Transfer]:[fee] } | SELECT AVG( "Ends" ) FROM `<table0>` WHERE "Since" = '2003' AND "Name" = 'márquez' | What is the average Ends with a Since of 2003, and a Name with m rquez?
|
<table0>[table_train_193] { <col0>[int]:[gender] <col1>[string]:[c_peptide_level] <col2>[float]:[hemoglobin_a1c_hba1c] <col3>[float]:[proteinuria] <col4>[int]:[body_mass_index_bmi] <col5>[float]:[age] <col6>[float]:[NOUSE] } | SELECT * FROM `<table0>` WHERE proteinuria > 250 | significant proteinuria ( > 250 mg / dl )
|
<table0>[fleet_inventory] { <col0>[INT]:[ev_type] <col1>[VARCHAR]:[quantity] <col2>[INT]:[INSERT] } | SELECT SUM( quantity ) FROM `<table0>` WHERE ev_type LIKE 'electric%'; | What is the sum of electric cars and electric trucks in the fleet_inventory table? |
<table0>[table_name_15] { <col0>[country_territory]:[VARCHAR] <col1>[imed_avicenna_listed]:[VARCHAR] <col2>[established]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "both" AND `<col2>` = 1969 | What country has a medical school established in 1969 with both an IMED and avicenna?
|
<table0>[table_name_22] { <col0>[goal_difference]:[INTEGER] <col1>[points]:[VARCHAR] <col2>[losses]:[VARCHAR] <col3>[draws]:[VARCHAR] } | SELECT SUM( `<col0>` ) FROM `<table0>` WHERE `<col2>` < 9 AND `<col3>` = 8 AND `<col1>` > 40 | How much Goal Difference has less than 9 Losses, and 8 Draws, and more than 40 points? |
<table0>[d_icd_procedures] { <col0>[row_id]:[number] <col1>[icd9_code]:[text] <col2>[short_title]:[text] <col3>[long_title]:[text] } <table1>[d_labitems] { <col0>[row_id]:[number] <col1>[itemid]:[number] <col2>[label]:[text] } <table2>[chartevents] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]... | SELECT DISTINCT `<table7>`.`<table7>` FROM `<table7>` WHERE `<table7>`.event_type = '`<table8>`' AND `<table7>`.event_id IN ( SELECT `<table8>`.row_id FROM `<table8>` WHERE `<table8>`.icd9_code = ( SELECT `<table13>`.icd9_code FROM `<table13>` WHERE `<table13>`.short_title = 'contusion of thigh' ) ) | what is the price of diagnosis of contusion of thigh? |
<table0>[microlab] { <col0>[microlabid]:[number] <col1>[patientunitstayid]:[number] <col2>[culturesite]:[text] <col3>[organism]:[text] <col4>[culturetakentime]:[time] } <table1>[cost] { <col0>[costid]:[number] <col1>[uniquepid]:[text] <col2>[patienthealthsystemstayid]:[number] <col3>[eventtype]:[text] <col4>[eventid]:... | SELECT COUNT( DISTINCT t1.uniquepid ) FROM ( SELECT patient.uniquepid, `<table7>`.`<table7>`time FROM `<table7>` JOIN patient ON `<table7>`.patientunitstayid = patient.patientunitstayid WHERE `<table7>`.`<table7>`name = 'chest pain' AND STRFTIME( '%y', `<table7>`.`<table7>`time ) <= '2104' ) AS t1 JOIN ( SELECT patient... | count the number of people who were prescribed tamsulosin hcl 0.4 mg po caps within 2 months following a diagnosis of chest pain until 2104.
|
<table0>[table_20745759_1] { <col0>[date]:[VARCHAR] <col1>[attendance]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = 9372 | Name the date for attendance 9372 |
<table0>[table_29728596_2] { <col0>[away_team]:[VARCHAR] <col1>[competition]:[VARCHAR] <col2>[home_team]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "1st ``Republic of Srpska Football Day``" AND `<col2>` = "U 14 Republic of Srpska" | Who were the away teams when the competition was the 1st republic of srpska football day and the home team was u 14 republic of srpska?
|
<table0>[table_26141160_2] { <col0>[position]:[VARCHAR] <col1>[team]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "Dallas Burn" | Dallas Burn's draft pick was which position? |
<table0>[people] { <col0>[People_ID]:[int] <col1>[Sex]:[text] <col2>[text]:[Date_of_Birth] <col3>[text]:[Height] <col4>[real]:[Weight] } <table1>[candidate] { <col0>[Candidate_ID]:[int] <col1>[People_ID]:[int] <col2>[Poll_Source]:[text] <col3>[Date]:[text] <col4>[Support_rate]:[real] <col5>[Consider_rate]:[real] <col6... | SELECT Name, Weight FROM `<table0>` ORDER BY Name DESC | Visualize a bar chart about the distribution of Name and Weight , could you sort from high to low by the Name? |
<table0>[time_zone] { <col0>[time_zone_code]:[text] <col1>[time_zone_name]:[text] <col2>[hours_from_gmt]:[int] } <table1>[airline] { <col0>[airline_code]:[varchar] <col1>[airline_name]:[text] <col2>[note]:[text] } <table2>[code_description] { <col0>[code]:[varchar] <col1>[description]:[text] } <table3>[flight_stop] ... | SELECT DISTINCT `<table7>`_code FROM `<table7>` WHERE `<table7>`_code = 'M80' | what is the seating capacity of the type of aircraft M80
|
<table0>[demographic] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[name]:[text] <col3>[marital_status]:[text] <col4>[age]:[text] <col5>[dob]:[text] <col6>[gender]:[text] <col7>[language]:[text] <col8>[religion]:[text] <col9>[admission_type]:[text] <col10>[days_stay]:[text] <col11>[insurance]:[text] <col12>... | SELECT COUNT( DISTINCT `<table0>`.subject_id ) FROM `<table0>` WHERE `<table0>`.diagnosis = "STEMI" AND `<table0>`.admityear < "2155" | what is the number of patients whose primary disease is stemi and admission year is less than 2155?
|
<table0>[cultural_tours] { <col0>[tour_id]:[INT] <col1>[tour_name]:[VARCHAR] <col2>[255]:[country] <col3>[VARCHAR]:[255] <col4>[revenue]:[DECIMAL] } | SELECT SUM( `<col4>` ) FROM `<table0>` WHERE country = 'Italy'; | What is the revenue generated by cultural heritage tours in Italy? |
<table0>[table_name_80] { <col0>[score]:[VARCHAR] <col1>[player]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "craig stadler" | What was Craig Stadler's score? |
<table0>[Exhibitions_LA] { <col0>[INT]:[visitor_age] <col1>[INT]:[INSERT] } | SELECT visitor_age, COUNT( * ) FROM `<table0>` GROUP BY visitor_age; | What is the distribution of visitor ages for exhibitions in Los Angeles?' |
<table0>[table_1342013_37] { <col0>[first_elected]:[INTEGER] <col1>[incumbent]:[VARCHAR] } | SELECT MIN( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "Alvin Bush" | Name the minumim first elected for alvin bush |
<table0>[table_19017269_5] { <col0>[world]:[INTEGER] } | SELECT MIN( `<col0>` ) FROM `<table0>` | what is the worlds smallest population?
|
<table0>[Player] { <col0>[PlayerID]:[INT] <col1>[VARCHAR]:[Country] <col2>[VARCHAR]:[Score] } | SELECT MAX( Score ) FROM `<table0>` WHERE Country IN ( 'Germany', 'France', 'United Kingdom', 'Italy', 'Spain' ); | What is the maximum score achieved by players from Europe? |
<table0>[cost] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[event_type]:[text] <col4>[event_id]:[number] <col5>[chargetime]:[time] } <table1>[transfers] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[eventtype]:... | SELECT MAX( `<table10>`.valuenum ) FROM `<table10>` WHERE `<table10>`.icustay_id IN ( SELECT `<table13>`.icustay_id FROM `<table13>` WHERE `<table13>`.hadm_id IN ( SELECT `<table14>`.hadm_id FROM `<table14>` WHERE `<table14>`.subject_id = 5553 ) ) AND `<table10>`.itemid IN ( SELECT `<table6>`.itemid FROM `<table6>` WHE... | indicate the yearly maximum amount of heart rate for patient 5553 until 11/10/2102.
|
<table0>[Events] { <col0>[event_id]:[INT] <col1>[event_name]:[VARCHAR] <col2>[category]:[VARCHAR] <col3>[state]:[VARCHAR] <col4>[attendee_count]:[INT] } | SELECT SUM( `<col4>` ) FROM `<table0>` WHERE `<col2>` = 'Music' AND `<col3>` = 'California'; | How many attendees were there at events with a 'Music' category in California? |
<table0>[PostsWithDeleted] { <col0>[number]:[PostTypeId] <col1>[number]:[AcceptedAnswerId] <col2>[number]:[ParentId] <col3>[number]:[CreationDate] <col4>[time]:[DeletionDate] <col5>[time]:[Score] <col6>[number]:[ViewCount] <col7>[number]:[Body] <col8>[text]:[OwnerUserId] <col9>[number]:[OwnerDisplayName] <col10>[text]:... | SELECT UserId AS "user_link", COUNT( * ) FROM `<table4>` WHERE Name IN ( 'Socratic', 'Stellar Question', 'Great Question', 'Famous Question', 'Illuminator', 'Great Answer', 'Populist', 'Reversal', 'Unsung Hero', 'Fanatic', 'Legendary', 'Marshal', 'Constable', 'Sheriff', 'Steward', 'Copy Editor', 'Electorate', 'Publicis... | Gold badges (sans tag badges). |
<table0>[table_78074] { <col0>[Subframe]:[real] <col1>[Page]:[text] <col2>[text]:[Word] <col3>[real]:[Bits] } | SELECT "Word #" FROM `<table0>` WHERE "Name" = 'omega dot' | What is the word count that is named omega dot?
|
<table0>[table_74884] { <col0>[Date]:[text] <col1>[Venue]:[text] <col2>[Score]:[text] <col3>[Result]:[text] <col4>[Competition]:[text] } | SELECT "Venue" FROM `<table0>` WHERE "Competition" = 'friendly' AND "Date" = 'october 16, 2012' | Name the venue for friendly competition october 16, 2012
|
<table0>[table_69604] { <col0>[Polling]:[Firm] <col1>[text]:[Date] <col2>[Published]:[text] <col3>[Papadopoulos]:[text] <col4>[Christofias]:[text] <col5>[Kasoulidis]:[text] <col6>[Themistokleous]:[text] } | SELECT "T. Papadopoulos" FROM `<table0>` WHERE "I. Kasoulidis" = '27.1%' | What was the percentage for T. Papadopoulos when I. Kasoulidis was 27.1%?
|
<table0>[table_name_65] { <col0>[points_classification]:[VARCHAR] <col1>[team_classification]:[VARCHAR] <col2>[stage]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "predictor-lotto" AND `<col2>` = "1" | Name the points classification for predictor-lotto and stage 1 |
<table0>[table_80313] { <col0>[Year]:[real] <col1>[Total]:[Region] <col2>[real]:[Biggenden] <col3>[real]:[Eidsvold] <col4>[real]:[Gayndah] <col5>[real]:[Monto] <col6>[real]:[Mundubbera] <col7>[real]:[Perry] } | SELECT SUM( "Year" ) FROM `<table0>` WHERE "Mundubbera" < '2,395' AND "Biggenden" < '1,506' | Which is the year with Mundubbera being smaller than 2,395, and Biggenden smaller than 1,506? |
<table0>[table_name_11] { <col0>[home_ground_s]:[VARCHAR] <col1>[name]:[VARCHAR] } | SELECT home_ground_s_ FROM `<table0>` WHERE `<col1>` = "melville cricket club" | What's the Home ground(s) listed for the Name Melville Cricket Club? |
<table0>[table_name_12] { <col0>[chassis]:[VARCHAR] <col1>[driver]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "otto stuppacher" | What Chassis was driven by Otto Stuppacher? |
<table0>[Bridges] { <col0>[INT]:[VARCHAR] <col1>[Location]:[VARCHAR] <col2>[DateAdded]:[DATE] } | INSERT INTO Bridges ( ID, Name, Location, DateAdded ) VALUES ( 3, 'Chesapeake Bay Bridge-Tunnel', 'Virginia Beach, VA', '1964-04-15' ); | Insert a new record into the 'Bridges' table for a bridge named 'Chesapeake Bay Bridge-Tunnel' with an ID of 3, located in 'Virginia Beach, VA', and added on '1964-04-15'. |
<table0>[intangible_heritage] { <col0>[INT]:[name] <col1>[VARCHAR]:[255] <col2>[region]:[VARCHAR] <col3>[255]:[INSERT] } | SELECT name, type FROM ( SELECT id, name, region, 'intangible' as type FROM `<table0>` WHERE `<col2>` = 'Asia-Pacific' ) AS subquery; | What are the names and types of intangible cultural heritage elements in the Asia-Pacific region? |
<table0>[table_71193] { <col0>[Player]:[text] <col1>[Position]:[text] <col2>[Previous]:[Club] <col3>[text]:[Apps] <col4>[real]:[Tries] <col5>[real]:[Goals] <col6>[text]:[Points] } | SELECT "Position" FROM `<table0>` WHERE "Goals" = '0' AND "Tries" < '1' AND "Player" = 'matt james' | With 0 Goals and less than 1 Tries, what is Matt James position?
|
<table0>[table_name_91] { } | SELECT 2012 FROM `<table0>` WHERE 2007 = "a" AND 2011 = "a" | Which tournament in 2012 had a 2007 and 2011 finishes of "A"? |
<table0>[store_district] { <col0>[store_id]:[number] <col1>[district_id]:[number] } <table1>[product] { <col0>[product_id]:[number] } <table2>[store] { <col0>[store_id]:[number] <col1>[store_name]:[text] <col2>[type]:[text] <col3>[area_size]:[number] <col4>[number_of_product_category]:[number] <col5>[ranking]:[number... | SELECT t3.district_name FROM `<table2>` AS t1 JOIN `<table2>`_district AS t2 ON t1.`<table2>`_id = t2.`<table2>`_id JOIN district AS t3 ON t2.district_id = t3.district_id WHERE t1.type = "City Mall" INTERSECT SELECT t3.district_name FROM `<table2>` AS t1 JOIN `<table2>`_district AS t2 ON t1.`<table2>`_id = t2.`<table2>... | What are the names of the districts that have both mall and village store style shops?
|
<table0>[table_name_24] { <col0>[tries_for]:[VARCHAR] <col1>[club]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "croesyceiliog rfc" | How many tries did the club Croesyceiliog rfc have?
|
<table0>[intakeoutput] { <col0>[intakeoutputid]:[number] <col1>[patientunitstayid]:[number] <col2>[cellpath]:[text] <col3>[celllabel]:[text] <col4>[cellvaluenumeric]:[number] <col5>[intakeoutputtime]:[time] } <table1>[patient] { <col0>[uniquepid]:[text] <col1>[patienthealthsystemstayid]:[number] <col2>[patientunitstay... | SELECT t3.drugname FROM ( SELECT t2.drugname, DENSE_RANK( ) OVER ( ORDER BY COUNT( * ) DESC ) AS c1 FROM ( SELECT patient.uniquepid, `<table3>`.drugstarttime FROM `<table3>` JOIN patient ON `<table3>`.patientunitstayid = patient.patientunitstayid WHERE `<table3>`.drugname = 'metoclopramide' AND DATETIME( `<table3>`.dru... | for patients who were prescribed with metoclopramide, what was the four most frequently prescribed drugs at the same time until 4 years ago? |
<table0>[city] { <col0>[city_code]:[varchar] <col1>[city_name]:[varchar] <col2>[state_code]:[varchar] <col3>[country_name]:[varchar] <col4>[time_zone_code]:[varchar] } <table1>[flight_fare] { <col0>[flight_id]:[int] <col1>[fare_id]:[int] } <table2>[flight_stop] { <col0>[flight_id]:[int] <col1>[stop_number]:[int] <col... | SELECT DISTINCT flight.flight_id FROM `<table13>` AS AIRPORT_SERVICE_0, `<table13>` 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 = 'BALTIMORE' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'PHILADELPHIA... | let 's look at BALTIMORE to PHILADELPHIA again |
<table0>[lab] { <col0>[labid]:[number] <col1>[patientunitstayid]:[number] <col2>[labname]:[text] <col3>[labresult]:[number] <col4>[labresulttime]:[time] } <table1>[vitalperiodic] { <col0>[vitalperiodicid]:[number] <col1>[patientunitstayid]:[number] <col2>[temperature]:[number] <col3>[sao2]:[number] <col4>[heartrate]:[... | SELECT `<table3>`.drugstarttime FROM `<table3>` WHERE `<table3>`.`<table4>`unitstayid IN ( SELECT `<table4>`.`<table4>`unitstayid FROM `<table4>` WHERE `<table4>`.`<table4>`healthsystemstayid IN ( SELECT `<table4>`.`<table4>`healthsystemstayid FROM `<table4>` WHERE `<table4>`.uniquepid = '022-127262' AND NOT `<table4>`... | when was patient 022-127262 last prescribed the medication via the sub-q route in the last hospital encounter?
|
<table0>[job_history] { <col0>[EMPLOYEE_ID]:[decimal] <col1>[START_DATE]:[date] <col2>[END_DATE]:[date] <col3>[JOB_ID]:[varchar] <col4>[DEPARTMENT_ID]:[decimal] } <table1>[jobs] { <col0>[JOB_ID]:[varchar] <col1>[JOB_TITLE]:[varchar] <col2>[MIN_SALARY]:[decimal] <col3>[MAX_SALARY]:[decimal] } <table2>[locations] { <co... | SELECT JOB_ID, AVG( `<col7>` ) FROM `<table6>` WHERE `<col7>` BETWEEN 8000 AND 12000 AND `<col8>` <> "null" OR `<col10>` <> 40 GROUP BY `<col6>` ORDER BY AVG( `<col7>` ) | For those employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40, show me about the distribution of job_id and the average of salary , and group by attribute job_id in a bar chart, display in ascending by the Y.
|
<table0>[Votes] { <col0>[number]:[PostId] <col1>[number]:[VoteTypeId] <col2>[number]:[UserId] <col3>[number]:[CreationDate] <col4>[time]:[BountyAmount] } <table1>[Badges] { <col0>[number]:[UserId] <col1>[number]:[text] <col2>[Date]:[time] <col3>[Class]:[number] <col4>[TagBased]:[boolean] } <table2>[ReviewRejectionRea... | SELECT p.Id AS "post_link", p.Title AS "title", MIN( p.Score ) AS score, COUNT( * ) AS flagcount FROM `<table23>` AS p INNER JOIN Votes AS v ON p.Id = v.PostId WHERE v.VoteTypeId IN ( 4, 12 ) AND p.PostTypeId = 2 AND DeletionDate IS NULL GROUP BY p.Id, p.Title ORDER BY flagcount DESC LIMIT 200 | non-deleted posts with most spam flags.
|
<table0>[table_name_15] { <col0>[fate]:[VARCHAR] <col1>[tonnage]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "7,217" | Which Fate has a Tonnage of 7,217? |
<table0>[table_name_68] { <col0>[country]:[VARCHAR] <col1>[to_par]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "+5" | What was the country of the player at +5? |
<table0>[table_40307] { <col0>[Date]:[text] <col1>[Result]:[text] <col2>[Opponent]:[text] <col3>[Location]:[text] <col4>[Method]:[text] <col5>[Round]:[real] <col6>[Record]:[text] } | SELECT AVG( "Round" ) FROM `<table0>` WHERE "Location" = 'auckland, new zealand' AND "Method" = 'tko' AND "Date" = '1994-11-24' | Which Round has a Location of auckland, new zealand, and a Method of tko on 1994-11-24?
|
<table0>[restriction] { <col0>[restriction_code]:[text] <col1>[advance_purchase]:[int] <col2>[stopovers]:[text] <col3>[saturday_stay_required]:[text] <col4>[minimum_stay]:[int] <col5>[maximum_stay]:[int] <col6>[application]:[text] <col7>[no_discounts]:[text] } <table1>[flight] { <col0>[aircraft_code_sequence]:[text] <... | SELECT DISTINCT `<table22>`_code FROM `<table22>` WHERE `<table22>`_code = 'ORD' | what is ORD
|
<table0>[Customers] { <col0>[CustomerID]:[integer] <col1>[Customer]:[Names] } <table1>[Products] { <col0>[ProductID]:[integer] <col1>[Product]:[text] } <table2>[Regions] { <col0>[StateCode]:[text] <col1>[State]:[text] <col2>[Region]:[text] } <table3>[Sales] { <col0>[Team]:[SalesTeamID] } <table4>[Store] { <col0>[Lo... | SELECT `City Name` FROM `Store Locations` ORDER BY Population DESC LIMIT 1 | Which city has the largest population? |
<table0>[companies] { <col0>[INT]:[name] <col1>[VARCHAR]:[255] <col2>[sector]:[VARCHAR] <col3>[255]:[ESG_score] <col4>[FLOAT]:[INSERT] } <table1>[sectors] { <col0>[INT]:[sector] <col1>[VARCHAR]:[255] } | SELECT AVG( ESG_score ) AS avg_ESG_score FROM `<table0>` c JOIN sectors s ON c.sector = s.sector WHERE s.sector = 'Consumer Goods'; | What is the average ESG score for companies in the consumer goods sector? |
<table0>[SuggestedEditVotes] { <col0>[number]:[SuggestedEditId] <col1>[number]:[UserId] <col2>[number]:[VoteTypeId] <col3>[number]:[CreationDate] <col4>[time]:[TargetUserId] <col5>[number]:[TargetRepChange] } <table1>[PostNoticeTypes] { <col0>[number]:[ClassId] <col1>[number]:[text] <col2>[Body]:[text] <col3>[IsHidden... | SELECT NUMBER_TO_STR( COUNT( * ), '##,###' ) AS Total, SUM( CASE WHEN UserId IS NULL THEN 0 ELSE 1 END ) AS "have_user" FROM `<table5>` WHERE VoteTypeId IS NULL | How many votes have key fields, by type?. |
<table0>[table_1341672_14] { <col0>[candidates]:[VARCHAR] <col1>[district]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "Illinois 15" | Name the candidates for illinois 15
|
<table0>[table_240936_2] { <col0>[region_2__uk]:[VARCHAR] <col1>[region_4__australia]:[VARCHAR] } | SELECT region_2__uk_ FROM `<table0>` WHERE region_4__australia_ = "July 31, 2008" | What is the region 2 (UK) date associated with a region 4 (Aus) date of July 31, 2008? |
<table0>[table_name_36] { <col0>[name]:[VARCHAR] <col1>[local_board]:[VARCHAR] <col2>[decile]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "albert–eden" AND `<col2>` = "9" | What is the name when the local board is albert–eden, and a Decile of 9? |
<table0>[table_name_29] { <col0>[total]:[INTEGER] <col1>[nation]:[VARCHAR] <col2>[bronze]:[VARCHAR] <col3>[gold]:[VARCHAR] } | SELECT MAX( `<col0>` ) FROM `<table0>` WHERE `<col2>` < 4 AND `<col3>` = 1 AND `<col1>` = "italy" | What was Italy's highest total when there were less than 4 bronze and 1 gold? |
<table0>[fare_basis] { <col0>[fare_basis_code]:[text] <col1>[booking_class]:[text] <col2>[class_type]:[text] <col3>[premium]:[text] <col4>[economy]:[text] <col5>[discounted]:[text] <col6>[night]:[text] <col7>[season]:[text] <col8>[basis_days]:[text] } <table1>[dual_carrier] { <col0>[main_airline]:[varchar] <col1>[low_... | SELECT DISTINCT flight.flight_id FROM `<table15>` AS AIRPORT_SERVICE_0, `<table15>` 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 = 26 AND da... | what flights from SALT LAKE CITY to NEW YORK arrive next saturday before 1800 |
<table0>[table_train_130] { <col0>[int]:[gender] <col1>[string]:[systolic_blood_pressure_sbp] <col2>[int]:[right_bundle_branch_block] <col3>[bool]:[space_occupying_cerebral_lesion] <col4>[bool]:[huntington_disease] <col5>[bool]:[psychiatric_disease] <col6>[bool]:[mental_illness] <col7>[bool]:[treatment_regimen] <col8>[... | SELECT * FROM `<table0>` WHERE systolic_blood_pressure_sbp > 160 OR diastolic_blood_pressure_dbp > 100 OR `<col19>` = 1 OR treatment_regimen = 1 | blood pressure greater than 160 / 100 mmhg. subjects with elevated bp will be allowed at the discretion of the principal investigator. individuals with hypertension must have been stabilized to the current treatment regimen for at least 6 weeks prior to screening and not need adjustments to their treatment regimen dur... |
<table0>[table_25169] { <col0>[Rank]:[real] <col1>[1980]:[text] <col2>[1981]:[text] <col3>[1982]:[text] <col4>[1983]:[text] <col5>[1984]:[text] } | SELECT COUNT( "1983-84" ) FROM `<table0>` WHERE "1984-85" = 'Terri Gilreath' | How many entries for 1983-84 when 1984-85 is Terri Gilreath? |
<table0>[table_name_71] { <col0>[player]:[VARCHAR] <col1>[to_par]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "+1" | Who is the player with a to par of +1? |
<table0>[table_54768] { <col0>[Race]:[text] <col1>[Circuit]:[text] <col2>[Date]:[text] <col3>[Pole]:[position] <col4>[text]:[Fastest] <col5>[lap]:[text] <col6>[Winning]:[driver] <col7>[text]:[Constructor] <col8>[text]:[Tyre] <col9>[text]:[Report] } | SELECT "Race" FROM `<table0>` WHERE "Circuit" = 'monaco' | What race contains the Monaco circuit?
|
<table0>[job_history] { <col0>[EMPLOYEE_ID]:[decimal] <col1>[START_DATE]:[date] <col2>[END_DATE]:[date] <col3>[JOB_ID]:[varchar] <col4>[DEPARTMENT_ID]:[decimal] } <table1>[jobs] { <col0>[JOB_ID]:[varchar] <col1>[JOB_TITLE]:[varchar] <col2>[MIN_SALARY]:[decimal] <col3>[MAX_SALARY]:[decimal] } <table2>[regions] { <col0... | SELECT JOB_ID, SUM( `<col10>` ) FROM `<table4>` WHERE NOT `<col0>` IN ( SELECT `<col0>` FROM `<table0>` ) GROUP BY `<col6>` ORDER BY `<col6>` | For those employees who did not have any job in the past, give me the comparison about the sum of department_id over the job_id , and group by attribute job_id, and show by the X-axis in ascending.
|
<table0>[table_1182] { <col0>[Constituency]:[text] <col1>[Electorate]:[real] <col2>[Spoilt]:[vote] <col3>[real]:[Total] <col4>[poll]:[text] <col5>[text]:[text] } | SELECT MIN( "s `<col2>` vote" ) FROM `<table0>` WHERE "Electorate" = '83850' | in electorate of 83850 what is the minimum s split vote
|
<table0>[table_name_65] { <col0>[round]:[INTEGER] <col1>[nationality]:[VARCHAR] <col2>[overall]:[VARCHAR] } | SELECT SUM( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "sweden" AND `<col2>` = 199 | What is the total round with an overall of 199 with sweden? |
<table0>[agency] { <col0>[name]:[VARCHAR] <col1>[255]:[employees] } <table1>[employee] { <col0>[agency]:[VARCHAR] <col1>[255]:[salary] <col2>[DECIMAL]:[INSERT] <col3>[agency]:[name] <col4>[employees]:[VALUES] <col5>[Department]:[Defense] <col6>[750000]:[Department] <col7>[Veterans]:[Affairs] <col8>[400000]:[Department... | SELECT agency, AVG( salary ) FROM `<table1>` GROUP BY agency; | What is the average salary of employees in each federal agency? |
<table0>[patients] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[gender]:[text] <col3>[dob]:[time] <col4>[dod]:[time] } <table1>[prescriptions] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[startdate]:[time] <col4>[enddate]:[time] <col5>[drug]:[text] <col6>[dose_v... | SELECT AVG( `<table10>`.valuenum ) FROM `<table10>` WHERE `<table10>`.hadm_id IN ( SELECT `<table7>`.hadm_id FROM `<table7>` WHERE `<table7>`.subject_id = 58932 ) AND `<table10>`.itemid IN ( SELECT `<table3>`.itemid FROM `<table3>` WHERE `<table3>`.label = 'rdw' ) | what was the average rdw value for patient 58932?
|
<table0>[table_name_95] { <col0>[date]:[VARCHAR] <col1>[winning_score]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = –8( 69 - 72 - 70 - 69 = 280 ) | On what Date was the Winning score –8 (69-72-70-69=280)? |
<table0>[lab] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[itemid]:[text] <col3>[charttime]:[text] <col4>[flag]:[text] <col5>[value_unit]:[text] <col6>[label]:[text] <col7>[fluid]:[text] } <table1>[demographic] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[name]:[text] <col3>[marital_status]:[... | SELECT COUNT( DISTINCT `<table1>`.subject_id ) FROM `<table1>` INNER JOIN diagnoses ON `<table1>`.hadm_id = diagnoses.hadm_id WHERE `<table1>`.admityear < "2120" AND diagnoses.long_title = "Hemoptysis, unspecified" | How many patients with unspecified hemoptysis were admitted before the year 2120? |
<table0>[basketball_match] { <col0>[Team_ID]:[int] <col1>[School_ID]:[int] <col2>[Team_Name]:[text] <col3>[ACC_Regular_Season]:[text] <col4>[ACC_Percent]:[text] <col5>[ACC_Home]:[text] <col6>[ACC_Road]:[text] <col7>[All_Games]:[text] <col8>[All_Games_Percent]:[int] <col9>[All_Home]:[text] <col10>[All_Road]:[text] <col1... | SELECT ACC_Percent, `<col8>` FROM `<table0>` GROUP BY `<col7>` | Draw a scatterplot of acc percent vs all_games_percent where acc percent is on the x-axis and points are colored by All_Games
|
<table0>[manufacturers] { <col0>[code]:[number] <col1>[name]:[text] <col2>[headquarter]:[text] <col3>[founder]:[text] <col4>[revenue]:[number] } <table1>[products] { <col0>[code]:[number] <col1>[name]:[text] <col2>[price]:[number] <col3>[manufacturer]:[number] } | SELECT T1.name FROM `<table1>` AS T1 JOIN manufacturers AS T2 ON T1.manufacturer = T2.code WHERE T2.name = 'Creative Labs' INTERSECT SELECT T1.name FROM `<table1>` AS T1 JOIN manufacturers AS T2 ON T1.manufacturer = T2.code WHERE T2.name = 'Sony' | Find the name of product that is produced by both companies Creative Labs and Sony.
|
<table0>[college] { <col0>[cName]:[VARCHAR] } <table1>[tryout] { <col0>[cName]:[VARCHAR] } | SELECT DISTINCT state FROM `<table0>` AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName | Find the states where have some college students in tryout. |
<table0>[table_203_667] { <col0>[number]:[year] <col1>[number]:[driver] <col2>[text]:[driver] <col3>[text]:[car] <col4>[text]:[notes] } | SELECT "year" FROM `<table0>` WHERE "driver" IS NULL | which was the only year that the event was not run ? |
<table0>[procedures_icd] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icd9_code]:[text] <col4>[charttime]:[time] } <table1>[inputevents_cv] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[charttime]:[time] <col5>... | SELECT 1 * ( STRFTIME( '%j', CURRENT_TIME( ) ) - STRFTIME( '%j', `<table14>`.startdate ) ) FROM `<table14>` WHERE `<table14>`.hadm_id IN ( SELECT `<table9>`.hadm_id FROM `<table9>` WHERE `<table9>`.subject_id = 99883 AND `<table9>`.dischtime IS NULL ) AND `<table14>`.drug = 'potassium chloride' ORDER BY `<table14>`.sta... | what is the number of days since patient 99883 received the last potassium chloride prescription in the current hospital encounter? |
<table0>[table_30167] { <col0>[Series]:[episode] <col1>[real]:[Season] <col2>[episode]:[real] <col3>[Title]:[text] <col4>[Directed]:[text] <col5>[Written]:[text] <col6>[Original]:[air] <col7>[date]:[text] <col8>[viewers]:[million] } | SELECT MIN( "Series episode" ) FROM `<table0>` WHERE "Title" = 'Baby''s a Rock ''N'' Roller' | What is the episode number with a title 'baby's a rock 'n' roller'?
|
<table0>[table_22903426_1] { <col0>[windows_builders]:[VARCHAR] <col1>[name]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "Apache Gump" | Name the windows builders for apache gump |
<table0>[employees] { <col0>[INT]:[PRIMARY] <col1>[KEY]:[name] <col2>[VARCHAR]:[role] <col3>[VARCHAR]:[region] <col4>[VARCHAR]:[salary] } | INSERT INTO employees ( name, role, region, salary ) VALUES ( 'John Doe', 'Manager', 'Northwest', 80000 ), ( 'Jane Smith', 'Assistant Manager', 'Northwest', 60000 ); | Insert new records for employees in the "Northwest" region with the following names, roles, and salaries: "John Doe", "Manager", 80000; "Jane Smith", "Assistant Manager", 60000. |
<table0>[table_name_78] { <col0>[date_of_vacancy]:[VARCHAR] <col1>[team]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "vitória de guimarães" | What was the day of vacancy for vit ria de guimar es? |
<table0>[agricultural_metrics] { <col0>[INT]:[year] <col1>[INT]:[metric_type] <col2>[TEXT]:[value] <col3>[INT]:[PRIMARY] <col4>[KEY]:[INSERT] } | SELECT year, metric_type, SUM( value ) as total FROM `<table0>` GROUP BY year, metric_type ORDER BY year, metric_type; | Determine the total number of agricultural innovation metrics for each year, grouped by type of metric and ordered by year? |
<table0>[table_name_66] { <col0>[wins]:[INTEGER] <col1>[events]:[INTEGER] } | SELECT SUM( `<col0>` ) FROM `<table0>` WHERE `<col1>` < 3 | What is the total of wins when the evens is less than 3? |
<table0>[table_name_21] { <col0>[crowd]:[INTEGER] <col1>[away_team]:[VARCHAR] } | SELECT MIN( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "collingwood" | WHAT WAS COLLINGWOOD'S LOWEST CROWD NUMBER WHEN PLAYING AS THE AWAY TEAM? |
<table0>[demographic] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[name]:[text] <col3>[marital_status]:[text] <col4>[age]:[text] <col5>[dob]:[text] <col6>[gender]:[text] <col7>[language]:[text] <col8>[religion]:[text] <col9>[admission_type]:[text] <col10>[days_stay]:[text] <col11>[insurance]:[text] <col12>... | SELECT COUNT( DISTINCT `<table0>`.subject_id ) FROM `<table0>` INNER JOIN diagnoses ON `<table0>`.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON `<table0>`.hadm_id = prescriptions.hadm_id WHERE diagnoses.long_title = "Rheumatic heart disease, unspecified" AND prescriptions.route = "IV DRIP" | To how many patients with unspecified rheumatic heart disease was iv drip administered?
|
<table0>[vessels] { <col0>[INT]:[name] <col1>[VARCHAR]:[type] <col2>[VARCHAR]:[flag] <col3>[VARCHAR]:[length] } | INSERT INTO vessels ( id, name, type, flag, length ) VALUES ( 3, 'Sea Tiger', 'Oil Tanker', 'Liberia', 320.0 ); | Insert new records into the 'vessels' table for a new oil tanker named 'Sea Tiger' flying the Liberian flag |
<table0>[table_204_722] { <col0>[number]:[season] <col1>[text]:[series] <col2>[text]:[team] <col3>[text]:[races] <col4>[number]:[wins] <col5>[number]:[poles] <col6>[number]:[lap] <col7>[number]:[podiums] <col8>[number]:[points] <col9>[number]:[position] } | SELECT MIN( "points" ) FROM `<table0>` | what is the least number of points that daly won in a single seasons
|
<table0>[ReviewRejectionReasons] { <col0>[number]:[text] <col1>[Description]:[text] <col2>[PostTypeId]:[number] } <table1>[Posts] { <col0>[number]:[PostTypeId] <col1>[number]:[AcceptedAnswerId] <col2>[number]:[ParentId] <col3>[number]:[CreationDate] <col4>[time]:[DeletionDate] <col5>[time]:[Score] <col6>[number]:[View... | SELECT Id AS "post_link", FavoriteCount, Score, CreationDate FROM `<table1>` WHERE ( PostTypeId = 1 ) AND ( FavoriteCount > 0 ) AND ( Score < 0 ) ORDER BY CreationDate DESC | Questions with negative score which are favorited.
|
<table0>[table_name_21] { <col0>[high_assists]:[VARCHAR] <col1>[date]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "november 24" | WHAT IS THE HIGH ASSISTS ON NOVEMBER 24? |
<table0>[transfers] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[eventtype]:[text] <col5>[careunit]:[text] <col6>[wardid]:[number] <col7>[intime]:[time] <col8>[outtime]:[time] } <table1>[patients] { <col0>[row_id]:[number] <col1>[subject_id]:[number]... | SELECT COUNT( * ) FROM `<table14>` WHERE `<table14>`.icd9_code = ( SELECT `<table16>`.icd9_code FROM `<table16>` WHERE `<table16>`.short_title = 'larygnoscopy/tracheoscop' ) AND STRFTIME( '%y', `<table14>`.charttime ) = '2103' | how many times did a larygnoscopy/tracheoscop have taken place in 2103? |
<table0>[PostNoticeTypes] { <col0>[number]:[ClassId] <col1>[number]:[text] <col2>[Body]:[text] <col3>[IsHidden]:[boolean] <col4>[Predefined]:[boolean] <col5>[PostNoticeDurationId]:[number] } <table1>[PostsWithDeleted] { <col0>[number]:[PostTypeId] <col1>[number]:[AcceptedAnswerId] <col2>[number]:[ParentId] <col3>[numb... | SELECT COUNT( Id ) FROM `<table4>` WHERE PostTypeId = 1 | How many questions contain the word 'Basically'.
|
<table0>[table_70741] { <col0>[Date]:[text] <col1>[Visitor]:[text] <col2>[Score]:[text] <col3>[Home]:[text] <col4>[Decision]:[text] <col5>[Attendance]:[real] <col6>[Record]:[text] } | SELECT "Visitor" FROM `<table0>` WHERE "Record" = '28–14–6–2' | Who was the visiting team when the record was 28 14 6 2? |
<table0>[diagnoses] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table1>[prescriptions] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icustay_id]:[text] <col3>[drug_type]:[text] <col4>[drug]:[text] <col5>[formulary_drug_... | SELECT COUNT( DISTINCT `<table2>`.subject_id ) FROM `<table2>` INNER JOIN prescriptions ON `<table2>`.hadm_id = prescriptions.hadm_id WHERE prescriptions.formulary_drug_cd = "LORA2I" | Which patients have lora2i?
|
<table0>[student] { <col0>[student_id]:[int] <col1>[lastname]:[varchar] <col2>[firstname]:[varchar] <col3>[program_id]:[int] <col4>[declare_major]:[varchar] <col5>[total_credit]:[int] <col6>[total_gpa]:[float] <col7>[entered_as]:[varchar] <col8>[admit_term]:[int] <col9>[predicted_graduation_semester]:[int] <col10>[degr... | SELECT DISTINCT `<table16>`.department, `<table16>`.name, `<table16>`.number, semester.semester FROM `<table16>` INNER JOIN `<table16>`_offering ON `<table16>`.`<table16>`_id = `<table16>`_offering.`<table16>`_id INNER JOIN semester ON semester.semester_id = `<table16>`_offering.semester INNER JOIN program_`<table16>` ... | What courses meet the Core requirement in Spring or Summer ?
|
<table0>[table_28884858_2] { <col0>[team]:[VARCHAR] <col1>[capacity_percentage]:[VARCHAR] } | SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "99.3%" | How many teams had a 99.3% capacity rating? |
<table0>[intakeoutput] { <col0>[intakeoutputid]:[number] <col1>[patientunitstayid]:[number] <col2>[cellpath]:[text] <col3>[celllabel]:[text] <col4>[cellvaluenumeric]:[number] <col5>[intakeoutputtime]:[time] } <table1>[diagnosis] { <col0>[diagnosisid]:[number] <col1>[patientunitstayid]:[number] <col2>[diagnosisname]:[t... | SELECT MIN( `<table0>`.cellvaluenumeric ) FROM `<table0>` WHERE `<table0>`.`<table8>`unitstayid IN ( SELECT `<table8>`.`<table8>`unitstayid FROM `<table8>` WHERE `<table8>`.`<table8>`healthsystemstayid IN ( SELECT `<table8>`.`<table8>`healthsystemstayid FROM `<table8>` WHERE `<table8>`.uniquepid = '027-22704' ) ) AND `... | what is the monthly minimum amount of urinary catheter output: indwelling/continuous ure in patient 027-22704 since 146 months ago? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.