schema stringlengths 20 14.6k | query stringlengths 17 2.58k | question stringlengths 8 1.06k |
|---|---|---|
<table0>[table_11964154_7] { <col0>[team]:[VARCHAR] <col1>[game]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = 25 | Whom did they play on game number 25? |
<table0>[projects] { <col0>[INT]:[name] <col1>[VARCHAR]:[lead_researcher] <col2>[VARCHAR]:[start_date] <col3>[DATE]:[INSERT] } | SELECT MIN( start_date ) FROM `<table0>` WHERE sector = 'Genetics'; | What is the earliest start date for a genetic research project? |
<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 `<table1>`.long_title FROM `<table1>` WHERE `<table1>`.icd9_code = "3726" | what is procedure long title of procedure icd9 code 3726? |
<table0>[table_30007801_1] { <col0>[country_territory]:[VARCHAR] } | SELECT COUNT( 3 AS rd_runner_up ) FROM `<table0>` WHERE `<col0>` = "Turkey" | How many 3rd runner up values does Turkey have? |
<table0>[cost] { <col0>[costid]:[number] <col1>[uniquepid]:[text] <col2>[patienthealthsystemstayid]:[number] <col3>[eventtype]:[text] <col4>[eventid]:[number] <col5>[chargetime]:[time] } <table1>[intakeoutput] { <col0>[intakeoutputid]:[number] <col1>[patientunitstayid]:[number] <col2>[cellpath]:[text] <col3>[celllabel... | SELECT ( SELECT `<table8>`.`<table8>`result 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 = '005-68848' ) ) AND... | what are patient 005-68848's changes in creatinine measured at 2102-08-01 08:51:00 compared to the value measured at 2102-08-01 02:02:00? |
<table0>[microbiologyevents] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[charttime]:[time] <col4>[spec_type_desc]:[text] <col5>[org_name]:[text] } <table1>[outputevents] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] ... | SELECT `<table5>`.short_title FROM `<table5>` WHERE `<table5>`.icd9_code IN ( SELECT t3.icd9_code FROM ( SELECT t2.icd9_code, DENSE_RANK( ) OVER ( ORDER BY COUNT( * ) DESC ) AS c1 FROM ( SELECT admissions.subject_id, `<table10>`.charttime FROM `<table10>` JOIN admissions ON `<table10>`.hadm_id = admissions.hadm_id WHER... | last year, what is the top five most frequently diagnoses that patients were diagnosed with within the same month after receiving extracorporeal circulat? |
<table0>[events] { <col0>[event_id]:[INT] <col1>[PRIMARY]:[KEY] <col2>[name]:[VARCHAR] <col3>[100]:[attendance] } | INSERT INTO `<table0>` ( event_id, name, attendance ) VALUES ( ( SELECT MAX( `<col0>` ) FROM `<table0>` ) + 1, 'Dia de los Muertos Festival', 2500 ); | Insert a new event "Dia de los Muertos Festival" with attendance of 2500 people |
<table0>[table_204_104] { <col0>[number]:[title] <col1>[text]:[genre] <col2>[text]:[sub] <col3>[u00addivisions]:[text] <col4>[libretto]:[text] <col5>[premiere]:[date] <col6>[text]:[place] <col7>[theatre]:[text] <col8>[notes]:[text] } | SELECT "title" FROM `<table0>` WHERE "title" IN ( 'artamene', 'merope' ) ORDER BY "premiere date" LIMIT 1 | which was released earlier , artamene or merope ?
|
<table0>[table_1140078_2] { <col0>[pole_position]:[VARCHAR] <col1>[location]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "Paul Ricard" | What is the pole position of paul ricard? |
<table0>[Astronauts] { <col0>[INT]:[VARCHAR] <col1>[Flights]:[INT] <col2>[Operator]:[VARCHAR] } | SELECT COUNT( * ) FROM `<table0>` WHERE `<col2>` = 'SpaceX'; | What is the total number of astronauts that have flown with SpaceX? |
<table0>[Customers_Cards] { <col0>[card_id]:[INTEGER] <col1>[customer_id]:[INTEGER] <col2>[card_type_code]:[VARCHAR] <col3>[card_number]:[VARCHAR] <col4>[date_valid_from]:[DATETIME] <col5>[date_valid_to]:[DATETIME] <col6>[other_card_details]:[VARCHAR] } <table1>[Accounts] { <col0>[account_id]:[INTEGER] <col1>[customer... | SELECT account_id, `<col2>` FROM `<table1>` | What is the relationship between account name and account id? Show me a scatter chart. |
<table0>[departments] { <col0>[DEPARTMENT_ID]:[decimal] <col1>[DEPARTMENT_NAME]:[varchar] <col2>[MANAGER_ID]:[decimal] <col3>[LOCATION_ID]:[decimal] } <table1>[jobs] { <col0>[JOB_ID]:[varchar] <col1>[JOB_TITLE]:[varchar] <col2>[MIN_SALARY]:[decimal] <col3>[MAX_SALARY]:[decimal] } <table2>[locations] { <col0>[LOCATION... | SELECT HIRE_DATE, AVG( `<col0>` ) FROM `<table6>` WHERE `<col1>` LIKE '%D%' OR `<col1>` LIKE '%S%' ORDER BY AVG( `<col0>` ) | For all employees who have the letters D or S in their first name, draw a bar chart about the distribution of hire_date and the average of employee_id bin hire_date by time, could you order in ascending by the y-axis? |
<table0>[table_name_82] { <col0>[visitor]:[VARCHAR] <col1>[leading_scorer]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "milt palacio ( 15 )" | Which team was the visitor when Milt Palacio (15) was the leading scorer?
|
<table0>[diagnoses] { <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 prescriptions ON `<table1>`.hadm_id = prescriptions.hadm_id WHERE prescriptions.formulary_drug_cd = "BARI2/450L" | how many patients have the drug code bari2/450i? |
<table0>[farm_biomass] { <col0>[INT]:[farm_id] <col1>[INT]:[biomass] <col2>[INT]:[system_type] <col3>[TEXT]:[INSERT] } <table1>[pacific_farms_ras] { <col0>[INT]:[farm_id] <col1>[INT]:[farm_name] <col2>[TEXT]:[region] <col3>[TEXT]:[system_type] <col4>[TEXT]:[INSERT] } | SELECT pacific_farms_ras.region, SUM( `<table0>`.biomass ) as total_biomass FROM `<table0>` JOIN pacific_farms_ras ON `<table0>`.farm_id = pacific_farms_ras.farm_id WHERE pacific_farms_ras.region = 'Pacific' AND pacific_farms_ras.system_type = 'Recirculating' GROUP BY pacific_farms_ras.region; | What is the number of farms in the Pacific region using recirculating aquaculture systems and their total biomass? |
<table0>[DroughtImpactAssessments] { <col0>[AssessmentID]:[INT] <col1>[PRIMARY]:[KEY] <col2>[Location]:[VARCHAR] <col3>[255]:[Impact] <col4>[INT]:[Severity] <col5>[VARCHAR]:[255] <col6>[Timestamp]:[DATETIME] } | SELECT Severity, AVG( Impact ) as AverageImpact, DATEPART( quarter, `<col6>` ) as Quarter FROM `<table0>` WHERE `<col2>` = 'Arizona' AND YEAR( `<col6>` ) = 2021 GROUP BY Severity, DATEPART( quarter, `<col6>` ); | What is the average drought impact by severity and quarter in Arizona in the year 2021? |
<table0>[course] { <col0>[course_id]:[integer] <col1>[name]:[text] <col2>[credit]:[integer] <col3>[diff]:[integer] } <table1>[prof] { <col0>[prof_id]:[integer] <col1>[gender]:[text] <col2>[first_name]:[text] <col3>[last_name]:[text] <col4>[email]:[text] <col5>[popularity]:[integer] <col6>[teachingability]:[integer] <c... | SELECT T2.`<table4>`_id FROM `<table4>` AS T1 INNER JOIN registration AS T2 ON T1.`<table4>`_id = T2.`<table4>`_id INNER JOIN course AS T3 ON T2.course_id = T3.course_id WHERE T3.name = 'C for Programmers' AND T1.gpa = 2.5 | Give the student's ID of students with 2.5 GPA and enrolled in C for Programmers. |
<table0>[table_171250_2] { <col0>[census_ranking]:[VARCHAR] <col1>[area_km_2]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "369.25" | What are the census ranking(s) that have an area of 369.25 km2? |
<table0>[table_name_35] { <col0>[silver]:[INTEGER] <col1>[total]:[VARCHAR] <col2>[bronze]:[VARCHAR] } | SELECT AVG( `<col0>` ) FROM `<table0>` WHERE `<col1>` < 7 AND `<col2>` > 1 | Total smaller than 7, and a Bronze larger than 1 is what amount of average silver? |
<table0>[table_23483182_1] { <col0>[no_in_season]:[VARCHAR] <col1>[us_viewers__million]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE us_viewers__million_ = "6.01" | What number was there 6.01 million u.s. drivers? |
<table0>[table_3002894_4] { <col0>[sonnet]:[VARCHAR] <col1>[nupowr_117]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "0,4, or 8 MB" | When 0,4, or 8 mb is the nupowr 117 what is the sonnet? |
<table0>[FlagTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table1>[ReviewRejectionReasons] { <col0>[number]:[text] <col1>[Description]:[text] <col2>[PostTypeId]:[number] } <table2>[ReviewTaskResults] { <col0>[number]:[ReviewTaskId] <col1>[number]:[ReviewTaskResultTypeId] <col2>[number]:[CreationDate] <... | SELECT p.ParentId, COUNT( * ) FROM `<table19>` AS p WHERE NOT p.ParentId IS NULL GROUP BY p.ParentId ORDER BY ParentId, NEWID( ) | Number of Responses Per Post. |
<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 COUNT( * ) FROM ( SELECT `<table0>`.MED_ORG_DEPT_CD FROM `<table0>` JOIN t_kc24 ON `<table0>`.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE `<table0>`.MED_SER_ORG_NO = '2555130' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2016-01-08' AND '2019-09-30' GROUP BY `<table0>`.MED_ORG_DEPT_CD HAVING SUM( t_kc24.MED_AMOUT ) < 5728... | 2555130这个医院涉及医疗费总额低于5728.03元的科室有多少?时间范围是16年1月8日到19年9月30日
|
<table0>[table_name_5] { <col0>[realization]:[VARCHAR] <col1>[phoneme]:[VARCHAR] <col2>[example]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "/i/" AND `<col2>` = "/idːa/" | Name the realization for phoneme of /i/ and example of /id a/ |
<table0>[patient] { <col0>[patient_id]:[INT] <col1>[name]:[VARCHAR] <col2>[age]:[INT] <col3>[gender]:[VARCHAR] <col4>[condition]:[VARCHAR] } <table1>[treatment] { <col0>[treatment_id]:[INT] <col1>[patient_id]:[INT] <col2>[treatment_name]:[VARCHAR] <col3>[start_date]:[DATE] <col4>[end_date]:[DATE] <col5>[success]:[BOOL... | SELECT ( SUM( `<col5>` ) / COUNT( `<col1>` ) ) * 100 AS success_rate FROM `<table1>` JOIN patient ON `<table1>`.patient_id = patient.patient_id WHERE `<table1>`_name = 'Acceptance and Commitment Therapy' AND ( condition = 'Anxiety' OR condition = 'Depression' ); | What is the success rate of the Acceptance and Commitment Therapy program for patients with anxiety or depression? |
<table0>[table_name_69] { <col0>[fa_cup]:[INTEGER] <col1>[malaysia_cup]:[INTEGER] } | SELECT MIN( `<col0>` ) FROM `<table0>` WHERE `<col1>` < 0 | What is the lowest number of FA cups associated with 0 malaysia cups?
|
<table0>[table_22344463_2] { <col0>[date_of_birth]:[VARCHAR] <col1>[name]:[VARCHAR] } | SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "Timo Higgins" | If the name is Timo Higgins, what is the total date of birth amount? |
<table0>[DiveSite] { <col0>[VARCHAR]:[PRIMARY] <col1>[KEY]:[Depth] <col2>[INT]:[INSERT] } | DELETE FROM `<table0>` WHERE Name = 'Blue Hole'; | Delete the "DiveSite" record with a name of Blue Hole |
<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 `<table2>`.subject_id ) FROM `<table2>` WHERE `<table2>`.diagnosis = "FEMORAL ARTERY THROMBOSIS" AND `<table2>`.age < "89" | what is the number of patients less than 89 years who are suffering from femoral artery thrombosis primaray disease? |
<table0>[departments] { <col0>[DEPARTMENT_ID]:[decimal] <col1>[DEPARTMENT_NAME]:[varchar] <col2>[MANAGER_ID]:[decimal] <col3>[LOCATION_ID]:[decimal] } <table1>[job_history] { <col0>[EMPLOYEE_ID]:[decimal] <col1>[START_DATE]:[date] <col2>[END_DATE]:[date] <col3>[JOB_ID]:[varchar] <col4>[DEPARTMENT_ID]:[decimal] } <tab... | SELECT LAST_NAME, `<col10>` FROM `<table4>` WHERE NOT `<col10>` IN ( SELECT `<col10>` FROM `<table0>` WHERE `<col9>` BETWEEN 100 AND 200 ) | 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 last_name and department_id . |
<table0>[Users] { <col0>[number]:[Reputation] <col1>[number]:[CreationDate] <col2>[time]:[DisplayName] <col3>[text]:[LastAccessDate] <col4>[time]:[WebsiteUrl] <col5>[text]:[Location] <col6>[text]:[AboutMe] <col7>[text]:[Views] <col8>[number]:[UpVotes] <col9>[number]:[DownVotes] <col10>[number]:[ProfileImageUrl] <col11>... | SELECT Tags.TagName AS "name", COUNT( Posts.Id ) AS "count", TIME_TO_STR( Posts.CreationDate, '%q' ) AS "quarter", YEAR( Posts.CreationDate ) AS "year" FROM `<table17>` INNER JOIN Tags ON Tags.Id = `<table17>`.TagId INNER JOIN Posts ON Posts.Id = `<table17>`.PostId GROUP BY Tags.TagName, TIME_TO_STR( Posts.CreationDate... | Popular Languages by Month and Year.
|
<table0>[course_prerequisite] { <col0>[pre_course_id]:[int] <col1>[course_id]:[int] } <table1>[area] { <col0>[course_id]:[int] } <table2>[semester] { <col0>[semester_id]:[int] } <table3>[offering_instructor] { <col0>[offering_instructor_id]:[int] <col1>[offering_id]:[int] <col2>[instructor_id]:[int] } <table4>[prog... | SELECT DISTINCT `<table2>`.`<table2>`, `<table2>`.year FROM course, course_offering, `<table2>` WHERE course.course_id = course_offering.course_id AND course.department = 'EECS' AND course.number = 792 AND course_offering.`<table2>` = `<table2>`.`<table2>`_id AND `<table2>`.`<table2>`_id > ( SELECT SEMESTERalias1.`<tab... | Can I take 792 when ? |
<table0>[customers] { <col0>[INT]:[financial_capability_score] <col1>[INT]:[financial_wellbeing_score] <col2>[INT]:[INSERT] } | SELECT financial_wellbeing_score FROM `<table0>` WHERE financial_capability_score > 80; | What is the financial wellbeing score of the customers who have a financial capability score above 80? |
<table0>[CrimeStats] { <col0>[INT]:[crimeType] <col1>[VARCHAR]:[number] } | SELECT SUM( number ) FROM `<table0>` WHERE crimeType IN ( 'Theft', 'Vandalism' ); | What are the total numbers of crimes reported for both 'Theft' and 'Vandalism' categories in the 'CrimeStats' table? |
<table0>[weather] { <col0>[date]:[text] <col1>[max_temperature_f]:[number] <col2>[mean_temperature_f]:[number] <col3>[min_temperature_f]:[number] <col4>[max_dew_point_f]:[number] <col5>[mean_dew_point_f]:[number] <col6>[min_dew_point_f]:[number] <col7>[max_humidity]:[number] <col8>[mean_humidity]:[number] <col9>[min_hu... | SELECT AVG( `<col1>` ) FROM `<table2>` WHERE NOT `<col0>` IN ( SELECT id FROM `<table3>` WHERE city = "Palo Alto" ) | What is the average bike availablility for stations not in Palo Alto? |
<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 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 = 'ondansetron 4 mg po tab-disperse' AND DATETI... | what were the top five frequently prescribed drugs that patients were prescribed during the same month after they had been prescribed with ondansetron 4 mg po tab-disperse last year? |
<table0>[table_61172] { <col0>[Rank]:[text] <col1>[Gold]:[real] <col2>[Silver]:[real] <col3>[Bronze]:[real] <col4>[Total]:[real] } | SELECT MIN( "Bronze" ) FROM `<table0>` WHERE "Total" > '13' AND "Gold" > '10' AND "Silver" < '22' | What is the lowest number of bronze of the nation with more than 13 total medals, more than 10 gold medals, and less than 22 silvers?
|
<table0>[mountain] { <col0>[int]:[name] <col1>[text]:[Height] <col2>[real]:[Prominence] <col3>[real]:[Range] <col4>[text]:[Country] } <table1>[photos] { <col0>[int]:[camera_lens_id] <col1>[int]:[mountain_id] <col2>[int]:[color] <col3>[text]:[name] } <table2>[camera_lens] { <col0>[int]:[brand] <col1>[text]:[name] <col... | SELECT T1.name, COUNT( T1.name ) FROM `<table2>` AS T1 JOIN photos AS T2 ON T2.`<table2>`_id = T1.id WHERE T1.brand = 'Sigma' OR T1.brand = 'Olympus' GROUP BY T1.name ORDER BY COUNT( T1.name ) DESC | What are the names of photos taken with the lens brand 'Sigma' or 'Olympus', and count them by a bar chart, sort y-axis in desc order.
|
<table0>[Episode] { <col0>[episode_id]:[text] <col1>[series]:[text] <col2>[season]:[integer] <col3>[episode]:[integer] <col4>[number_in_series]:[integer] <col5>[title]:[text] <col6>[summary]:[text] <col7>[air_date]:[date] <col8>[episode_image]:[text] <col9>[rating]:[real] <col10>[votes]:[integer] } <table1>[Keyword] {... | SELECT T1.name FROM `<table2>` AS T1 INNER JOIN Award AS T2 ON T1.person_id = T2.person_id WHERE T2.award_id = 313 | Who was nominated for award no.313? Give the full name. |
<table0>[table_2668352_5] { <col0>[district]:[VARCHAR] <col1>[incumbent]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "Joseph Desha" | What is every district for incumbent Joseph Desha? |
<table0>[table_200_47] { <col0>[number]:[date] <col1>[text]:[event] <col2>[text]:[duration] <col3>[months]:[text] <col4>[duration]:[years] } | SELECT "date" FROM `<table0>` WHERE "event" = '2nd drop fell' | when did the second drop in the experiment fall ? |
<table0>[table_15852] { <col0>[Aircraft]:[text] <col1>[Description]:[text] <col2>[Max]:[Gross] <col3>[Weight]:[text] <col4>[Total]:[disk] <col5>[area]:[text] <col6>[Max]:[disk] <col7>[Loading]:[text] } | SELECT "Max Gross Weight" FROM `<table0>` WHERE "Aircraft" = 'Robinson R-22' | What is the max gross weight of the Robinson R-22?
|
<table0>[diagnoses] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table1>[lab] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[itemid]:[text] <col3>[charttime]:[text] <col4>[flag]:[text] <col5>[value_unit]:[text] <col6>[lab... | SELECT COUNT( DISTINCT `<table3>`.subject_id ) FROM `<table3>` INNER JOIN procedures ON `<table3>`.hadm_id = procedures.hadm_id WHERE procedures.long_title = "Incision of vessel, abdominal arteries" | Get the number of patients who had the incision of vessel abdominal arteries procedure.
|
<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 `<table4>`.subject_id ) FROM `<table4>` INNER JOIN procedures ON `<table4>`.hadm_id = procedures.hadm_id WHERE `<table4>`.marital_status = "DIVORCED" AND procedures.icd9_code = "4105" | give me the number of patients whose marital status is divorced and procedure icd9 code is 4105? |
<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 All_Neutral, `<col0>` FROM `<table1>` | Visualize a pie chart about the proportion of All_Neutral and Team ID.
|
<table0>[table_name_35] { <col0>[VARCHAR]:[q2_time] <col1>[VARCHAR]:[q1_order] } | SELECT q1 + q2_time FROM `<table0>` WHERE q1_order = 13 | What is the Q1+Q2 time for the driver whose Q1 order was 13? |
<table0>[patients] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[gender]:[text] <col3>[dob]:[time] <col4>[dod]:[time] } <table1>[microbiologyevents] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[charttime]:[time] <col4>[spec_type_desc]:[text] <col5>[org_name]:[tex... | SELECT `<table16>`.admission_type FROM `<table16>` WHERE `<table16>`.subject_id = 61003 AND STRFTIME( '%y', `<table16>`.admittime ) <= '2103' ORDER BY `<table16>`.admittime DESC LIMIT 1 | how did patient 61003 last get admitted in the hospital until 2103?
|
<table0>[table_22355_20] { <col0>[athlete]:[VARCHAR] <col1>[nation]:[VARCHAR] <col2>[rank]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "Ethiopia ( ETH )" AND `<col2>` > 7.0 | Who is the athlete from the nation of Ethiopia (eth) who had a rank bigger than 7.0?
|
<table0>[table_name_13] { <col0>[scheduled]:[VARCHAR] <col1>[wind_farm]:[VARCHAR] <col2>[capacity__mw]:[VARCHAR] <col3>[type]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE capacity__mw_ < 32.5 AND `<col3>` = "nordex n90 2.5mw" AND `<col1>` = "glenough extension" | What is the scheduled value for the farm having a capacity under 32.5MW, type of Nordex n90 2.5MW, and a farm of Glenough Extension?
|
<table0>[manager_half] { <col0>[player_id]:[TEXT] <col1>[year]:[INTEGER] <col2>[team_id]:[TEXT] <col3>[league_id]:[TEXT] <col4>[inseason]:[INTEGER] <col5>[half]:[INTEGER] <col6>[INTEGER]:[INTEGER] <col7>[INTEGER]:[rank] } <table1>[player_award_vote] { <col0>[award_id]:[TEXT] <col1>[year]:[INTEGER] <col2>[league_id]:[T... | SELECT year, AVG( `<col8>` ) FROM `<table7>` GROUP BY `<col0>` ORDER BY `<col0>` | Return a line chart on what is the average number of attendance at home games for each year?, show from low to high by the year.
|
<table0>[waste_types] { <col0>[waste_type]:[VARCHAR] <col1>[255]:[region] <col2>[VARCHAR]:[255] <col3>[waste_quantity]:[INT] <col4>[date]:[DATE] } | SELECT waste_type, region, waste_quantity, date, RANK( ) OVER ( PARTITION BY `<col0>` ORDER BY `<col3>` DESC ) as daily_waste_rank FROM `<table0>` WHERE region = 'Southeast'; | What is the daily waste quantity for each type, ranked by the highest quantity, for the Southeast region? |
<table0>[Allergy_Type] { <col0>[Allergy]:[VARCHAR] <col1>[AllergyType]:[VARCHAR] } <table1>[Student] { <col0>[StuID]:[INTEGER] <col1>[LName]:[VARCHAR] <col2>[Fname]:[VARCHAR] <col3>[Age]:[INTEGER] <col4>[Sex]:[VARCHAR] <col5>[Major]:[INTEGER] <col6>[Advisor]:[INTEGER] <col7>[city_code]:[VARCHAR] } <table2>[Has_Allerg... | SELECT Age, COUNT( * ) FROM `<table1>` GROUP BY `<col3>` | Return a scatter on how old is each student and how many students are each age? |
<table0>[Employees] { <col0>[INT]:[name] <col1>[VARCHAR]:[department] <col2>[VARCHAR]:[salary] <col3>[FLOAT]:[gender] <col4>[VARCHAR]:[INSERT] } | SELECT department, AVG( salary ) as avg_salary FROM `<table0>` WHERE gender = 'Female' GROUP BY department; | Calculate the average salary of female employees in the "Employees" table, grouped by department. |
<table0>[Faculty] { <col0>[FacID]:[INTEGER] <col1>[Lname]:[VARCHAR] <col2>[Fname]:[VARCHAR] <col3>[Rank]:[VARCHAR] <col4>[Sex]:[VARCHAR] <col5>[Phone]:[INTEGER] <col6>[Room]:[VARCHAR] <col7>[Building]:[VARCHAR] } <table1>[Activity] { <col0>[actid]:[INTEGER] <col1>[activity_name]:[varchar] } <table2>[Participates_in] ... | SELECT Rank, COUNT( * ) FROM `<table0>` AS T1 JOIN Student AS T2 ON T1.FacID = T2.Advisor GROUP BY T1.Rank ORDER BY COUNT( * ) DESC | Show all the faculty ranks and the number of students advised by each rank in a bar chart, rank by the total number from high to low. |
<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 lab ON `<table0>`.hadm_id = lab.hadm_id WHERE diagnoses.long_title = "Suicidal ideation" AND lab.flag = "delta" | give me the number of patients whose diagnoses long title is suicidal ideation and lab test abnormal status is delta? |
<table0>[Purchases] { <col0>[purchase_transaction_id]:[INTEGER] <col1>[purchase_details]:[VARCHAR] } <table1>[Lots] { <col0>[lot_id]:[INTEGER] <col1>[investor_id]:[INTEGER] <col2>[lot_details]:[VARCHAR] } <table2>[Sales] { <col0>[sales_transaction_id]:[INTEGER] <col1>[sales_details]:[VARCHAR] } <table3>[Ref_Transact... | SELECT date_of_transaction, COUNT( `<col3>` ) FROM `<table6>` ORDER BY COUNT( `<col3>` ) DESC | Give me a bar chart for how many date of transaction of each date of transaction, and order by the y-axis in desc.
|
<table0>[actor] { <col0>[Actor_ID]:[int] <col1>[text]:[Musical_ID] <col2>[int]:[Character] <col3>[text]:[Duration] <col4>[text]:[age] } <table1>[musical] { <col0>[Musical_ID]:[int] <col1>[text]:[Year] <col2>[int]:[Award] <col3>[text]:[Category] <col4>[text]:[Nominee] <col5>[text]:[Result] } | SELECT T2.Name, COUNT( * ) FROM `<table0>` AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID GROUP BY T1.Musical_ID ORDER BY T2.Name DESC | Show names of musicals and the number of actors who have appeared in the musicals Show bar chart, sort bar in desc order.
|
<table0>[Student] { <col0>[StudentID]:[INT] <col1>[District]:[VARCHAR] } <table1>[MentalHealth] { <col0>[StudentID]:[INT] <col1>[Issue]:[DATE] <col2>[INSERT]:[Student] <col3>[StudentID]:[District] <col4>[VALUES]:[OpenSchool] <col5>[INSERT]:[Student] <col6>[StudentID]:[District] <col7>[VALUES]:[ClosedSchool] } | SELECT COUNT( * ) FROM StudentMentalHealthView WHERE District = 'OpenSchool'; | What is the total number of students who have ever experienced mental health issues in 'OpenSchool' district? |
<table0>[domain_keyword] { <col0>[int]:[kid] } <table1>[domain] { <col0>[int]:[name] } <table2>[publication] { <col0>[abstract]:[varchar] <col1>[cid]:[int] <col2>[citation_num]:[int] <col3>[jid]:[int] <col4>[pid]:[int] <col5>[reference_num]:[int] <col6>[title]:[varchar] <col7>[year]:[int] } <table3>[journal] { <col0... | SELECT domain.name FROM author, domain, domain_author WHERE author.name = 'H. V. Jagadish' AND domain_author.aid = author.aid AND domain.did = domain_author.did | return me the domain where ' H. V. Jagadish ' is focused . |
<table0>[salmon_farms] { <col0>[INT]:[name] <col1>[TEXT]:[region] <col2>[TEXT]:[water_temp] <col3>[FLOAT]:[INSERT] } | SELECT AVG( water_temp ) FROM `<table0>` WHERE region = 'Pacific Northwest' AND EXTRACT( MONTH FROM datetime ) = 7; | What is the average water temperature in the Pacific Northwest salmon farms in July? |
<table0>[mature_forest] { <col0>[INT]:[species] <col1>[VARCHAR]:[255] <col2>[age]:[INT] } | SELECT SUM( age ) FROM mature_forest; | What is the total age of trees in the mature_forest table? |
<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 Sex, AVG( Height ) FROM `<table0>` GROUP BY `<col1>` ORDER BY `<col1>` DESC | Draw a bar chart about the distribution of Sex and the average of Height , and group by attribute Sex, could you list in desc by the bar? |
<table0>[table_name_29] { <col0>[away_team]:[VARCHAR] } | SELECT `<col0>` AS score FROM `<table0>` WHERE `<col0>` = "melbourne" | What is melbourne's away score?
|
<table0>[defense_diplomacy] { <col0>[INT]:[event] <col1>[VARCHAR]:[country] <col2>[VARCHAR]:[partner] <col3>[VARCHAR]:[date] <col4>[DATE]:[PRIMARY] <col5>[KEY]:[INSERT] } | SELECT event, country, partner, date, LAG( date ) OVER ( PARTITION BY country ORDER BY date ) as previous_event_date FROM `<table0>` WHERE country = 'Russia'; | Retrieve the previous defense diplomacy event date for each defense diplomacy event in Russia? |
<table0>[donations] { <col0>[INT]:[donor_name] <col1>[TEXT]:[donation_amount] <col2>[FLOAT]:[donation_date] <col3>[DATE]:[INSERT] } | SELECT AVG( donation_amount ) FROM `<table0>` WHERE donation_date = '2022-11-29'; | What is the average donation amount given on Giving Tuesday? |
<table0>[table_17355408_7] { <col0>[high_points]:[VARCHAR] <col1>[team]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "@ Chicago" | @ Chicago had a high points of what?
|
<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 1 * ( STRFTIME( '%j', CURRENT_TIME( ) ) - STRFTIME( '%j', `<table10>`.charttime ) ) FROM `<table10>` WHERE `<table10>`.icustay_id IN ( SELECT `<table2>`.icustay_id FROM `<table2>` WHERE `<table2>`.hadm_id IN ( SELECT `<table15>`.hadm_id FROM `<table15>` WHERE `<table15>`.subject_id = 28443 ) AND `<table2>`.outti... | what is the amount of days it has elapsed since the first time patient 28443 had a lipids 20% intake on the current icu visit?
|
<table0>[Assessment_Notes] { <col0>[notes_id]:[INTEGER] <col1>[student_id]:[INTEGER] <col2>[teacher_id]:[INTEGER] <col3>[date_of_notes]:[DATETIME] <col4>[text_of_notes]:[VARCHAR] <col5>[255]:[other_details] <col6>[VARCHAR]:[255] } <table1>[Teachers] { <col0>[teacher_id]:[INTEGER] <col1>[address_id]:[INTEGER] <col2>[fi... | SELECT date_address_to, COUNT( `<col3>` ) FROM `<table7>` GROUP BY `<col5>` ORDER BY `<col4>` DESC | Show me about the distribution of date_address_to and the amount of date_address_to , and group by attribute other_details and bin date_address_to by weekday in a bar chart.
|
<table0>[table_name_12] { <col0>[date_to]:[VARCHAR] <col1>[name]:[VARCHAR] <col2>[date_from]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "febian brandy" AND `<col2>` = "2 february 2009" | When was febian brandy loaned out until, when was loaned out on 2 february 2009.? |
<table0>[cost] { <col0>[costid]:[number] <col1>[uniquepid]:[text] <col2>[patienthealthsystemstayid]:[number] <col3>[eventtype]:[text] <col4>[eventid]:[number] <col5>[chargetime]:[time] } <table1>[treatment] { <col0>[treatmentid]:[number] <col1>[patientunitstayid]:[number] <col2>[treatmentname]:[text] <col3>[treatmentt... | SELECT t3.`<table9>`name FROM ( SELECT t2.`<table9>`name, DENSE_RANK( ) OVER ( ORDER BY COUNT( * ) DESC ) AS c1 FROM ( SELECT patient.uniquepid, `<table4>`.`<table4>`time, patient.patienthealthsystemstayid FROM `<table4>` JOIN patient ON `<table4>`.patientunitstayid = patient.patientunitstayid WHERE `<table4>`.`<table4... | get me the top five most frequent lab tests that patients took during the same hospital encounter after being diagnosed with signs and symptoms of sepsis (sirs) - due to infectious process with organ dysfunction until 2104. |
<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 WHERE `<table0>`.admission_type = "EMERGENCY" AND diagnoses.long_title = "Urinary incontinence, unspecified" | how many patients are admitted under emergency and are diagnosed with urinary incontinence, unspecified?
|
<table0>[departments] { <col0>[DEPARTMENT_ID]:[decimal] <col1>[DEPARTMENT_NAME]:[varchar] <col2>[MANAGER_ID]:[decimal] <col3>[LOCATION_ID]:[decimal] } <table1>[locations] { <col0>[LOCATION_ID]:[decimal] <col1>[STREET_ADDRESS]:[varchar] <col2>[POSTAL_CODE]:[varchar] <col3>[CITY]:[varchar] <col4>[STATE_PROVINCE]:[varcha... | SELECT HIRE_DATE, `<col9>` FROM `<table4>` WHERE NOT `<col10>` IN ( SELECT `<col10>` FROM `<table0>` WHERE `<col9>` BETWEEN 100 AND 200 ) | For those employees who do not work in departments with managers that have ids between 100 and 200, visualize a line chart about the change of manager_id over hire_date . |
<table0>[table_23285805_6] { <col0>[score]:[VARCHAR] <col1>[record]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "15-25" | What was the score with the team record was 15-25? |
<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 `<table0>`.religion FROM `<table0>` WHERE `<table0>`.subject_id = "2560" | find the religion of subject id 2560. |
<table0>[table_204_443] { <col0>[number]:[week] <col1>[number]:[date] <col2>[text]:[opponent] <col3>[text]:[result] <col4>[text]:[game] <col5>[site]:[text] <col6>[attendance]:[number] <col7>[bye]:[text] } | SELECT "game site" FROM `<table0>` ORDER BY "attendance" DESC LIMIT 1 | name the game site with the highest number of attendance . |
<table0>[table_36307] { <col0>[Tournament]:[text] <col1>[1988]:[text] <col2>[1989]:[text] <col3>[1990]:[text] <col4>[1991]:[text] <col5>[1992]:[text] <col6>[1993]:[text] <col7>[1994]:[text] <col8>[1995]:[text] <col9>[1996]:[text] <col10>[1997]:[text] <col11>[1998]:[text] } | SELECT "1994" FROM `<table0>` WHERE "1998" = '0–1' | Which 1994 has a 1998 of 0 1? |
<table0>[table_name_13] { <col0>[winning_driver]:[VARCHAR] <col1>[pole_position]:[VARCHAR] <col2>[fastest_lap]:[VARCHAR] <col3>[constructor]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col2>` = "michael schumacher" AND `<col3>` = "ferrari" AND `<col1>` = "jenson button" | Who was the winning driver when pole position was jenson button, the fastest lap was michael schumacher and the car was ferrari? |
<table0>[table_name_38] { <col0>[attendance]:[INTEGER] <col1>[time]:[VARCHAR] } | SELECT MAX( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "2:07" | What is the attendance amount of the race with a time of 2:07? |
<table0>[Farm2Table] { <col0>[supplier_id]:[INT] <col1>[product_id]:[INT] } <table1>[Suppliers] { <col0>[supplier_id]:[INT] <col1>[supplier_name]:[VARCHAR] } <table2>[Products] { <col0>[product_id]:[INT] <col1>[product_name]:[VARCHAR] } <table3>[EcoLabels] { <col0>[eco_label_id]:[INT] <col1>[eco_label]:[VARCHAR] } ... | SELECT s.supplier_name, p.product_name, el.eco_label FROM `<table1>` s INNER JOIN Farm2Table ft ON s.supplier_id = ft.supplier_id INNER JOIN Products p ON ft.product_id = p.product_id INNER JOIN ProductEcoLabels pel ON p.product_id = pel.product_id INNER JOIN EcoLabels el ON pel.eco_label_id = el.eco_label_id; | List all suppliers and their associated products in 'Farm2Table', along with their eco-labels if applicable? |
<table0>[table_name_51] { <col0>[points_against]:[VARCHAR] <col1>[drawn]:[VARCHAR] <col2>[tries_for]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "0" AND `<col2>` = "50" | For the club that had tries of 50 and drawn of 0, what were the points? |
<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 RANK( ) OVER ( ORDER BY SUM( `<table24>`.FavoriteCount ) DESC ) AS "no.", `<table24>`.OwnerUserId AS "user_link", Users.Reputation, SUM( `<table24>`.FavoriteCount ) AS "TotalFavorites", COUNT( * ) AS "`<table24>` with favorites" FROM `<table24>` JOIN Users ON Users.Id = `<table24>`.OwnerUserId WHERE NOT `<table2... | Users by total number of favorites on their posts. |
<table0>[ReviewTaskResultTypes] { <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]:... | SELECT COUNT( DISTINCT u.Id ) FROM `<table16>` AS u, Posts AS p, PostTags AS pt, Tags AS t WHERE p.OwnerUserId = u.Id AND pt.PostId = p.Id AND pt.TagId = t.Id AND t.TagName = @Tag AND u.Reputation > @Reputation | How many users in given tag have bigger reputation than. |
<table0>[table_55421] { <col0>[Home]:[team] <col1>[text]:[Home] <col2>[team]:[score] <col3>[text]:[Away] <col4>[team]:[text] <col5>[Away]:[team] <col6>[score]:[text] <col7>[Venue]:[text] <col8>[Crowd]:[real] <col9>[Date]:[text] } | SELECT "Date" FROM `<table0>` WHERE "Away team" = 'footscray' | What day did Footscray play as the away team?
|
<table0>[table_204_337] { <col0>[number]:[festival] <col1>[text]:[year] <col2>[number]:[award] <col3>[text]:[nominee] <col4>[text]:[result] } | SELECT COUNT( * ) FROM `<table0>` WHERE "result" = 'won' | how many times have they won an award ?
|
<table0>[table_52561] { <col0>[Region]:[text] <col1>[Date]:[text] <col2>[Label]:[text] <col3>[Format]:[text] <col4>[Catalog]:[text] } | SELECT "Label" FROM `<table0>` WHERE "Date" = '1988' AND "Format" = 'cd' | What label released a CD in 1988?
|
<table0>[Manufacturers] { <col0>[Code]:[INTEGER] <col1>[VARCHAR]:[255] <col2>[Headquarter]:[VARCHAR] <col3>[255]:[Founder] <col4>[VARCHAR]:[255] <col5>[Revenue]:[REAL] } <table1>[Products] { <col0>[Code]:[INTEGER] <col1>[VARCHAR]:[255] <col2>[Price]:[DECIMAL] <col3>[Manufacturer]:[INTEGER] } | SELECT T1.Name, T1.Price FROM `<table1>` AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter, T1.Name ORDER BY T1.Name | For those records from the products and each product's manufacturer, visualize a bar chart about the distribution of name and price , and group by attribute headquarter, display from low to high by the x-axis. |
<table0>[table_203_835] { <col0>[number]:[season] <col1>[text]:[club] <col2>[text]:[country] <col3>[text]:[competition] <col4>[text]:[apps] <col5>[number]:[goals] } | SELECT "country" FROM `<table0>` GROUP BY "country" ORDER BY SUM( "goals" ) LIMIT 1 | which country has the least amount of total goals ?
|
<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>[diagnoses] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[te... | SELECT COUNT( DISTINCT `<table3>`.subject_id ) FROM `<table3>` INNER JOIN prescriptions ON `<table3>`.hadm_id = prescriptions.hadm_id WHERE `<table3>`.admission_location = "PHYS REFERRAL/NORMAL DELI" AND prescriptions.formulary_drug_cd = "CEFE1I" | count the number of patients whose admission location is phys referral/normal deli and drig code is cefe 1i. |
<table0>[table_1341884_45] { <col0>[first_elected]:[VARCHAR] <col1>[district]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "Texas 6" | how many voted in the texas 6 section
|
<table0>[table_name_28] { <col0>[date]:[VARCHAR] <col1>[home]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "columbus" | What was the date of the Capitals game when Columbus was the home team? |
<table0>[table_72059] { <col0>[Player]:[text] <col1>[Solo]:[real] <col2>[Total]:[real] <col3>[Sacks]:[text] <col4>[Fumble]:[force] <col5>[real]:[Fumble] <col6>[rec]:[real] } | SELECT MAX( "Total" ) FROM `<table0>` WHERE "Solo" > '15' | What is the high total for players with over 15 solo tackles?
|
<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>[d_icd_diagnoses] { <col0>[row_id]:[number] <col1>[icd9_code]:... | SELECT `<table4>`.charttime FROM `<table4>` WHERE `<table4>`.icd9_code = ( SELECT `<table14>`.icd9_code FROM `<table14>` WHERE `<table14>`.short_title = '2 int mam-cor art bypass' ) AND `<table4>`.hadm_id IN ( SELECT `<table8>`.hadm_id FROM `<table8>` WHERE `<table8>`.subject_id = 18159 ) AND STRFTIME( '%y', `<table4>`... | when was the last time that patient 18159 had 2 int mam-cor art bypass's since 2101?
|
<table0>[table_203_306] { <col0>[number]:[number] <col1>[title]:[text] <col2>[directed]:[text] <col3>[written]:[text] <col4>[original]:[air] <col5>[date]:[text] } | SELECT COUNT( "title" ) FROM `<table0>` WHERE "written by" = 'patrick massett & john zinman' | what are the number of titles written by patrick massett and john zinman ? |
<table0>[players] { <col0>[country_code]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` GROUP BY `<col0>` HAVING COUNT( * ) > 50 | Find the codes of countries that have more than 50 players. |
<table0>[Donations] { <col0>[INT]:[campaign_id] <col1>[INT]:[donor_id] <col2>[INT]:[DECIMAL] <col3>[donation_date]:[DATE] } | INSERT INTO Donations ( id, campaign_id, donor_id, amount, donation_date ) VALUES ( 3, 103, 1003, 150.00, '2021-03-01' ), ( 4, 104, 1004, 25.00, '2021-04-01' ); | Insert new donation records |
<table0>[table_name_71] { <col0>[decision]:[VARCHAR] <col1>[visitor]:[VARCHAR] <col2>[home]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "detroit" AND `<col2>` = "ottawa" | Who had the decision when the visitor was Detroit and the home team was Ottawa?
|
<table0>[table_name_58] { <col0>[record]:[VARCHAR] <col1>[date]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "july 22" | What was their record on July 22?
|
<table0>[company] { <col0>[main_industry]:[VARCHAR] } | SELECT DISTINCT `<col0>` FROM `<table0>` | Show all main industry for all companies.
|
<table0>[table_30039] { <col0>[Semitological]:[abbreviation] <col1>[text]:[Hebrew] <col2>[name]:[text] <col3>[Arabic]:[name] <col4>[text]:[Morphological] <col5>[category]:[text] <col6>[Hebrew]:[Form] <col7>[text]:[Arabic] <col8>[form]:[text] <col9>[Approximate]:[translation] } | SELECT COUNT( "Arabic form" ) FROM `<table0>` WHERE "Morphological category" = '1st. plur. perfect' | How many Arabic forms are there for the 1st. plur. perfect category?
|
<table0>[table_18373863_2] { <col0>[mlb_team]:[VARCHAR] <col1>[fcsl_team]:[VARCHAR] } | SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "Winter Pines" | When winter pines is the fcsl team how many mlb teams are there?
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.