schema stringlengths 20 14.6k | query stringlengths 17 2.58k | question stringlengths 8 1.06k |
|---|---|---|
<table0>[medication] { <col0>[medicationid]:[number] <col1>[patientunitstayid]:[number] <col2>[drugname]:[text] <col3>[dosage]:[text] <col4>[routeadmin]:[text] <col5>[drugstarttime]:[time] <col6>[drugstoptime]:[time] } <table1>[diagnosis] { <col0>[diagnosisid]:[number] <col1>[patientunitstayid]:[number] <col2>[diagnos... | SELECT t1.celllabel FROM ( SELECT `<table5>`.celllabel, DENSE_RANK( ) OVER ( ORDER BY COUNT( * ) DESC ) AS c1 FROM `<table5>` WHERE `<table5>`.cellpath LIKE '%intake%' GROUP BY `<table5>`.celllabel ) AS t1 WHERE t1.c1 <= 5 | what were the top five most frequent inputs event?
|
<table0>[table_name_41] { <col0>[score]:[VARCHAR] <col1>[opponent_in_the_final]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "olivier delaître" | What is the score of the tournament with olivier dela tre as the opponent in the final? |
<table0>[table_204_937] { <col0>[number]:[rank] <col1>[number]:[lane] <col2>[number]:[athlete] <col3>[text]:[time] } | SELECT "time" FROM `<table0>` WHERE "rank" = 5 | how long did it take the fifth place finisher to run the race ?
|
<table0>[national_security_events_impact] { <col0>[INT]:[event] <col1>[VARCHAR]:[impact] <col2>[VARCHAR]:[INSERT] } | SELECT event, impact, MIN( CASE WHEN impact = 'Low' THEN 1 ELSE 0 END ) OVER ( ) as min_impact FROM national_security_events_impact; | Show the national security events and their impact levels, and calculate the minimum impact level. |
<table0>[table_204_741] { <col0>[number]:[rank] <col1>[number]:[name] <col2>[text]:[nationality] <col3>[text]:[text] <col4>[text]:[text] <col5>[text]:[notes] } | SELECT "rank" FROM `<table0>` WHERE "rank" IN ( 11, 6 ) GROUP BY "rank" ORDER BY COUNT( "name" ) DESC LIMIT 1 | were there more names ranked 11th or 6th ?
|
<table0>[table_name_74] { <col0>[number]:[INTEGER] <col1>[opponent]:[VARCHAR] } | SELECT MAX( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "julio césar vásquez" | What is the highest number of the match with julio césar vásquez as the opponent? |
<table0>[PostNotices] { <col0>[number]:[PostId] <col1>[number]:[PostNoticeTypeId] <col2>[number]:[CreationDate] <col3>[time]:[DeletionDate] <col4>[time]:[ExpiryDate] <col5>[time]:[Body] <col6>[text]:[OwnerUserId] <col7>[number]:[DeletionUserId] } <table1>[ReviewTaskResults] { <col0>[number]:[ReviewTaskId] <col1>[numbe... | SELECT COUNT( * ) FROM `<table4>` WHERE Reputation >= 3000 | Total de perguntas vs total fechadas.
|
<table0>[military_sales] { <col0>[INT]:[year] <col1>[INT]:[region] <col2>[VARCHAR]:[equipment_type] <col3>[VARCHAR]:[value] <col4>[FLOAT]:[INSERT] } | SELECT AVG( value ) FROM `<table0>` WHERE year = 2021 AND region = 'Asia'; | What was the average value of military equipment sales to the Asian region in 2021? |
<table0>[class_of_service] { <col0>[booking_class]:[varchar] <col1>[rank]:[int] <col2>[class_description]:[text] } <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 compartment, meal_code, `<col1>` FROM `<table4>` WHERE `<col0>` IN ( SELECT FLIGHTalias0.meal_code FROM `<table10>` AS FLIGHTalias0 WHERE ( FLIGHTalias0.airline_code = 'FF' ) ) | are meals ever served on FF |
<table0>[table_52831] { <col0>[text]:[Species] <col1>[text]:[Overview] <col2>[text]:[Introduced] <col3>[text]:[Feral] <col4>[text]:[Threat] <col5>[level]:[text] } | SELECT "Threat level" FROM `<table0>` WHERE "Overview" = 'rabbits in australia' | What is the Threat Levels with Rabbits in Australia?
|
<table0>[table_name_90] { <col0>[type]:[VARCHAR] <col1>[fleet_numbers]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "2–8, 91–92, 97–100" | Which Type has a Fleet numbers of 2–8, 91–92, 97–100? |
<table0>[table_19602] { <col0>[Year]:[real] <col1>[Tournaments]:[played] <col2>[real]:[Cuts] <col3>[real]:[Wins] <col4>[real]:[2nd] <col5>[real]:[3rd] <col6>[real]:[10s] <col7>[real]:[Best] <col8>[finish]:[text] <col9>[Earnings]:[real] <col10>[Money]:[list] <col11>[rank]:[text] <col12>[Scoring]:[average] <col13>[text]:... | SELECT MAX( "Cuts made" ) FROM `<table0>` WHERE "Best finish" = 'T4' | What is the highest number of cuts made when her best finish is t4?
|
<table0>[table_203_52] { <col0>[number]:[pos] <col1>[text]:[number] <col2>[driver]:[text] <col3>[constructor]:[text] <col4>[laps]:[number] <col5>[time]:[retired] <col6>[text]:[grid] <col7>[number]:[points] } | SELECT COUNT( "driver" ) FROM `<table0>` WHERE "laps" >= 45 | how many drivers completed at least 45 laps ? |
<table0>[table_24037660_2] { <col0>[gtc_winning_team]:[VARCHAR] <col1>[lmp_winning_team]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "#8 Drayson Racing" | What was the gtc winning team when lmp winning team was #8 drayson racing? |
<table0>[carbon_offsets] { <col0>[INT]:[PRIMARY] <col1>[KEY]:[program_name] <col2>[VARCHAR]:[100] <col3>[country]:[VARCHAR] <col4>[tons_offset]:[INT] } | INSERT INTO carbon_offsets ( id, program_name, country, tons_offset ) VALUES ( 5001, 'Renewable Forests', 'Canada', 50000 ); | Add a new record to the 'carbon_offsets' table with id 5001, program_name 'Renewable Forests', country 'Canada', and tons_offset 50000 |
<table0>[CREATE] { <col0>[SCHEMA]:[exists] <col1>[engineering]:[USE] } <table1>[exists] { <col0>[bioprocess]:[INT] <col1>[PRIMARY]:[KEY] <col2>[location]:[VARCHAR] <col3>[255]:[efficiency] <col4>[DECIMAL]:[INSERT] <col5>[bioprocess]:[location] <col6>[efficiency]:[VALUES] <col7>[Germany]:[Germany] <col8>[USA]:[USA] } | SELECT MAX( efficiency ) FROM engineering.bioprocess WHERE location = 'Germany'; | What is the maximum bioprocess efficiency achieved in Germany? |
<table0>[paperdataset] { <col0>[paperid]:[int] <col1>[datasetid]:[int] } <table1>[paper] { <col0>[paperid]:[int] <col1>[title]:[varchar] <col2>[venueid]:[int] <col3>[year]:[int] <col4>[numciting]:[int] <col5>[numcitedby]:[int] <col6>[journalid]:[int] } <table2>[writes] { <col0>[paperid]:[int] <col1>[authorid]:[int] ... | SELECT DISTINCT writes.authorid FROM paper, venue, writes WHERE venue.venueid = paper.venueid AND venue.venuename = 'NIPS' AND writes.paperid = paper.paperid | who authored papers at NIPS ?
|
<table0>[teachers] { <col0>[INT]:[country] } <table1>[courses] { <col0>[INT]:[teacher_id] } <table2>[course_completions] { <col0>[course_id]:[INT] <col1>[completion_date]:[DATE] } | SELECT `<table0>`.country, COUNT( DISTINCT courses.id ) as courses_completed FROM `<table0>` INNER JOIN courses ON `<table0>`.id = courses.teacher_id INNER JOIN course_completions ON courses.id = course_completions.course_id GROUP BY `<table0>`.country; | How many professional development courses were completed by teachers from each country? |
<table0>[Courses] { <col0>[course_id]:[INTEGER] <col1>[author_id]:[INTEGER] <col2>[subject_id]:[INTEGER] <col3>[course_name]:[VARCHAR] <col4>[120]:[course_description] <col5>[VARCHAR]:[255] } <table1>[Students] { <col0>[student_id]:[INTEGER] <col1>[date_of_registration]:[DATETIME] <col2>[date_of_latest_logon]:[DATETIM... | SELECT personal_name, `<col7>` FROM `<table5>` ORDER BY `<col4>` | A bar chart shows the distribution of personal_name and gender_mf .
|
<table0>[table_name_1] { <col0>[wins]:[INTEGER] <col1>[year]:[VARCHAR] <col2>[team]:[VARCHAR] <col3>[points]:[VARCHAR] <col4>[class]:[VARCHAR] } | SELECT MAX( `<col0>` ) FROM `<table0>` WHERE `<col3>` < 5 AND `<col4>` = "500cc" AND `<col2>` = "norton" AND `<col1>` > 1955 | What is the largest amount of wins when there are less than 5 points, the class is 500cc, the team is norton, and the year is more recent than 1955? |
<table0>[Budget_Allocation] { <col0>[allocation_id]:[INT] <col1>[PRIMARY]:[KEY] <col2>[category]:[VARCHAR] <col3>[255]:[FLOAT] <col4>[fiscal_year]:[INT] <col5>[FOREIGN]:[KEY] <col6>[category]:[REFERENCES] <col7>[Parks]:[name] } <table1>[Parks] { <col0>[park_id]:[INT] <col1>[PRIMARY]:[KEY] <col2>[name]:[VARCHAR] <col3>... | SELECT SUM( amount ) FROM `<table0>` WHERE `<col4>` = 2021 AND `<col2>` IN ( SELECT `<col2>` FROM `<col7>` ); | Display the total budget allocated for public parks in 2021 |
<table0>[table_72320] { <col0>[Episode]:[title] <col1>[text]:[Air] <col2>[date]:[text] <col3>[Reward]:[text] <col4>[Immunity]:[text] <col5>[Eliminated]:[text] <col6>[Vote]:[text] <col7>[Finish]:[text] } | SELECT "Episode title" FROM `<table0>` WHERE "Eliminated" = 'Jenn' | What is the name of the episode in which Jenn is eliminated?
|
<table0>[CoOwnedProperties] { <col0>[PropertyID]:[int] <col1>[Price]:[int] <col2>[Borough]:[varchar] <col3>[255]:[INSERT] } | SELECT SUM( `<col1>` ) as TotalPrice FROM `<table0>` WHERE `<col2>` = 'Staten Island'; | What is the total price of all co-owned properties in Staten Island? |
<table0>[table_name_34] { <col0>[attendance]:[VARCHAR] <col1>[date]:[VARCHAR] <col2>[week]:[VARCHAR] } | SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "december 13, 1970" AND `<col2>` > 13 | What was the attendance of the game on December 13, 1970?
|
<table0>[microlab] { <col0>[microlabid]:[number] <col1>[patientunitstayid]:[number] <col2>[culturesite]:[text] <col3>[organism]:[text] <col4>[culturetakentime]:[time] } <table1>[vitalperiodic] { <col0>[vitalperiodicid]:[number] <col1>[patientunitstayid]:[number] <col2>[temperature]:[number] <col3>[sao2]:[number] <col4... | SELECT COUNT( * ) > 0 FROM `<table9>` WHERE `<table9>`.`<table6>`unitstayid IN ( SELECT `<table6>`.`<table6>`unitstayid FROM `<table6>` WHERE `<table6>`.`<table6>`healthsystemstayid IN ( SELECT `<table6>`.`<table6>`healthsystemstayid FROM `<table6>` WHERE `<table6>`.uniquepid = '021-32860' ) ) AND `<table9>`.drugname =... | in 05/last year was lasix prescribed to patient 021-32860?
|
<table0>[table_name_23] { <col0>[rank]:[INTEGER] <col1>[time]:[VARCHAR] } | SELECT SUM( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "1:40.626" | What is the rank if the person with a time of 1:40.626? |
<table0>[table_name_20] { <col0>[home_team]:[VARCHAR] <col1>[venue]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "corio oval" | Who was the home team for the game played at Corio Oval?
|
<table0>[family_farms] { <col0>[INT]:[region] <col1>[VARCHAR]:[crop] } | SELECT COUNT( DISTINCT crop ) FROM `<table0>` WHERE region = '06'; | How many crops are grown in 'family_farms' table for region '06'? |
<table0>[treatment] { <col0>[treatmentid]:[number] <col1>[patientunitstayid]:[number] <col2>[treatmentname]:[text] <col3>[treatmenttime]:[time] } <table1>[allergy] { <col0>[allergyid]:[number] <col1>[patientunitstayid]:[number] <col2>[drugname]:[text] <col3>[allergyname]:[text] <col4>[allergytime]:[time] } <table2>[v... | SELECT COUNT( DISTINCT `<table9>`.uniquepid ) FROM `<table9>` WHERE `<table9>`.`<table9>`unitstayid IN ( SELECT `<table7>`.`<table9>`unitstayid FROM `<table7>` WHERE `<table7>`.drugname = 'furosemide inj' AND STRFTIME( '%y', `<table7>`.drugstarttime ) = '2100' ) | how many patients in 2100 were prescribed furosemide inj? |
<table0>[table_70543] { <col0>[Production]:[year] <col1>[text]:[2001] <col2>[real]:[2002] <col3>[real]:[2003] <col4>[real]:[2004] <col5>[real]:[2005] <col6>[real]:[2006] <col7>[real]:[2007] <col8>[real]:[2008] <col9>[real]:[2009] <col10>[real]:[2010] <col11>[real]:[2011] } | SELECT AVG( "2006" ) FROM `<table0>` WHERE "Production year" = 'wheat' AND "2005" > '7340' | What is the average 2006 value for wheat with a 2005 value greater than 7340?
|
<table0>[table_55259] { <col0>[Date]:[text] <col1>[Tournament]:[text] <col2>[Surface]:[text] <col3>[Opponent]:[final] <col4>[text]:[Score] } | SELECT "Tournament" FROM `<table0>` WHERE "Score" = '6–4, 4–6, 7–5' | Which tournament had a score of 6 4, 4 6, 7 5?
|
<table0>[table_name_59] { <col0>[total]:[INTEGER] <col1>[silver]:[VARCHAR] <col2>[gold]:[VARCHAR] } | SELECT AVG( `<col0>` ) FROM `<table0>` WHERE `<col1>` > 6 AND `<col2>` < 8 | Which nation has more than 6 Silver medals and fewer than 8 Gold medals? |
<table0>[table_name_37] { <col0>[away_team]:[VARCHAR] <col1>[home_team]:[VARCHAR] } | SELECT `<col0>` AS score FROM `<table0>` WHERE `<col1>` = "footscray" | What did the away team score when playing Footscray? |
<table0>[table_204_39] { <col0>[number]:[number] <col1>[number]:[symbol] <col2>[text]:[name] <col3>[text]:[21st] <col4>[number]:[22nd] <col5>[number]:[23rd] <col6>[number]:[24th] <col7>[number]:[25th] <col8>[number]:[26th] <col9>[number]:[27th] <col10>[number]:[28th] <col11>[number]:[29th] <col12>[number]:[30th] } | SELECT COUNT( "name" ) FROM `<table0>` WHERE "number" > 25 | how many elements have data that is below the 25th ? |
<table0>[peacekeeping_operations] { <col0>[operation_id]:[INT] <col1>[operation_name]:[TEXT] <col2>[start_date]:[DATE] <col3>[end_date]:[DATE] <col4>[troops_involved]:[INT] <col5>[partner_organization]:[TEXT] } | SELECT SUM( `<table0>`.troops_involved ) FROM `<table0>` WHERE `<table0>`.partner_organization = 'African Union' AND `<table0>`.start_date <= CURDATE( ) AND ( `<table0>`.end_date IS NULL OR `<table0>`.end_date > CURDATE( ) ); | What is the total number of troops involved in joint peacekeeping operations with the African Union? |
<table0>[table_75897] { <col0>[Team]:[text] <col1>[Year]:[2007] <col2>[real]:[Year] <col3>[2006]:[real] <col4>[Year]:[2005] <col5>[real]:[Change] } | SELECT "Team" FROM `<table0>` WHERE "Year 2007" > '15,710' AND "Year 2006" > '17,666' AND "Year 2005" > '22,532' | What is the Team, when the Year 2007 is greater than 15,710, when the Year 2006 is greater than 17,666, and when the Year 2005 is greater than 22,532? |
<table0>[table_11959669_4] { <col0>[location_attendance]:[VARCHAR] <col1>[high_points]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "Pierce ( 22 )" | What was the location attendance when High points was by Pierce (22)?
|
<table0>[table_name_79] { <col0>[date]:[VARCHAR] <col1>[week]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = 16 | What was the date of the week 16 game? |
<table0>[menus] { <col0>[menu_id]:[INT] <col1>[item]:[VARCHAR] <col2>[255]:[category] <col3>[VARCHAR]:[255] <col4>[is_meat]:[BOOLEAN] <col5>[price]:[DECIMAL] } <table1>[sales] { <col0>[sale_id]:[INT] <col1>[menu_id]:[INT] <col2>[quantity]:[INT] <col3>[country]:[VARCHAR] } | SELECT s.country, SUM( CASE WHEN m.is_meat = true THEN s.quantity ELSE 0 END ) as total_meat_quantity, SUM( CASE WHEN m.is_meat = false THEN s.quantity ELSE 0 END ) as total_non_meat_quantity FROM `<table1>` s INNER JOIN menus m ON s.menu_id = m.menu_id GROUP BY s.country; | What is the total quantity of meat and non-meat entrees sold in each country? |
<table0>[has_allergy] { <col0>[stuid]:[number] <col1>[allergy]:[text] } <table1>[allergy_type] { <col0>[allergy]:[text] <col1>[allergytype]:[text] } <table2>[student] { <col0>[stuid]:[number] <col1>[lname]:[text] <col2>[fname]:[text] <col3>[age]:[number] <col4>[sex]:[text] <col5>[major]:[number] <col6>[advisor]:[numb... | SELECT COUNT( * ) FROM `<table0>` AS T1 JOIN allergy_type AS T2 ON T1.allergy = T2.allergy WHERE T2.allergytype = "food" | How many students are affected by food related allergies?
|
<table0>[table_204_500] { <col0>[number]:[year] <col1>[number]:[title] <col2>[text]:[peak] <col3>[chart]:[positions] <col4>[nus]:[country] <col5>[number]:[peak] <col6>[chart]:[positions] <col7>[nus]:[number] <col8>[album]:[text] } | SELECT "album" FROM `<table0>` GROUP BY "album" ORDER BY COUNT( "title" ) DESC LIMIT 1 | which kitty wells album had the most singles released ? |
<table0>[employees] { <col0>[employee_id]:[INT] <col1>[department]:[VARCHAR] <col2>[community]:[VARCHAR] } | SELECT department, community, COUNT( * ) FROM `<table0>` GROUP BY department, `<col2>` | What is the number of employees from underrepresented communities in each department? |
<table0>[d_icd_procedures] { <col0>[row_id]:[number] <col1>[icd9_code]:[text] <col2>[short_title]:[text] <col3>[long_title]:[text] } <table1>[labevents] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[itemid]:[number] <col4>[charttime]:[time] <col5>[valuenum]:[number] <col6>[value... | SELECT t3.spec_type_desc FROM ( SELECT t2.spec_type_desc, DENSE_RANK( ) OVER ( ORDER BY COUNT( * ) DESC ) AS c1 FROM ( SELECT admissions.subject_id, `<table14>`.charttime FROM `<table14>` JOIN admissions ON `<table14>`.hadm_id = admissions.hadm_id WHERE `<table14>`.icd9_code = ( SELECT `<table0>`.icd9_code FROM `<table... | what were the top three most common microbiological tests that followed within the same month for patients who were given left heart cardiac cath? |
<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 COUNT( * ) > 0 FROM `<table8>` WHERE `<table8>`.`<table6>`unitstayid IN ( SELECT `<table6>`.`<table6>`unitstayid FROM `<table6>` WHERE `<table6>`.`<table6>`healthsystemstayid IN ( SELECT `<table6>`.`<table6>`healthsystemstayid FROM `<table6>` WHERE `<table6>`.uniquepid = '004-79017' AND `<table6>`.hospitaldischa... | has patient 004-79017 received any diagnoses during the current hospital encounter? |
<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 lab ON `<table0>`.hadm_id = lab.hadm_id WHERE `<table0>`.admission_type = "NEWBORN" AND lab.label = "Thyroxine ( T4 )" | count the number of patients whose admission type is newborn and lab test name is thyroxine (t4)?
|
<table0>[table_name_62] { <col0>[silver]:[VARCHAR] <col1>[total]:[VARCHAR] <col2>[bronze]:[VARCHAR] } | SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` < 6 AND `<col2>` < 0 | How many silvers for the nation with under 6 total and under 0 bronze?
|
<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>`.gender = "F" AND diagnoses.long_title = "Benzodiazepine-based tranquilizers causing adverse effects in therapeutic use" | how many female patients have benzodiazepine-based tranquilizers causing adverse effects in therapeutic use diagnoses?
|
<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 procedures.short_title FROM `<table1>` INNER JOIN procedures ON `<table1>`.hadm_id = procedures.hadm_id WHERE `<table1>`.name = "Jerry Deberry" | let me know the short title of procedure that the patient jerry deberry underwent.
|
<table0>[table_52740] { <col0>[Date]:[text] <col1>[Visitor]:[text] <col2>[Score]:[text] <col3>[Home]:[text] <col4>[Decision]:[text] <col5>[Attendance]:[real] <col6>[Record]:[text] } | SELECT "Date" FROM `<table0>` WHERE "Decision" = 'turco' AND "Home" = 'st. louis' | Name the date for turco decision and home of st. louis
|
<table0>[table_name_96] { <col0>[country]:[VARCHAR] <col1>[builder]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "palmers shipbuilding and iron company" | What is the country of Palmers Shipbuilding and Iron Company? |
<table0>[table_train_199] { <col0>[int]:[bool] <col1>[hemoglobin_a1c_hba1c]:[float] <col2>[renal_disease]:[bool] <col3>[diabetic]:[string] <col4>[hypoglycemia]:[bool] <col5>[diabetes]:[bool] <col6>[seizure_disorder]:[bool] <col7>[glaucoma]:[bool] <col8>[hypertension]:[bool] <col9>[age]:[float] <col10>[NOUSE]:[float] }... | SELECT * FROM `<table0>` WHERE `<col2>` = 1 AND ( `<col5>` = 0 AND `<col8>` = 0 ) | patients with renal disease not caused by diabetes or hypertension.
|
<table0>[table_name_95] { <col0>[loans_received]:[VARCHAR] <col1>[VARCHAR]:[total_receipts] } | SELECT loans_received, _2q FROM `<table0>` WHERE total_receipts = "$25,328,694" | Name the loans received for 2Q having total receipts of $25,328,694 |
<table0>[d_icd_diagnoses] { <col0>[row_id]:[number] <col1>[icd9_code]:[text] <col2>[short_title]:[text] <col3>[long_title]:[text] } <table1>[d_items] { <col0>[row_id]:[number] <col1>[itemid]:[number] <col2>[label]:[text] <col3>[linksto]:[text] } <table2>[inputevents_cv] { <col0>[row_id]:[number] <col1>[subject_id]:[n... | SELECT DISTINCT `<table6>`.`<table6>` FROM `<table6>` WHERE `<table6>`.event_type = '`<table12>`' AND `<table6>`.event_id IN ( SELECT `<table12>`.row_id FROM `<table12>` WHERE `<table12>`.icd9_code = ( SELECT `<table8>`.icd9_code FROM `<table8>` WHERE `<table8>`.short_title = 'dilation of intestine' ) ) | tell me the cost of the dilation of intestine? |
<table0>[Warehouses] { <col0>[WarehouseID]:[int] <col1>[WarehouseName]:[varchar] <col2>[255]:[City] <col3>[varchar]:[255] <col4>[Country]:[varchar] <col5>[255]:[INSERT] } <table1>[Inventory] { <col0>[InventoryID]:[int] <col1>[WarehouseID]:[int] <col2>[ProductName]:[varchar] <col3>[255]:[Quantity] <col4>[int]:[INSERT] ... | SELECT ProductName, SUM( Quantity ) AS TotalQuantity FROM `<table1>` WHERE `<col1>` = 4 GROUP BY ProductName; | What is the total quantity of each product in the Sydney warehouse? |
<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 procedures ON `<table0>`.hadm_id = procedures.hadm_id WHERE `<table0>`.ethnicity = "AMERICAN INDIAN/ALASKA NATIVE" AND procedures.icd9_code = "5101" | Get me the number of american indian or alaska native patients who have procedure icd9 code 5101.
|
<table0>[icustays] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[first_careunit]:[text] <col5>[last_careunit]:[text] <col6>[first_wardid]:[number] <col7>[last_wardid]:[number] <col8>[intime]:[time] <col9>[outtime]:[time] } <table1>[procedures_icd] { <... | SELECT `<table4>`.charttime FROM `<table4>` WHERE `<table4>`.icustay_id IN ( SELECT `<table0>`.icustay_id FROM `<table0>` WHERE `<table0>`.hadm_id IN ( SELECT `<table12>`.hadm_id FROM `<table12>` WHERE `<table12>`.subject_id = 3267 ) ) AND DATETIME( `<table4>`.charttime ) <= DATETIME( CURRENT_TIME( ), '-1545 day' ) ORD... | when was the first intake time of patient 3267 until 1545 days ago. |
<table0>[table_name_9] { <col0>[points]:[INTEGER] <col1>[place]:[VARCHAR] <col2>[position]:[VARCHAR] } | SELECT MIN( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "3rd" AND `<col2>` > 8 | Who had the smallest points in 3rd place but had a position greater than 8?
|
<table0>[table_name_90] { <col0>[code_name]:[VARCHAR] <col1>[distribution]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "20.6%" | with distribution of 20.6% what is the code name? |
<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 Headquarter, SUM( `<col2>` ) FROM `<table1>` AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter ORDER BY Headquarter DESC | For those records from the products and each product's manufacturer, find headquarter and the sum of price , and group by attribute headquarter, and visualize them by a bar chart, order by the x axis in descending please. |
<table0>[tree_data] { <col0>[species]:[VARCHAR] <col1>[255]:[height] } | SELECT species, MIN( height ) AS min_height, MAX( height ) AS max_height FROM `<table0>` GROUP BY species; | What is the maximum and minimum tree height for each species? |
<table0>[table_name_49] { <col0>[position]:[VARCHAR] <col1>[round]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = 22 | What was the position of the player who was picked in round 22? |
<table0>[building_energy] { <col0>[state]:[VARCHAR] <col1>[255]:[efficiency] <col2>[FLOAT]:[INSERT] } | SELECT state, AVG( efficiency ) AS avg_efficiency FROM `<table0>` GROUP BY state; | What is the average energy efficiency for buildings in each state? |
<table0>[diagnoses_icd] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icd9_code]:[text] <col4>[charttime]:[time] } <table1>[d_icd_procedures] { <col0>[row_id]:[number] <col1>[icd9_code]:[text] <col2>[short_title]:[text] <col3>[long_title]:[text] } <table2>[chartevents] { <col0>... | SELECT `<table3>`.charttime FROM `<table3>` WHERE `<table3>`.icd9_code = ( SELECT `<table1>`.icd9_code FROM `<table1>` WHERE `<table1>`.short_title = 'dx ultrasound-thorax nec' ) AND `<table3>`.hadm_id IN ( SELECT `<table10>`.hadm_id FROM `<table10>` WHERE `<table10>`.subject_id = 10539 AND NOT `<table10>`.dischtime IS... | the first time when they visited the hospital last time patient 10539 received a dx ultrasound-thorax nec treatment?
|
<table0>[CloseReasonTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table1>[PostNoticeTypes] { <col0>[number]:[ClassId] <col1>[number]:[text] <col2>[Body]:[text] <col3>[IsHidden]:[boolean] <col4>[Predefined]:[boolean] <col5>[PostNoticeDurationId]:[number] } <table2>[Votes] { <col0>[number]:[PostId] <col1... | SELECT * FROM Posts, PostHistory WHERE Posts.Id = '35314' AND PostHistory.PostId = '35314' | post and posthistory details for `35314` post id.
|
<table0>[table_name_3] { <col0>[position]:[VARCHAR] <col1>[player]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "jj gagiano" | What position for jj gagiano? |
<table0>[d_icd_procedures] { <col0>[row_id]:[number] <col1>[icd9_code]:[text] <col2>[short_title]:[text] <col3>[long_title]:[text] } <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]:[text]... | SELECT `<table10>`.dose_val_rx FROM `<table10>` WHERE `<table10>`.hadm_id IN ( SELECT `<table15>`.hadm_id FROM `<table15>` WHERE `<table15>`.subject_id = 18866 AND `<table15>`.dischtime IS NULL ) AND `<table10>`.drug = 'ipratropium bromide neb' ORDER BY `<table10>`.startdate LIMIT 1 | what was the first dose of ipratropium bromide neb on the current hospital visit, prescribed to patient 18866? |
<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 prescriptions ON `<table1>`.hadm_id = prescriptions.hadm_id INNER JOIN lab ON `<table1>`.hadm_id = lab.hadm_id WHERE prescriptions.formulary_drug_cd = "ENOX80I" AND lab."CATEGORY" = "Blood Gas" | among patients tested for blood gas, how many of them had received drug code enox80i? |
<table0>[d_icd_diagnoses] { <col0>[row_id]:[number] <col1>[icd9_code]:[text] <col2>[short_title]:[text] <col3>[long_title]:[text] } <table1>[cost] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[event_type]:[text] <col4>[event_id]:[number] <col5>[chargetime]:[time] } <table2>[adm... | SELECT COUNT( * ) > 0 FROM `<table10>` WHERE `<table10>`.hadm_id IN ( SELECT `<table2>`.hadm_id FROM `<table2>` WHERE `<table2>`.subject_id = 63676 ) AND `<table10>`.spec_type_desc = 'swab' AND STRFTIME( '%y', `<table10>`.charttime ) >= '2105' | has there been any swab microbiology test since 2105 for patient 63676? |
<table0>[table_16127] { <col0>[real]:[real] <col1>[Title]:[text] <col2>[Director]:[text] <col3>[Writer]:[text] <col4>[air]:[date] <col5>[text]:[Storyteller] <col6>[text]:[Villains] } | SELECT "Title" FROM `<table0>` WHERE "Storyteller" = 'Kiki' AND "Director" = 'Will Dixon' | What is the name of the episode told by Kiki and directed by Will Dixon?
|
<table0>[jyjgzbb] { <col0>[BGDH]:[text] <col1>[BGRQ]:[time] <col2>[CKZFWDX]:[text] <col3>[CKZFWSX]:[number] <col4>[CKZFWXX]:[number] <col5>[JCFF]:[text] <col6>[JCRGH]:[text] <col7>[JCRXM]:[text] <col8>[JCXMMC]:[text] <col9>[JCZBDM]:[text] <col10>[JCZBJGDL]:[number] <col11>[JCZBJGDW]:[text] <col12>[JCZBJGDX]:[text] <col... | SELECT jyjgzbb.JCRGH, jyjgzbb.JCRXM FROM `<table1>` JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb ON `<table1>`.YLJGDM = mzjzjlb.YLJGDM AND `<table1>`.KH = mzjzjlb.KH AND `<table1>`.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGD... | 哪些工号及姓名的医务人员在患者魏乐志就诊过程中为他检测指标977450的,时间是从一二年九月十七日到二一年五月十七日
|
<table0>[Artists] { <col0>[INT]:[artist_name] <col1>[VARCHAR]:[255] <col2>[gender]:[VARCHAR] <col3>[ethnicity]:[VARCHAR] } <table1>[Artworks] { <col0>[INT]:[artist_id] <col1>[INT]:[artwork_name] <col2>[VARCHAR]:[255] <col3>[year_created]:[INT] <col4>[INSERT]:[Artists] <col5>[artist_name]:[gender] <col6>[ethnicity]:[VA... | SELECT COUNT( * ) FROM `<table0>` A INNER JOIN Artworks B ON A.id = B.artist_id WHERE A.gender = 'Female' AND A.ethnicity = 'African American'; | How many artworks were created by 'Female African American' artists? |
<table0>[table_77176] { <col0>[Season]:[real] <col1>[League]:[text] <col2>[Finish]:[text] <col3>[Wins]:[real] <col4>[Losses]:[real] <col5>[Ties]:[real] } | SELECT COUNT( "Losses" ) FROM `<table0>` WHERE "Ties" < '0' | What is the number of losses when the ties are lesser than 0?
|
<table0>[players] { <col0>[INT]:[name] <col1>[VARCHAR]:[255] <col2>[country]:[VARCHAR] <col3>[255]:[email] <col4>[VARCHAR]:[255] } | UPDATE players SET email = CONCAT( SUBSTRING_INDEX( email, '@', 1 ), '_uk', '@example.com' ) WHERE country = 'UK'; | Update the email addresses of players living in the UK. |
<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 Team_Name, `<col8>` FROM `<table1>` | Visualize a pie chart about the proportion of Team_Name and All_Games_Percent.
|
<table0>[Classification] { <col0>[GeneID]:[text] <col1>[Localization]:[text] } <table1>[Genes] { <col0>[GeneID]:[text] <col1>[Essential]:[text] <col2>[Class]:[text] <col3>[Complex]:[text] <col4>[Phenotype]:[text] <col5>[Motif]:[text] <col6>[Chromosome]:[integer] <col7>[Function]:[text] <col8>[Localization]:[text] } <... | SELECT T1.Function FROM `<table1>` AS T1 INNER JOIN Interactions AS T2 ON T1.GeneID = T2.GeneID1 ORDER BY T2.Expression_Corr ASC LIMIT 1 | What are the functions of the pair of genes that have the lowest expression correlation score?a |
<table0>[Order_Items] { <col0>[item_id]:[INTEGER] <col1>[order_item_status_code]:[VARCHAR] <col2>[order_id]:[INTEGER] <col3>[product_id]:[INTEGER] <col4>[item_status_code]:[VARCHAR] <col5>[item_delivered_datetime]:[DATETIME] <col6>[item_order_quantity]:[VARCHAR] } <table1>[Premises] { <col0>[premise_id]:[INTEGER] <col... | SELECT premises_type, COUNT( * ) FROM `<table1>` GROUP BY `<col1>` | Show each premise type and the number of premises in that type. Visualize by bar chart.
|
<table0>[table_56328] { <col0>[Round]:[text] <col1>[Pick]:[text] <col2>[Player]:[text] <col3>[Position]:[text] <col4>[Nationality]:[text] <col5>[Team]:[text] <col6>[College]:[text] } | SELECT "Player" FROM `<table0>` WHERE "Team" = 'fort wayne pistons' AND "Position" = 'f' | Who is the player that plays position f from Fort Wayne Pistons?
|
<table0>[CommunityHealthWorkers] { <col0>[WorkerID]:[INT] <col1>[Age]:[INT] <col2>[Ethnicity]:[VARCHAR] <col3>[255]:[INSERT] } | SELECT Ethnicity, AVG( `<col1>` ) as AvgAge FROM `<table0>` GROUP BY Ethnicity; | What is the average age of community health workers by their ethnicity? |
<table0>[students] { <col0>[student_id]:[number] <col1>[date_of_registration]:[time] <col2>[date_of_latest_logon]:[time] <col3>[login_name]:[text] <col4>[password]:[text] <col5>[personal_name]:[text] <col6>[middle_name]:[text] <col7>[family_name]:[text] } <table1>[course_authors_and_tutors] { <col0>[author_id]:[number... | SELECT `<col2>` FROM `<table1>` INTERSECT SELECT `<col2>` FROM `<table0>` | What are the login names used both by some course authors and some students? |
<table0>[table_2182562_2] { <col0>[position]:[VARCHAR] <col1>[avg_finish]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "21.5" | What was the position of the team with an average finish of 21.5? |
<table0>[diagnoses_icd] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icd9_code]:[text] <col4>[charttime]:[time] } <table1>[microbiologyevents] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[charttime]:[time] <col4>[spec_type_desc]:[text] <... | SELECT COUNT( DISTINCT t1.subject_id ) FROM ( SELECT admissions.subject_id, `<table0>`.charttime FROM `<table0>` JOIN admissions ON `<table0>`.hadm_id = admissions.hadm_id WHERE `<table0>`.icd9_code = ( SELECT `<table3>`.icd9_code FROM `<table3>` WHERE `<table3>`.short_title = 'ventltr assoc pneumonia' ) AND STRFTIME( ... | count the number of patients who have had a aortcor bypas-4+ cor art procedure during the same month after having been diagnosed in 2105 with ventltr assoc pneumonia.
|
<table0>[patients] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[gender]:[text] <col3>[dob]:[time] <col4>[dod]:[time] } <table1>[icustays] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[first_careunit]:[text] <col5>[last_careunit]:[text]... | SELECT COUNT( * ) > 0 FROM `<table4>` WHERE `<table4>`.subject_id = 5520 AND `<table4>`.admission_location = 'emergency room admit' AND DATETIME( `<table4>`.admittime, 'start of year' ) = DATETIME( CURRENT_TIME( ), 'start of year', '-1 year' ) | have patient 5520 been to the emergency room in the last year?
|
<table0>[Votes] { <col0>[number]:[PostId] <col1>[number]:[VoteTypeId] <col2>[number]:[UserId] <col3>[number]:[CreationDate] <col4>[time]:[BountyAmount] } <table1>[Users] { <col0>[number]:[Reputation] <col1>[number]:[CreationDate] <col2>[time]:[DisplayName] <col3>[text]:[LastAccessDate] <col4>[time]:[WebsiteUrl] <col5>... | SELECT DATEDIFF( day, p.CreationDate, CreationDate ) AS Days, COUNT( v.Id ) AS Count, COUNT( v.Id ) * 100.0 / SUM( COUNT( v.Id ) ) OVER ( ) AS Percentage FROM `<table0>` AS v INNER JOIN Posts AS p ON v.PostId = p.Id GROUP BY DATEDIFF( day, p.CreationDate, CreationDate ) ORDER BY DATEDIFF( day, p.CreationDate, CreationD... | Percentage of votes - depending on day after posting. |
<table0>[table_name_25] { <col0>[attendance]:[INTEGER] <col1>[date]:[VARCHAR] } | SELECT MAX( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "oct. 26" | What is the highest Attendance, when Date is "Oct. 26"? |
<table0>[table_name_11] { <col0>[draws]:[VARCHAR] <col1>[losses]:[VARCHAR] <col2>[efficiency__percentage]:[VARCHAR] } | SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` = 4 AND `<col2>` = "28.6%" | what is the number of draws when there are 4 losses and 28.6% efficiency? |
<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>[diagnoses] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[... | SELECT `<table4>`.gender, prescriptions.formulary_drug_cd FROM `<table4>` INNER JOIN prescriptions ON `<table4>`.hadm_id = prescriptions.hadm_id WHERE `<table4>`.subject_id = "2560" | what is gender and drug code of subject id 2560?
|
<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 `<table2>`.subject_id ) FROM `<table2>` WHERE `<table2>`.diagnosis = "SYNCOPE;TELEMETRY" AND `<table2>`.dod_year <= "2158.0" | how many patients whose primary disease is syncope;telemetry and year of death is less than or equal to 2158? |
<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 diagnoses.long_title FROM `<table4>` INNER JOIN diagnoses ON `<table4>`.hadm_id = diagnoses.hadm_id WHERE `<table4>`.name = "Stephanie Suchan" | find out the long title of diagnosis for patient stephanie suchan.
|
<table0>[LOCATIONS] { <col0>[Location_Name]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col0>` LIKE "%film%" | Which location names contain the word "film"? |
<table0>[table_69919] { <col0>[Deputy]:[Prime] <col1>[Minister]:[text] <col2>[Took]:[office] <col3>[real]:[Left] <col4>[office]:[text] <col5>[Prime]:[Minister] <col6>[text]:[Term] <col7>[text]:[Party] } | SELECT "Deputy `<col5>` Minister" FROM `<table0>` WHERE "Left office" = '1981' | Which deputy prime minister left office in 1981?
|
<table0>[table_2985987_2] { <col0>[date]:[VARCHAR] <col1>[race]:[VARCHAR] } | SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "Victoria Derby" | What many times was the victoria derby raced?
|
<table0>[table_name_9] { <col0>[run_2]:[VARCHAR] <col1>[rank]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "4" | Which Run 2 has a Rank of 4?
|
<table0>[COURSE] { <col0>[CRS_CODE]:[varchar] <col1>[DEPT_CODE]:[varchar] <col2>[CRS_DESCRIPTION]:[varchar] <col3>[CRS_CREDIT]:[float] } <table1>[PROFESSOR] { <col0>[EMP_NUM]:[int] <col1>[DEPT_CODE]:[varchar] <col2>[PROF_OFFICE]:[varchar] <col3>[PROF_EXTENSION]:[varchar] <col4>[PROF_HIGH_DEGREE]:[varchar] } <table2>[... | SELECT EMP_DOB, COUNT( `<col6>` ) FROM `<table4>` AS T1 JOIN CLASS AS T2 ON T1.EMP_NUM = T2.PROF_NUM WHERE CRS_CODE = "ACCT-211" | What is the weekday of birth of professors teaching course ACCT-211? Show a bar chart. |
<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.short_title = "Family hx-malignancy NEC" AND prescriptions.route = "INHALATION" | count the number of patients whose diagnosis short title is family hx-malignancy nec and drug route is inhalation.
|
<table0>[table_28628] { <col0>[Region]:[text] <col1>[Population]:[real] <col2>[countrys]:[population] <col3>[text]:[Change] <col4>[population]:[1993] <col5>[real]:[Change] <col6>[countrys]:[population] <col7>[1993]:[text] } | SELECT COUNT( "Change in `<col4>` since 1993" ) FROM `<table0>` WHERE "% of `<col2>` population" = '4.2' | What is the change in population since 1993 in the region where the % of country's population was 4.2?
|
<table0>[table_name_97] { <col0>[area_km_2]:[INTEGER] <col1>[census_ranking]:[VARCHAR] } | SELECT AVG( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "636 of 5,008" | What is the area of the community with a census ranking of 636 of 5,008? |
<table0>[Candidates] { <col0>[candidate_id]:[INTEGER] <col1>[candidate_details]:[VARCHAR] } <table1>[People_Addresses] { <col0>[person_address_id]:[INTEGER] <col1>[person_id]:[INTEGER] <col2>[address_id]:[INTEGER] <col3>[date_from]:[DATETIME] <col4>[date_to]:[DATETIME] } <table2>[Student_Course_Registrations] { <col0... | SELECT course_name, COUNT( * ) FROM `<table8>` AS T1 JOIN Student_Course_Registrations AS T2 ON T1.student_id = T2.student_id JOIN Courses AS T3 ON T2.course_id = T3.course_id GROUP BY T2.course_id ORDER BY COUNT( * ) | How many registed students do each course have? List course name and the number of their registered students, and I want to show from low to high by the y-axis.
|
<table0>[Artifacts] { <col0>[ArtifactID]:[INT] <col1>[SiteName]:[TEXT] <col2>[Description]:[TEXT] <col3>[Analysis]:[TEXT] } | DESCRIBE Artifacts; | Describe the structure of the Artifacts table. |
<table0>[table_name_70] { <col0>[team]:[VARCHAR] <col1>[qual_1]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "1:16.417" | What is Team, when Qual 1 is 1:16.417?
|
<table0>[concert_ticket_sales] { <col0>[ticket_id]:[INT] <col1>[user_id]:[INT] <col2>[artist_id]:[INT] <col3>[venue_id]:[INT] <col4>[price]:[DECIMAL] <col5>[date]:[DATE] <col6>[city]:[VARCHAR] <col7>[state]:[VARCHAR] } | SELECT AVG( `<col4>` ) FROM `<table0>` WHERE `<col7>` = 'California'; | What is the average revenue per concert ticket sale in the 'concert_ticket_sales' table for artists who have performed in California? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.