schema stringlengths 20 14.6k | query stringlengths 17 2.58k | question stringlengths 8 1.06k |
|---|---|---|
<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 DISTINCT `<table14>`.`<table14>` FROM `<table14>` WHERE `<table14>`.event_type = '`<table10>`' AND `<table14>`.event_id IN ( SELECT `<table10>`.row_id FROM `<table10>` WHERE `<table10>`.itemid IN ( SELECT `<table5>`.itemid FROM `<table5>` WHERE `<table5>`.label = 'wbc, csf' ) ) | how much is the cost of wbc, csf lab tests?
|
<table0>[cities] { <col0>[INT]:[name] <col1>[VARCHAR]:[255] <col2>[state]:[VARCHAR] <col3>[255]:[INSERT] } <table1>[waste_generation] { <col0>[city_id]:[INT] <col1>[INT]:[INSERT] } | SELECT c.name, SUM( w.amount ) as total_waste FROM `<table0>` c JOIN waste_generation w ON c.id = w.city_id WHERE c.state = 'California' GROUP BY c.name; | What is the total waste generation by each city in the state of California? |
<table0>[compartment_class] { <col0>[compartment]:[varchar] <col1>[class_type]:[varchar] } <table1>[time_interval] { <col0>[period]:[text] <col1>[begin_time]:[int] <col2>[end_time]:[int] } <table2>[class_of_service] { <col0>[booking_class]:[varchar] <col1>[rank]:[int] <col2>[class_description]:[text] } <table3>[time... | SELECT DISTINCT flight.flight_id FROM `<table7>` AS AIRPORT_SERVICE_0, `<table7>` 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 = 21 AND date_day.month_number = 2 AND date_day.y... | DALLAS to OAKLAND monday |
<table0>[procedures] { <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 INNER JOIN lab ON `<table2>`.hadm_id = lab.hadm_id WHERE prescriptions.drug_type = "MAIN" AND lab.label = "Calculated Bicarbonate, Whole Blood" | give me the number of patients on main type of drug prescription who had whole blood calculated bicarbonate lab test done. |
<table0>[campus_job_id] { <col0>[int]:[student_id] <col1>[int]:[location] } <table1>[gsi] { <col0>[course_offering_id]:[int] <col1>[student_id]:[int] } <table2>[student] { <col0>[student_id]:[int] <col1>[lastname]:[varchar] <col2>[firstname]:[varchar] <col3>[program_id]:[int] <col4>[declare_major]:[varchar] <col5>[to... | SELECT DISTINCT course.department, course.name, course.number FROM course, program_course WHERE course.department LIKE '%EECS%' AND program_course.category LIKE '%Other%' AND program_course.course_id = course.course_id | Name Other courses for EECS .
|
<table0>[Dish] { <col0>[integer]:[name] <col1>[text]:[description] <col2>[text]:[menus_appeared] <col3>[integer]:[times_appeared] <col4>[integer]:[first_appeared] <col5>[integer]:[last_appeared] <col6>[integer]:[lowest_price] <col7>[real]:[highest_price] } <table1>[Menu] { <col0>[integer]:[name] <col1>[text]:[sponsor]... | SELECT COUNT( * ) FROM `<table0>` WHERE first_appeared < 1851 OR first_appeared > 2012 | How many dishes do not have correct data for the year in which it appeared first? |
<table0>[table_59273] { <col0>[Position]:[real] <col1>[Club]:[text] <col2>[Games]:[played] <col3>[real]:[Wins] <col4>[real]:[Draws] <col5>[real]:[Loses] <col6>[real]:[Goals] <col7>[scored]:[real] <col8>[Goals]:[conceded] <col9>[real]:[Points] } | SELECT MIN( "Wins" ) FROM `<table0>` WHERE "Points" < '25' AND "Goals scored" = '22' AND "Club" = 'minija kretinga' AND "Goals conceded" < '39' | For the club Minija Kretinga, what's the lowest number of wins with points smaller than 25, goals at 22 and goals conceded below 39?
|
<table0>[table_204_269] { <col0>[number]:[week] <col1>[number]:[room] <col2>[text]:[winning] <col3>[couple]:[text] <col4>[2nd]:[couple] <col5>[text]:[3rd] <col6>[couple]:[text] <col7>[chumps]:[text] } | SELECT "room" FROM `<table0>` WHERE "week" < 5 ORDER BY "week" DESC LIMIT 1 | what room was previous to week 5 ? |
<table0>[table_48438] { <col0>[Game]:[real] <col1>[Date]:[text] <col2>[Team]:[text] <col3>[Score]:[text] <col4>[High]:[points] <col5>[text]:[High] <col6>[rebounds]:[text] <col7>[High]:[assists] <col8>[text]:[Location] <col9>[Attendance]:[text] <col10>[Record]:[text] } | SELECT "High rebounds" FROM `<table0>` WHERE "Game" > '33' AND "Score" = 'w 132-101' | What is High Rebounds, when Game is greater than 33, and when Score is 'W 132-101'? |
<table0>[table_name_25] { <col0>[county]:[VARCHAR] <col1>[ihsaa_football_class]:[VARCHAR] <col2>[mascot]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "aaaaa" AND `<col2>` = "grizzly cubs" | What county has a football team in IHSAA class AAAAA and a school macot of the Grizzly Cubs?
|
<table0>[whale_sightings] { <col0>[sighting_date]:[DATE] <col1>[ocean]:[TEXT] } | SELECT COUNT( * ) FROM whale_sightings; | How many whale sightings are there in total? |
<table0>[procedures] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table1>[demographic] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[name]:[text] <col3>[marital_status]:[text] <col4>[age]:[text] <col5>[dob]:[text] <col6>... | SELECT COUNT( DISTINCT `<table1>`.subject_id ) FROM `<table1>` INNER JOIN lab ON `<table1>`.hadm_id = lab.hadm_id WHERE `<table1>`.gender = "F" AND lab.label = "24 hr Creatinine" | find the number of female patients who had 24 hour creatinine lab test. |
<table0>[table_name_22] { <col0>[district_attorney]:[VARCHAR] <col1>[position]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "bureau chief ada" | Tell me the DA for bureau chief ada |
<table0>[table_12141496_1] { <col0>[apogee__km]:[INTEGER] <col1>[name]:[VARCHAR] } | SELECT MAX( apogee__km_ ) FROM `<table0>` WHERE `<col1>` = "SAMOS F3-3" | What is the maximum apogee for samos f3-3? |
<table0>[microlab] { <col0>[microlabid]:[number] <col1>[patientunitstayid]:[number] <col2>[culturesite]:[text] <col3>[organism]:[text] <col4>[culturetakentime]:[time] } <table1>[intakeoutput] { <col0>[intakeoutputid]:[number] <col1>[patientunitstayid]:[number] <col2>[cellpath]:[text] <col3>[celllabel]:[text] <col4>[ce... | SELECT `<table6>`.`<table6>`resulttime FROM `<table6>` WHERE `<table6>`.`<table4>`unitstayid IN ( SELECT `<table4>`.`<table4>`unitstayid FROM `<table4>` WHERE `<table4>`.`<table4>`healthsystemstayid IN ( SELECT `<table4>`.`<table4>`healthsystemstayid FROM `<table4>` WHERE `<table4>`.uniquepid = '030-10407' ) ) AND `<ta... | when was the first time that , patient 030-10407 had the maximum of rdw?
|
<table0>[prescriptions] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[startdate]:[time] <col4>[enddate]:[time] <col5>[drug]:[text] <col6>[dose_val_rx]:[text] <col7>[dose_unit_rx]:[text] <col8>[route]:[text] } <table1>[procedures_icd] { <col0>[row_id]:[number] <col1>[subject_id]:... | SELECT COUNT( DISTINCT t2.subject_id ) FROM ( SELECT t1.subject_id, t1.charttime, t1.hadm_id FROM ( SELECT `<table3>`.subject_id, `<table6>`.charttime, `<table3>`.hadm_id FROM `<table6>` JOIN `<table3>` ON `<table6>`.hadm_id = `<table3>`.hadm_id WHERE `<table6>`.icd9_code = ( SELECT `<table14>`.icd9_code FROM `<table14... | count the number of patients who are dead after having been diagnosed with cortical blindness within the same hospital visit. |
<table0>[table_23157] { <col0>[Institution]:[text] <col1>[Nickname]:[text] <col2>[Location]:[text] <col3>[Founded]:[real] <col4>[Type]:[text] <col5>[Enrollment]:[real] <col6>[Joined]:[real] <col7>[Left]:[real] <col8>[Current]:[Conference] } | SELECT MAX( "Founded" ) FROM `<table0>` WHERE "Nickname" = 'Rams' | When was the school whose students are nicknamed Rams founded?
|
<table0>[table_1831262_2] { <col0>[lariciresinol]:[INTEGER] <col1>[matairesinol]:[VARCHAR] } | SELECT MIN( `<col0>` ) FROM `<table0>` WHERE `<col1>` = 440 | what is the minimum number is lariciresinol where matairesinol number is 440? |
<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 `<table3>`.subject_id ) FROM `<table3>` WHERE `<table3>`.diagnosis = "PITUITARY BLEED" AND `<table3>`.dob_year < "2101" | how many patients born before 2101 have primary disease as pituitary bleed?
|
<table0>[table_name_93] { <col0>[wins]:[VARCHAR] <col1>[played]:[VARCHAR] <col2>[draws]:[VARCHAR] <col3>[goals_against]:[VARCHAR] } | SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col2>` < 5 AND `<col3>` > 49 AND `<col1>` > 30 | What is the total number of Wins, when Draws is less than 5, when Goals is greater than 49, and when Played is greater than 30? |
<table0>[table_name_43] { <col0>[tie_no]:[VARCHAR] <col1>[home_team]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "gillingham" | What is listed as the Tie no for Home team of Gillingham?
|
<table0>[airport_service] { <col0>[city_code]:[varchar] <col1>[airport_code]:[varchar] <col2>[miles_distant]:[int] <col3>[direction]:[varchar] <col4>[minutes_distant]:[int] } <table1>[code_description] { <col0>[code]:[varchar] <col1>[description]:[text] } <table2>[airline] { <col0>[airline_code]:[varchar] <col1>[airl... | SELECT DISTINCT flight.flight_id FROM `<table0>` AS AIRPORT_SERVICE_0, `<table0>` AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE ( flight.to_airport = AIRPORT_SERVICE_0.airport_code AND CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'ATLANTA' ) OR ( flight.from_airport = AIRPO... | what are all of the flights into and out of ATLANTA 's airport
|
<table0>[table_14748457_1] { <col0>[station__and_code]:[VARCHAR] <col1>[station_users_2008_9]:[VARCHAR] } | SELECT station__and_code_ FROM `<table0>` WHERE `<col1>` = "130368" | whatis hte station code where users are 130368? |
<table0>[threat_intelligence] { <col0>[INT]:[source] <col1>[TEXT]:[type] <col2>[TEXT]:[date_added] <col3>[DATE]:[INSERT] } | SELECT type, COUNT( * ) as count FROM `<table0>` WHERE date_added >= DATE_SUB( CURRENT_DATE, INTERVAL 6 MONTH ) GROUP BY type; | What is the distribution of threat intelligence sources by type for the last 6 months? |
<table0>[coaches] { <col0>[coach_id]:[INT] <col1>[coach_name]:[VARCHAR] <col2>[gender]:[VARCHAR] <col3>[team_id]:[INT] } <table1>[matches] { <col0>[match_id]:[INT] <col1>[winner_coach_id]:[INT] } | SELECT COUNT( * ) FROM `<table1>` JOIN coaches ON `<table1>`.winner_coach_id = coaches.coach_id WHERE gender = 'Female'; | How many FIFA World Cup matches were won by teams that had a female head coach? |
<table0>[d_icd_procedures] { <col0>[row_id]:[number] <col1>[icd9_code]:[text] <col2>[short_title]:[text] <col3>[long_title]:[text] } <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_val... | SELECT COUNT( * ) > 0 FROM `<table15>` WHERE `<table15>`.icustay_id IN ( SELECT `<table11>`.icustay_id FROM `<table11>` WHERE `<table11>`.hadm_id IN ( SELECT `<table3>`.hadm_id FROM `<table3>` WHERE `<table3>`.subject_id = 5828 ) ) AND `<table15>`.itemid IN ( SELECT `<table5>`.itemid FROM `<table5>` WHERE `<table5>`.la... | is patient 5828 had normal arterial bp [systolic] in yesterday? |
<table0>[ArcticResearchLab] { <col0>[INT]:[year] <col1>[INT]:[month] <col2>[INT]:[temperature] <col3>[FLOAT]:[INSERT] } | SELECT month, MIN( temperature ) FROM `<table0>` GROUP BY year, month; | What is the minimum temperature per month in the Arctic Research Lab? |
<table0>[table_name_6] { <col0>[term_end]:[VARCHAR] <col1>[party]:[VARCHAR] <col2>[term_start]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "kadima" AND `<col2>` = "18 january 2006" | What is the end of the term for Kadima that started on 18 January 2006? |
<table0>[diagnosis] { <col0>[diagnosisid]:[number] <col1>[patientunitstayid]:[number] <col2>[diagnosisname]:[text] <col3>[diagnosistime]:[time] <col4>[icd9code]:[text] } <table1>[lab] { <col0>[labid]:[number] <col1>[patientunitstayid]:[number] <col2>[labname]:[text] <col3>[labresult]:[number] <col4>[labresulttime]:[ti... | SELECT `<table5>`.hospitaladmittime FROM `<table5>` WHERE `<table5>`.uniquepid = '028-56914' ORDER BY `<table5>`.hospitaladmittime LIMIT 1 | when did patient 028-56914 go to the hospital for the first time?
|
<table0>[table_23248869_8] { <col0>[score]:[VARCHAR] <col1>[record]:[VARCHAR] } | SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "19–34" | How many times was the record 19 34 |
<table0>[table_203_173] { <col0>[number]:[year] <col1>[text]:[serial] <col2>[name]:[text] <col3>[role]:[text] <col4>[star]:[text] <col5>[note]:[text] <col6>[channel]:[text] } | SELECT "serial name" FROM `<table0>` WHERE "channel" = 'star one' | what was the only show that ran on the channel star one ?
|
<table0>[d_icd_procedures] { <col0>[row_id]:[number] <col1>[icd9_code]:[text] <col2>[short_title]:[text] <col3>[long_title]:[text] } <table1>[d_icd_diagnoses] { <col0>[row_id]:[number] <col1>[icd9_code]:[text] <col2>[short_title]:[text] <col3>[long_title]:[text] } <table2>[icustays] { <col0>[row_id]:[number] <col1>[s... | SELECT `<table1>`.short_title FROM `<table1>` WHERE `<table1>`.icd9_code IN ( SELECT t4.icd9_code FROM ( SELECT t3.icd9_code, DENSE_RANK( ) OVER ( ORDER BY t3.c1 DESC ) AS c2 FROM ( SELECT t2.icd9_code, 100 - SUM( CASE WHEN patients.dod IS NULL THEN 1 WHEN STRFTIME( '%j', patients.dod ) - STRFTIME( '%j', t2.charttime )... | what is the five diagnoses which have the lowest four year survival rate? |
<table0>[t_kc21] { <col0>[CLINIC_ID]:[text] <col1>[CLINIC_TYPE]:[text] <col2>[COMP_ID]:[text] <col3>[DATA_ID]:[text] <col4>[DIFF_PLACE_FLG]:[number] <col5>[FERTILITY_STS]:[number] <col6>[FLX_MED_ORG_ID]:[text] <col7>[HOSP_LEV]:[number] <col8>[HOSP_STS]:[number] <col9>[IDENTITY_CARD]:[text] <col10>[INPT_AREA_BED]:[text]... | SELECT `<table3>`.SOC_SRT_DIRE_CD, `<table3>`.SOC_SRT_DIRE_NM, `<table3>`.AMOUNT FROM `<table3>` JOIN t_kc21_`<table3>` JOIN t_kc21 ON t_kc21_`<table3>`.MED_EXP_DET_ID = `<table3>`.MED_EXP_DET_ID AND t_kc21_`<table3>`.MED_CLINIC_ID = t_kc21.MED_CLINIC_ID WHERE t_kc21.MED_CLINIC_ID = '19033476084' AND NOT `<table3>`.SOC... | 在编号19033476084的患者就诊时中购买了多少钱名里不包含奈德这些字的药品?
|
<table0>[table_15027] { <col0>[Year]:[real] <col1>[Men]:[singles] <col2>[text]:[Women] <col3>[singles]:[text] <col4>[Men]:[doubles] <col5>[text]:[Women] <col6>[doubles]:[text] <col7>[Mixed]:[doubles] } | SELECT "Year" FROM `<table0>` WHERE "Men's doubles" = 'anton kriel chris cotillard' | Name the year for anton kriel chris cotillard |
<table0>[table_41071] { <col0>[Player]:[text] <col1>[Matches]:[real] <col2>[Innings]:[real] <col3>[real]:[Runs] <col4>[real]:[High] <col5>[Score]:[text] <col6>[Average]:[text] <col7>[Strike]:[Rate] <col8>[text]:[100s] } | SELECT AVG( "Matches" ) FROM `<table0>` WHERE "Strike Rate" = '87.37' AND "100s" < '0' | What is the mean number of matches when the strike rate is 87.37 and the 100s is less than 0? |
<table0>[patients] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[gender]:[text] <col3>[dob]:[time] <col4>[dod]:[time] } <table1>[inputevents_cv] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[charttime]:[time] <col5>[itemid]:[number] } ... | SELECT SUM( CASE WHEN patients.dod IS NULL THEN 1 WHEN STRFTIME( '%j', patients.dod ) - STRFTIME( '%j', t2.charttime ) > 3 * 365 THEN 1 ELSE 0 END ) * 100 / COUNT( * ) FROM ( SELECT t1.subject_id, t1.charttime FROM ( SELECT admissions.subject_id, `<table2>`.charttime FROM `<table2>` JOIN admissions ON `<table2>`.hadm_i... | what is the three year survival probability for the patients diagnosed with opioid dependence-contin?
|
<table0>[comment_instructor] { <col0>[instructor_id]:[int] <col1>[student_id]:[int] <col2>[score]:[int] <col3>[comment_text]:[varchar] } <table1>[student_record] { <col0>[student_id]:[int] <col1>[course_id]:[int] <col2>[semester]:[int] <col3>[grade]:[varchar] <col4>[varchar]:[transfer_source] <col5>[varchar]:[earn_cre... | SELECT DISTINCT `<table11>`.department, `<table11>`.name, `<table11>`.number FROM `<table11>` INNER JOIN program_`<table11>` ON program_`<table11>`.`<table11>`_id = `<table11>`.`<table11>`_id WHERE `<table11>`.credits = 8 AND program_`<table11>`.category LIKE 'ULCS' | What are some classes that are upper-level offering 8 credits . |
<table0>[market] { <col0>[Market_ID]:[int] <col1>[District]:[text] <col2>[Num_of_employees]:[int] <col3>[Num_of_shops]:[real] <col4>[Ranking]:[int] } <table1>[phone] { <col0>[text]:[Phone_ID] <col1>[int]:[Memory_in_G] <col2>[int]:[Carrier] <col3>[text]:[Price] } <table2>[phone_market] { <col0>[Market_ID]:[int] <col1>... | SELECT District, COUNT( District ) FROM `<table2>` AS T1 JOIN market AS T2 ON T1.Market_ID = T2.Market_ID JOIN phone AS T3 ON T1.Phone_ID = T3.Phone_ID GROUP BY District ORDER BY District | I want to know the number of districts of markets they are on, and order by the x-axis in ascending. |
<table0>[table_name_1] { <col0>[comp]:[VARCHAR] <col1>[date]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "1998-04-22" | What's the comp for 1998-04-22? |
<table0>[diagnoses] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table1>[procedures] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table2>[prescr... | SELECT COUNT( DISTINCT `<table4>`.subject_id ) FROM `<table4>` INNER JOIN lab ON `<table4>`.hadm_id = lab.hadm_id WHERE `<table4>`.days_stay > "16" AND lab.label = "Sedimentation Rate" | What is the number of patients who had more than 16 days of hospital stay and had a sedimentation rate lab test done?
|
<table0>[table_2857352_3] { <col0>[network]:[VARCHAR] <col1>[virtual_channel]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "23.1" | What network airs on virtual channel 23.1?
|
<table0>[job_history] { <col0>[EMPLOYEE_ID]:[decimal] <col1>[START_DATE]:[date] <col2>[END_DATE]:[date] <col3>[JOB_ID]:[varchar] <col4>[DEPARTMENT_ID]:[decimal] } <table1>[regions] { <col0>[REGION_ID]:[decimal] <col1>[REGION_NAME]:[varchar] } <table2>[countries] { <col0>[COUNTRY_ID]:[varchar] <col1>[COUNTRY_NAME]:[va... | SELECT JOB_ID, AVG( `<col10>` ) FROM `<table4>` WHERE NOT `<col0>` IN ( SELECT `<col0>` FROM `<table0>` ) GROUP BY `<col6>` | For those employees who did not have any job in the past, return a bar chart about the distribution of job_id and the average of department_id , and group by attribute job_id.
|
<table0>[diagnosis] { <col0>[diagnosisid]:[number] <col1>[patientunitstayid]:[number] <col2>[diagnosisname]:[text] <col3>[diagnosistime]:[time] <col4>[icd9code]:[text] } <table1>[medication] { <col0>[medicationid]:[number] <col1>[patientunitstayid]:[number] <col2>[drugname]:[text] <col3>[dosage]:[text] <col4>[routeadm... | SELECT ( SELECT `<table8>`.sao2 FROM `<table8>` WHERE `<table8>`.`<table2>`unitstayid IN ( SELECT `<table2>`.`<table2>`unitstayid FROM `<table2>` WHERE `<table2>`.`<table2>`healthsystemstayid IN ( SELECT `<table2>`.`<table2>`healthsystemstayid FROM `<table2>` WHERE `<table2>`.uniquepid = '006-157753' ) AND `<table2>`.u... | is patient 006-157753's sao2 second measured on the current icu visit less than it was first measured on the current icu visit? |
<table0>[table_204_554] { <col0>[number]:[rank] <col1>[number]:[name] <col2>[text]:[nation] <col3>[text]:[time] <col4>[text]:[speed] <col5>[number]:[note] } | SELECT "nation" FROM `<table0>` ORDER BY "rank" DESC LIMIT 1 | which country rank last ?
|
<table0>[table_name_11] { <col0>[year]:[INTEGER] <col1>[date]:[VARCHAR] } | SELECT MIN( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "14 february" | Which Year has a Date of 14 February? |
<table0>[table_26427332_17] { <col0>[federal_state]:[VARCHAR] <col1>[city]:[VARCHAR] } | SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "Lahnstein" | for how many federal states is the city of lahnstein listed in the ranking? |
<table0>[intakeoutput] { <col0>[intakeoutputid]:[number] <col1>[patientunitstayid]:[number] <col2>[cellpath]:[text] <col3>[celllabel]:[text] <col4>[cellvaluenumeric]:[number] <col5>[intakeoutputtime]:[time] } <table1>[microlab] { <col0>[microlabid]:[number] <col1>[patientunitstayid]:[number] <col2>[culturesite]:[text]... | SELECT `<table8>`.drugstarttime FROM `<table8>` WHERE `<table8>`.`<table5>`unitstayid IN ( SELECT `<table5>`.`<table5>`unitstayid FROM `<table5>` WHERE `<table5>`.`<table5>`healthsystemstayid IN ( SELECT `<table5>`.`<table5>`healthsystemstayid FROM `<table5>` WHERE `<table5>`.uniquepid = '028-43966' ) ) AND `<table8>`.... | when was the last time patient 028-43966 had vancomycin 1,000 mg iv solution : 1 each vial prescribed in 02/this year?
|
<table0>[table_27840] { <col0>[Settlement]:[text] <col1>[Cyrillic]:[Names] <col2>[text]:[Type] <col3>[text]:[Population] <col4>[2011]:[real] <col5>[Largest]:[ethnic] <col6>[group]:[2002] <col7>[text]:[Dominant] <col8>[religion]:[2002] } | SELECT COUNT( "Population ( `<col4>` )" ) FROM `<table0>` WHERE "Settlement" = 'Mladenovo' | How many populations are listed for mladenovo? |
<table0>[marine_protected_areas] { <col0>[INT]:[name] <col1>[VARCHAR]:[255] <col2>[region]:[VARCHAR] } <table1>[protected_species] { <col0>[INT]:[area_id] <col1>[INT]:[species_name] <col2>[VARCHAR]:[255] <col3>[INSERT]:[marine_protected_areas] <col4>[name]:[region] <col5>[VALUES]:[Bahamas] <col6>[National]:[Trust] <co... | SELECT `<table0>`.name, COUNT( DISTINCT protected_species.species_name ) FROM `<table0>` INNER JOIN protected_species ON `<table0>`.id = protected_species.area_id WHERE `<table0>`.region = 'Caribbean' GROUP BY `<table0>`.name; | List all marine protected areas in the Caribbean and the number of species they protect. |
<table0>[table_name_77] { <col0>[category_3]:[VARCHAR] <col1>[category_1]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = 0.05 | If category 1 is 0.05, what is category 3? |
<table0>[festival_detail] { <col0>[Festival_ID]:[int] <col1>[Festival_Name]:[text] <col2>[Chair_Name]:[text] <col3>[Location]:[text] <col4>[Year]:[int] <col5>[Num_of_Audience]:[int] } <table1>[nomination] { <col0>[Artwork_ID]:[int] <col1>[Festival_ID]:[int] <col2>[Result]:[text] } <table2>[artwork] { <col0>[Artwork_I... | SELECT Type, COUNT( * ) FROM `<table2>` GROUP BY `<col1>` ORDER BY COUNT( * ) DESC | Show the total number from each type, and I want to sort in descending by the y-axis.
|
<table0>[flight_leg] { <col0>[flight_id]:[int] <col1>[leg_number]:[int] <col2>[leg_flight]:[int] } <table1>[date_day] { <col0>[month_number]:[int] <col1>[day_number]:[int] <col2>[year]:[int] <col3>[day_name]:[varchar] } <table2>[airport_service] { <col0>[city_code]:[varchar] <col1>[airport_code]:[varchar] <col2>[mile... | SELECT DISTINCT flight.flight_id FROM `<table2>` AS AIRPORT_SERVICE_0, `<table2>` 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 = 'LOS ANGELES' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'PITTSBURGH' ... | flights from LOS ANGELES to PITTSBURGH
|
<table0>[Buildings] { <col0>[INT]:[name] <col1>[TEXT]:[year_built] <col2>[INT]:[co2_emission] <col3>[FLOAT]:[INSERT] } | UPDATE Buildings SET name = 'WindHaven2022', co2_emission = 75.0 WHERE id = 4; | Update the name of the building with ID 4 to 'WindHaven2022' and CO2 emission to 75.0. |
<table0>[disaster_response] { <col0>[country]:[VARCHAR] <col1>[255]:[num_interventions] <col2>[INT]:[year] } | SELECT country, num_interventions FROM `<table0>` WHERE year = 2015 ORDER BY num_interventions DESC LIMIT 5; | List the top 5 countries with the highest number of disaster response interventions in 2015. |
<table0>[FlagTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table1>[CloseAsOffTopicReasonTypes] { <col0>[number]:[IsUniversal] <col1>[boolean]:[InputTitle] <col2>[text]:[MarkdownInputGuidance] <col3>[text]:[MarkdownPostOwnerGuidance] <col4>[text]:[MarkdownPrivilegedUserGuidance] <col5>[text]:[MarkdownCon... | SELECT u.DisplayName FROM ( SELECT b.UserId FROM `<table25>` AS b WHERE b.Name = 'java' AND b.Class = 1 AND b.TagBased = 1 ) AS jb INNER JOIN ( SELECT b.UserId FROM `<table25>` AS b WHERE b.Name = 'kotlin' AND b.Class = 1 AND b.TagBased = 1 ) AS kb ON kb.UserId = jb.UserId INNER JOIN Users AS u ON u.Id = kb.UserId ORDE... | User with both the Gold Java and Gold Kotlin tag badges.
|
<table0>[elimination] { <col0>[elimination_id]:[text] <col1>[wrestler_id]:[text] <col2>[team]:[text] <col3>[eliminated_by]:[text] <col4>[elimination_move]:[text] <col5>[time]:[text] } <table1>[wrestler] { <col0>[wrestler_id]:[number] <col1>[name]:[text] <col2>[reign]:[text] <col3>[days_held]:[text] <col4>[location]:[t... | SELECT `<col1>` FROM `<table1>` ORDER BY `<col3>` DESC | What are the names of the wrestlers, ordered descending by days held? |
<table0>[table_2668169_2] { <col0>[candidates]:[VARCHAR] <col1>[district]:[VARCHAR] } | SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "Pennsylvania 11" | How many people won the election in the Pennsylvania 11 district? |
<table0>[table_name_96] { <col0>[crowd]:[VARCHAR] <col1>[away_team]:[VARCHAR] } | SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "fitzroy" | What is the crowd size of the game when Fitzroy is the away team?
|
<table0>[table_name_22] { <col0>[population_1961]:[INTEGER] <col1>[administrative_county]:[VARCHAR] <col2>[population_1891]:[VARCHAR] } | SELECT SUM( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "west sussex" AND `<col2>` < 120 OFFSET 952 | What is the Population 1961 of West Sussex with a Population of 120,952 or less?
|
<table0>[SustainableFashion] { <col0>[ProductID]:[INT] <col1>[SustainableScore]:[INT] <col2>[ManufacturingDate]:[DATE] } | SELECT AVG( `<col1>` ) FROM `<table0>` WHERE `<col2>` BETWEEN '2021-01-01' AND '2021-01-31'; | What is the average sustainable score for products manufactured in 'Europe' in the month of 'January'? |
<table0>[Tags] { <col0>[number]:[TagName] <col1>[text]:[Count] <col2>[number]:[ExcerptPostId] <col3>[number]:[WikiPostId] } <table1>[PostTags] { <col0>[PostId]:[number] <col1>[TagId]:[number] } <table2>[Votes] { <col0>[number]:[PostId] <col1>[number]:[VoteTypeId] <col2>[number]:[UserId] <col3>[number]:[CreationDate] ... | SELECT t1.TagName AS Tag, t2.TagName AS "Related Tag", COUNT( t2.TagName ) AS "Count" FROM `<table1>` AS pt1 INNER JOIN Tags AS t1 ON pt1.TagId = t1.Id INNER JOIN `<table1>` AS pt2 ON pt1.PostId = pt2.PostId AND pt1.TagId != pt2.TagId INNER JOIN Tags AS t2 ON pt2.TagId = t2.Id INNER JOIN Posts AS A ON pt2.PostId = A.Id... | Top 50 All Time Related Tags of Single Tag. |
<table0>[addresses] { <col0>[address_id]:[number] <col1>[line_1]:[text] <col2>[line_2]:[text] <col3>[city]:[text] <col4>[zip_postcode]:[text] <col5>[state_province_county]:[text] <col6>[country]:[text] } <table1>[people_addresses] { <col0>[person_address_id]:[number] <col1>[person_id]:[number] <col2>[address_id]:[numb... | SELECT T2.student_details FROM `<table4>` AS T1 JOIN students AS T2 ON T1.student_id = T2.student_id ORDER BY T1.registration_date DESC LIMIT 1 | What is detail of the student who most recently registered course?
|
<table0>[Budget] { <col0>[Year]:[INT] <col1>[Country]:[VARCHAR] <col2>[255]:[SpendingAmount] } | SELECT Country, Year, AVG( SpendingAmount ) as AvgSpending FROM `<table0>` WHERE `<col0>` BETWEEN EXTRACT( YEAR FROM CURRENT_DATE )-5 AND EXTRACT( YEAR FROM CURRENT_DATE ) GROUP BY Country, Year; | What are the average defense spending amounts for each country in the past 5 years, and the corresponding year? |
<table0>[FairTradeFactories] { <col0>[factory_id]:[INT] <col1>[country]:[VARCHAR] <col2>[255]:[CREATE] <col3>[VIEW]:[FairTradeFactoryCountries] <col4>[SELECT]:[country] <col5>[COUNT]:[count] } | SELECT country, count FROM FairTradeFactoryCountries ORDER BY count DESC LIMIT 5; | Find the top 5 countries with the highest number of fair trade certified factories. |
<table0>[patient] { <col0>[uniquepid]:[text] <col1>[patienthealthsystemstayid]:[number] <col2>[patientunitstayid]:[number] <col3>[gender]:[text] <col4>[age]:[text] <col5>[ethnicity]:[text] <col6>[hospitalid]:[number] <col7>[wardid]:[number] <col8>[admissionheight]:[number] <col9>[admissionweight]:[number] <col10>[disch... | SELECT COUNT( * ) FROM `<table4>` WHERE `<table4>`.`<table0>`unitstayid IN ( SELECT `<table0>`.`<table0>`unitstayid FROM `<table0>` WHERE `<table0>`.`<table0>`healthsystemstayid IN ( SELECT `<table0>`.`<table0>`healthsystemstayid FROM `<table0>` WHERE `<table0>`.uniquepid = '012-18025' ) ) AND STRFTIME( '%y', `<table4>... | what was the number of drugs patient 012-18025 was prescribed since 2101?
|
<table0>[table_name_34] { <col0>[pick]:[VARCHAR] <col1>[position]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "defensive end" | Which pick number resulted in a defensive end? |
<table0>[d_labitems] { <col0>[row_id]:[number] <col1>[itemid]:[number] <col2>[label]:[text] } <table1>[procedures_icd] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icd9_code]:[text] <col4>[charttime]:[time] } <table2>[admissions] { <col0>[row_id]:[number] <col1>[subject_id]:[n... | SELECT `<table12>`.long_title FROM `<table12>` WHERE `<table12>`.short_title = 'tox ef hydrocarb gas nec' UNION SELECT `<table13>`.long_title FROM `<table13>` WHERE `<table13>`.short_title = 'tox ef hydrocarb gas nec' | whats the unabbreviated version of tox ef hydrocarb gas nec. |
<table0>[table_204_438] { <col0>[number]:[year] <col1>[number]:[title] <col2>[text]:[album] <col3>[text]:[number] <col4>[pop]:[number] <col5>[dance]:[number] } | SELECT ABS( ( SELECT "us r&b" FROM `<table0>` WHERE "title" = '"come go with me"' ) - ( SELECT "us r&b" FROM `<table0>` WHERE "title" = '"dance 4 me"' ) ) | what was the difference in r & b ranking between come go with me and dance 4 me . ?
|
<table0>[swimmer] { <col0>[int]:[name] <col1>[text]:[Nationality] <col2>[text]:[meter_100] <col3>[real]:[meter_200] <col4>[text]:[meter_300] <col5>[text]:[meter_400] <col6>[text]:[meter_500] <col7>[text]:[meter_600] <col8>[text]:[meter_700] <col9>[text]:[Time] } <table1>[event] { <col0>[int]:[text] <col1>[Stadium_ID]:... | SELECT meter_200, SUM( meter_100 ) FROM `<table0>` GROUP BY meter_200 ORDER BY SUM( meter_100 ) | Show me about the distribution of meter_200 and the sum of meter_100 , and group by attribute meter_200 in a bar chart, show Y-axis in asc order please. |
<table0>[volunteers] { <col0>[INT]:[name] <col1>[TEXT]:[events] <col2>[TEXT]:[INSERT] } | SELECT COUNT( DISTINCT id ) FROM `<table0>` WHERE events LIKE '%Europe%'; | How many volunteers have registered for events in Europe? |
<table0>[paperkeyphrase] { <col0>[paperid]:[int] <col1>[keyphraseid]:[int] } <table1>[paperfield] { <col0>[fieldid]:[int] <col1>[paperid]:[int] } <table2>[venue] { <col0>[venueid]:[int] <col1>[venuename]:[varchar] } <table3>[journal] { <col0>[journalid]:[int] <col1>[journalname]:[varchar] } <table4>[cite] { <col0>[... | SELECT DISTINCT COUNT( DISTINCT writes.paperid ) FROM author, writes WHERE author.authorname = 'luke zettlemoyer' AND writes.authorid = author.authorid | How many papers has luke zettlemoyer published ?
|
<table0>[table_203_745] { <col0>[number]:[year] <col1>[text]:[title] <col2>[text]:[catalog] } | SELECT "title" FROM `<table0>` ORDER BY "year" LIMIT 1 | what was the first single to be released ? |
<table0>[table_name_99] { <col0>[injunctive]:[VARCHAR] <col1>[simple_past]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "गरुँला garũlā 'i will ( probably ) do'" | What is the injunctive for the Simple Past of गरुँला garũlā 'I will (probably) do'? |
<table0>[bool] { <col0>[name]:[text] } <table1>[person] { <col0>[name]:[text] } <table2>[disabled] { <col0>[name]:[text] } <table3>[enlist] { <col0>[name]:[text] <col1>[organ]:[text] } <table4>[filed_for_bankrupcy] { <col0>[name]:[text] } <table5>[longest_absense_from_school] { <col0>[name]:[text] <col1>[month]:[i... | SELECT COUNT( T1.name ) FROM `<table7>` AS T1 INNER JOIN male AS T2 ON T2.name = T1.name WHERE T1.bool = 'pos' | State the number of male students who do not have payment due. |
<table0>[shariah_compliant_loans] { <col0>[INT]:[client_id] } <table1>[clients] { <col0>[INT]:[name] <col1>[TEXT]:[location] } | SELECT SUM( 1 ) FROM `<table0>` s INNER JOIN clients c ON s.client_id = c.id WHERE c.location LIKE '%rural%'; | What is the total amount of Shariah-compliant loans issued to clients in rural areas? |
<table0>[marine_protected_areas] { <col0>[name]:[VARCHAR] <col1>[255]:[depth] <col2>[FLOAT]:[location] <col3>[VARCHAR]:[255] } | INSERT INTO marine_protected_areas ( name, depth, location ) VALUES ( 'Coral Sea', 1000.0, 'Pacific Ocean' ); | Insert a new record into the marine_protected_areas table with the name 'Coral Sea', depth 1000.0, and location 'Pacific Ocean' |
<table0>[t_kc21] { <col0>[MED_CLINIC_ID]:[text] <col1>[OVERALL_CD_ORG]:[text] <col2>[OVERALL_CD_PERSON]:[text] <col3>[COMP_ID]:[text] <col4>[PERSON_ID]:[text] <col5>[PERSON_NM]:[text] <col6>[IDENTITY_CARD]:[text] <col7>[SOC_SRT_CARD]:[text] <col8>[PERSON_SEX]:[number] <col9>[PERSON_AGE]:[number] <col10>[IN_HOSP_DATE]:[... | SELECT MED_ORG_DEPT_CD, MED_ORG_DEPT_NM FROM `<table1>` WHERE STA_DATE BETWEEN '2010-04-17' AND '2017-08-10' AND `<col9>` = '手术费' GROUP BY MED_ORG_DEPT_CD ORDER BY COUNT( * ) LIMIT 6 | 查一查2010年4月17号到2017年8月10日的这段时间,手术记录排倒数的6个科室编码和名称
|
<table0>[vulnerabilities] { <col0>[INT]:[sector] <col1>[VARCHAR]:[255] <col2>[severity]:[FLOAT] <col3>[detection_date]:[DATE] } | SELECT AVG( `<col2>` ) FROM `<table0>` WHERE sector = 'financial' AND `<col3>` >= DATE_SUB( CURDATE( ), INTERVAL 3 MONTH ); | What is the average severity of vulnerabilities detected in the financial sector in the last quarter? |
<table0>[table_name_99] { <col0>[week]:[VARCHAR] <col1>[record]:[VARCHAR] } | SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "1–0" | What is the total number of weeks that the Steelers had a record of 1–0? |
<table0>[table_name_85] { <col0>[subjunctive]:[VARCHAR] <col1>[inverse_subjunctive]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "måchadns" | What subjunctive also has an inverse subjunctive of måchadns? |
<table0>[treatment] { <col0>[treatmentid]:[number] <col1>[patientunitstayid]:[number] <col2>[treatmentname]:[text] <col3>[treatmenttime]:[time] } <table1>[vitalperiodic] { <col0>[vitalperiodicid]:[number] <col1>[patientunitstayid]:[number] <col2>[temperature]:[number] <col3>[sao2]:[number] <col4>[heartrate]:[number] <... | SELECT COUNT( * ) FROM `<table3>` WHERE `<table3>`.drugname = 'aspirin ( baby asa ) 81 mg tab' AND DATETIME( `<table3>`.drugstarttime ) >= DATETIME( CURRENT_TIME( ), '-6 year' ) | what was the number of times the aspirin (baby asa) 81 mg tab was prescribed since 6 years ago? |
<table0>[branches] { <col0>[branch_id]:[INT] <col1>[branch_country]:[VARCHAR] } <table1>[customers] { <col0>[customer_id]:[INT] <col1>[branch_id]:[INT] <col2>[account_opening_date]:[DATE] } | SELECT COUNT( * ) FROM `<table1>` WHERE `<col2>` BETWEEN DATE_SUB( CURDATE( ), INTERVAL 1 MONTH ) AND CURDATE( ) AND `<col1>` IN ( SELECT `<col1>` FROM `<table0>` WHERE `<col1>` LIKE 'Asia%' ); | How many customers have opened new accounts in the last month in the Asia-Pacific region? |
<table0>[table_26559] { <col0>[Model]:[number] <col1>[text]:[Frequency] <col2>[text]:[Cache] <col3>[text]:[FSB] <col4>[text]:[Mult] <col5>[text]:[Voltage] <col6>[text]:[TDP] <col7>[text]:[Socket] <col8>[text]:[Release] <col9>[date]:[text] <col10>[number]:[text] <col11>[sSpec]:[number] } | SELECT "Part number( s )" FROM `<table0>` WHERE "TDP" = '2.9 ( Max.4.1~5.4 ) W' | What's the part number of the model with TDP of 2.9 (max.4.1~5.4) w?
|
<table0>[table_11365528_2] { <col0>[head_coach]:[VARCHAR] <col1>[website]:[VARCHAR] } | SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "http://www.burleighbulldogs.org/" | How many head coaches are there for the website, http://www.burleighbulldogs.org/?
|
<table0>[table_name_98] { <col0>[date]:[VARCHAR] <col1>[set_3]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "15–6" | What is the Date with a Set 3 with 15 6? |
<table0>[table_17118006_2] { <col0>[bid_pronar_investment__us]:[VARCHAR] <col1>[farmers]:[VARCHAR] } | SELECT bid_pronar_investment__us$_ FROM `<table0>` WHERE `<col1>` = 1326 | What was the BID/PRONAR investment (in $) in the department that included 1326 farmers in its projects?
|
<table0>[table_74054] { <col0>[English]:[text] <col1>[Proto]:[Semitic] <col2>[text]:[Akkadian] <col3>[text]:[Arabic] <col4>[text]:[Aramaic] <col5>[text]:[Hebrew] <col6>[text]:[Geez] <col7>[text]:[Mehri] } | SELECT "Proto-Semitic" FROM `<table0>` WHERE "English" = 'house' | If in English it's house, what is it in proto-semitic?
|
<table0>[prescriptions] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icustay_id]:[text] <col3>[drug_type]:[text] <col4>[drug]:[text] <col5>[formulary_drug_cd]:[text] <col6>[route]:[text] <col7>[drug_dose]:[text] } <table1>[demographic] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[name]:[text]... | SELECT COUNT( DISTINCT `<table1>`.subject_id ) FROM `<table1>` INNER JOIN prescriptions ON `<table1>`.hadm_id = prescriptions.hadm_id WHERE `<table1>`.dob_year < "2056" AND prescriptions.drug_type = "MAIN" | what is the number of patients whose year of birth is less than 2056 and drug type is main?
|
<table0>[patient] { <col0>[uniquepid]:[text] <col1>[patienthealthsystemstayid]:[number] <col2>[patientunitstayid]:[number] <col3>[gender]:[text] <col4>[age]:[text] <col5>[ethnicity]:[text] <col6>[hospitalid]:[number] <col7>[wardid]:[number] <col8>[admissionheight]:[number] <col9>[admissionweight]:[number] <col10>[disch... | SELECT ( SELECT `<table0>`.admissionweight FROM `<table0>` WHERE `<table0>`.`<table0>`healthsystemstayid IN ( SELECT `<table0>`.`<table0>`healthsystemstayid FROM `<table0>` WHERE `<table0>`.uniquepid = '006-76924' AND `<table0>`.hospitaldischargetime IS NULL ) AND NOT `<table0>`.admissionweight IS NULL ORDER BY `<table... | how much has patient 006-76924's change of weight second measured on the current hospital visit compared to the first value measured on the current hospital visit? |
<table0>[PeacekeepingOperations] { <col0>[Operation]:[VARCHAR] <col1>[Year]:[INT] <col2>[Casualties]:[INT] } | SELECT Operation, MAX( `<col2>` ) AS HighestCasualties FROM `<table0>` GROUP BY `<col0>` ORDER BY HighestCasualties DESC; | List the peacekeeping operations that have the highest personnel casualties since 2010? |
<table0>[Artworks] { <col0>[artwork_id]:[INT] <col1>[movement]:[VARCHAR] <col2>[255]:[sale_year] <col3>[INT]:[revenue] } | SELECT SUM( revenue ) FROM `<table0>` WHERE `<col1>` = 'Expressionist' AND sale_year IN ( 2012, 2013 ); | What was the total revenue for all artworks in the 'Expressionist' movement that were sold in the years 2012 and 2013 combined? |
<table0>[perpetrator] { } | SELECT COUNT( * ) FROM `<table0>` | How many perpetrators are there?
|
<table0>[table_25247] { <col0>[Year]:[text] <col1>[Date]:[text] <col2>[Driver]:[text] <col3>[Team]:[text] <col4>[Manufacturer]:[text] <col5>[Laps]:[real] <col6>[Miles]:[text] <col7>[Race]:[Time] <col8>[text]:[Average] <col9>[Speed]:[mph] <col10>[text]:[Report] } | SELECT COUNT( "Year" ) FROM `<table0>` WHERE "Team" = 'Joe Gibbs Racing' AND "Manufacturer" = 'Pontiac' | How many years was Pontiac the manufacturer for Joe Gibbs Racing? |
<table0>[vitalperiodic] { <col0>[vitalperiodicid]:[number] <col1>[patientunitstayid]:[number] <col2>[temperature]:[number] <col3>[sao2]:[number] <col4>[heartrate]:[number] <col5>[respiration]:[number] <col6>[systemicsystolic]:[number] <col7>[systemicdiastolic]:[number] <col8>[systemicmean]:[number] <col9>[observationti... | SELECT t1.drugstarttime FROM ( SELECT patient.uniquepid, `<table2>`.drugstarttime FROM `<table2>` JOIN patient ON `<table2>`.patientunitstayid = patient.patientunitstayid WHERE `<table2>`.drugname = '2 ml : fentanyl citrate 0.05 mg/ml ij soln' AND patient.uniquepid = '007-2498' AND STRFTIME( '%y-%m', `<table2>`.drugsta... | when was the first time when patient 007-2498 was prescribed 2 ml : fentanyl citrate 0.05 mg/ml ij soln and sodium chloride 0.9% 250 ml lvp at the same time until 07/2105? |
<table0>[city] { <col0>[city_id]:[integer] <col1>[city_name]:[text] <col2>[state]:[text] <col3>[population]:[integer] <col4>[area]:[real] } <table1>[customer] { <col0>[cust_id]:[integer] <col1>[cust_name]:[text] <col2>[annual_revenue]:[integer] <col3>[cust_type]:[text] <col4>[address]:[text] <col5>[city]:[text] <col6>... | SELECT COUNT( * ) FROM `<table4>` AS T1 INNER JOIN driver AS T2 ON T1.driver_id = T2.driver_id WHERE T1.driver_id = 23 | How many shipments were shipped by the driver named Zachary Hicks? |
<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>[procedures] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:... | SELECT COUNT( DISTINCT `<table4>`.subject_id ) FROM `<table4>` INNER JOIN lab ON `<table4>`.hadm_id = lab.hadm_id WHERE lab.itemid = "51249" | how many patients have the lab test item id 51249?
|
<table0>[regions] { <col0>[REGION_ID]:[decimal] <col1>[REGION_NAME]:[varchar] } <table1>[locations] { <col0>[LOCATION_ID]:[decimal] <col1>[STREET_ADDRESS]:[varchar] <col2>[POSTAL_CODE]:[varchar] <col3>[CITY]:[varchar] <col4>[STATE_PROVINCE]:[varchar] <col5>[COUNTRY_ID]:[varchar] } <table2>[departments] { <col0>[DEPAR... | SELECT HIRE_DATE, AVG( `<col0>` ) FROM `<table5>` WHERE `<col7>` BETWEEN 8000 AND 12000 AND `<col8>` <> "null" OR `<col10>` <> 40 ORDER BY AVG( `<col0>` ) | 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, find hire_date and the average of employee_id bin hire_date by time, and visualize them by a bar chart, and could you show by the Y from low to high?
|
<table0>[table_name_57] { <col0>[score]:[VARCHAR] <col1>[player]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "tiger woods" | What was Tiger Woods' score? |
<table0>[table_train_194] { <col0>[int]:[organ_transplantation] <col1>[bool]:[systolic_blood_pressure_sbp] <col2>[int]:[hemoglobin_a1c_hba1c] <col3>[float]:[substance_dependence] <col4>[bool]:[diastolic_blood_pressure_dbp] <col5>[int]:[alcohol_abuse] <col6>[bool]:[age] <col7>[float]:[NOUSE] } | SELECT * FROM `<table0>` WHERE age >= 21 AND age <= 60 | age 21 _ 60 |
<table0>[blockchain_platforms] { <col0>[platform_id]:[INT] <col1>[name]:[VARCHAR] <col2>[255]:[smart_contract_count] } | SELECT name, SUM( smart_contract_count ) FROM `<table0>` WHERE `<col1>` = 'Ethereum' GROUP BY name; | How many smart contracts have been deployed on a specific blockchain platform? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.