schema
stringlengths
20
14.6k
query
stringlengths
17
2.58k
question
stringlengths
8
1.06k
<table0>[table_name_71] { <col0>[driver]:[VARCHAR] <col1>[type_of_vehicle]:[VARCHAR] <col2>[year]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "stock car" AND `<col2>` = 1999
What driver has a stock car vehicle with a year of 1999?
<table0>[fans] { <col0>[fan_id]:[INT] <col1>[name]:[VARCHAR] <col2>[100]:[country] <col3>[VARCHAR]:[100] }
INSERT INTO fans ( fan_id, name, country ) VALUES ( 1, 'Ali Ahmed', 'Pakistan' ); INSERT INTO fans ( fan_id, name, country ) VALUES ( 2, 'Sophia Lee', 'South Korea' ); INSERT INTO fans ( fan_id, name, country ) VALUES ( 3, 'Carlos Gomez', 'Brazil' );
Insert new records of fans from a specific country.
<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>[procedures] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[t...
SELECT COUNT( DISTINCT `<table4>`.subject_id ) FROM `<table4>` INNER JOIN lab ON `<table4>`.hadm_id = lab.hadm_id WHERE `<table4>`.admission_location = "EMERGENCY ROOM ADMIT" AND lab.itemid = "50902"
count the number of patients whose admission location is emergency room admit and item id is 50902?
<table0>[genres] { <col0>[genre_id]:[INT] <col1>[genre]:[VARCHAR] } <table1>[songs] { <col0>[song_id]:[INT] <col1>[song_name]:[VARCHAR] <col2>[100]:[release_year] <col3>[INT]:[genre_id] <col4>[INT]:[INSERT] }
SELECT COUNT( * ) FROM `<table1>` WHERE `<col0>` = ( SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = 'Rock' ) AND release_year BETWEEN 1990 AND 2000;
How many songs are in the 'Rock' genre that were released between 1990 and 2000?
<table0>[d_icd_diagnoses] { <col0>[row_id]:[number] <col1>[icd9_code]:[text] <col2>[short_title]:[text] <col3>[long_title]:[text] } <table1>[d_labitems] { <col0>[row_id]:[number] <col1>[itemid]:[number] <col2>[label]:[text] } <table2>[icustays] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[nu...
SELECT ( SELECT `<table3>`.valuenum FROM `<table3>` WHERE `<table3>`.icustay_id IN ( SELECT `<table2>`.icustay_id FROM `<table2>` WHERE `<table2>`.hadm_id IN ( SELECT `<table16>`.hadm_id FROM `<table16>` WHERE `<table16>`.subject_id = 31615 ) AND NOT `<table2>`.outtime IS NULL ORDER BY `<table2>`.intime DESC LIMIT 1 ) ...
is patient 31615's arterial bp [diastolic] second measured on the last intensive care unit visit greater than the first value measured on the last intensive care unit visit?
<table0>[research_studies] { <col0>[INT]:[study_title] <col1>[VARCHAR]:[publication_year] }
SELECT publication_year, COUNT( * ) OVER ( ORDER BY publication_year ) AS num_studies FROM `<table0>` ORDER BY publication_year;
Show the number of research studies published per year in the 'research_studies' table, ordered by publication year.
<table0>[table_201_24] { <col0>[number]:[episode] <col1>[number]:[number] <col2>[original]:[airdate] <col3>[text]:[title] <col4>[text]:[disc] <col5>[number]:[description] }
SELECT COUNT( "episode number" ) FROM `<table0>` WHERE "original airdate" = 1983
how many episodes are in series 7 -lrb- 1983 -rrb- ?
<table0>[field] { <col0>[fieldid]:[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>[dataset] { <col0>[datasetid]:[int] <col1>[datasetname]:[varchar] } <table3>[paperkeyph...
SELECT DISTINCT COUNT( paper.paperid ), paper.year FROM keyphrase, paper, paperkeyphrase WHERE keyphrase.keyphrasename = 'semantic parsing' AND paperkeyphrase.keyphraseid = keyphrase.keyphraseid AND paper.paperid = paperkeyphrase.paperid GROUP BY paper.year ORDER BY paper.year DESC
papers in semantic parsing for each year
<table0>[t_kc22] { <col0>[number]:[CHA_ITEM_LEV] <col1>[number]:[DATA_ID] <col2>[text]:[DIRE_TYPE] <col3>[number]:[DOSE_FORM] <col4>[text]:[DOSE_UNIT] <col5>[text]:[EACH_DOSAGE] <col6>[text]:[EXP_OCC_DATE] <col7>[time]:[FLX_MED_ORG_ID] <col8>[text]:[FXBZ] <col9>[number]:[HOSP_DOC_CD] <col10>[text]:[HOSP_DOC_NM] <col11>...
SELECT `<table4>`.MED_CLINIC_ID FROM `<table4>` WHERE `<table4>`.PERSON_NM = '窦咏歌' AND `<table4>`.MED_SER_ORG_NO = '9078958' AND `<table4>`.IN_DIAG_DIS_NM LIKE '%性%' UNION SELECT `<table3>`.MED_CLINIC_ID FROM `<table3>` WHERE `<table3>`.PERSON_NM = '窦咏歌' AND `<table3>`.MED_SER_ORG_NO = '9078958' AND `<table3>`.IN_DIAG_...
姓名为窦咏歌的病人在医院9078958入院看病时诊断出的疾病名称中包含性的医疗就诊记录编号都有哪些?
<table0>[t_kc24] { <col0>[MED_SAFE_PAY_ID]:[text] <col1>[OVERALL_CD_ORG]:[text] <col2>[OVERALL_CD_PERSON]:[text] <col3>[MED_CLINIC_ID]:[text] <col4>[REF_SLT_FLG]:[number] <col5>[CLINIC_SLT_DATE]:[time] <col6>[COMP_ID]:[text] <col7>[PERSON_ID]:[text] <col8>[FLX_MED_ORG_ID]:[text] <col9>[INSU_TYPE]:[text] <col10>[MED_AMO...
SELECT COUNT( * ) FROM `<table2>` WHERE `<col14>` = '0862388' AND `<col10>` BETWEEN '2000-02-09' AND '2011-08-18' AND `<col15>` = '购药'
医院0862388给患者治疗时一共记录的购药数量是多少,在00-02-09到2011-08-18这期间
<table0>[ground_service] { <col0>[city_code]:[text] <col1>[airport_code]:[text] <col2>[transport_type]:[text] <col3>[ground_fare]:[int] } <table1>[class_of_service] { <col0>[booking_class]:[varchar] <col1>[rank]:[int] <col2>[class_description]:[text] } <table2>[state] { <col0>[state_code]:[text] <col1>[state_name]:[t...
SELECT DISTINCT fare.fare_id FROM `<table14>` AS AIRPORT_SERVICE_0, `<table14>` AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, fare, flight, flight_fare WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'BALTIMORE' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name ...
what is the cost for these flights from BALTIMORE to PHILADELPHIA
<table0>[microlab] { <col0>[microlabid]:[number] <col1>[patientunitstayid]:[number] <col2>[culturesite]:[text] <col3>[organism]:[text] <col4>[culturetakentime]:[time] } <table1>[lab] { <col0>[labid]:[number] <col1>[patientunitstayid]:[number] <col2>[labname]:[text] <col3>[labresult]:[number] <col4>[labresulttime]:[tim...
SELECT `<table6>`.`<table6>`time FROM `<table6>` WHERE `<table6>`.`<table5>`unitstayid IN ( SELECT `<table5>`.`<table5>`unitstayid FROM `<table5>` WHERE `<table5>`.`<table5>`healthsystemstayid IN ( SELECT `<table5>`.`<table5>`healthsystemstayid FROM `<table5>` WHERE `<table5>`.uniquepid = '035-4428' ) ) AND `<table6>`....
on 01/17/last year when patient 035-4428 received an intake for the last time?
<table0>[table_204_903] { <col0>[number]:[title] <col1>[text]:[character] <col2>[text]:[broadcaster] <col3>[text]:[episodes] <col4>[number]:[date] }
SELECT "broadcaster" FROM `<table0>` WHERE "episodes" = 1 GROUP BY "broadcaster" HAVING COUNT( * ) = 3
which broadcaster hosted 3 titles but they had only 1 episode ?
<table0>[users] { <col0>[INT]:[country] <col1>[VARCHAR]:[255] } <table1>[posts] { <col0>[INT]:[user_id] <col1>[INT]:[likes] <col2>[INT]:[INSERT] }
SELECT SUM( `<table1>`.likes ) FROM ( SELECT user_id, SUM( likes ) as total_likes FROM `<table1>` GROUP BY user_id ORDER BY total_likes DESC LIMIT 5 ) as top_users JOIN `<table1>` ON top_users.user_id = `<table1>`.user_id;
What is the total number of likes on posts from the top 5 users with the most likes?
<table0>[race] { <col0>[Race_ID]:[int] <col1>[text]:[Class] <col2>[text]:[Date] <col3>[text]:[Track_ID] } <table1>[track] { <col0>[Track_ID]:[int] <col1>[text]:[Location] <col2>[text]:[Seating] <col3>[real]:[Year_Opened] }
SELECT Class, COUNT( * ) FROM `<table0>` GROUP BY Class
Give me a bar chart for the total number of each class
<table0>[table_66428] { <col0>[Rank]:[real] <col1>[Lane]:[real] <col2>[text]:[Nationality] <col3>[text]:[Time] }
SELECT COUNT( "Rank" ) FROM `<table0>` WHERE "Name" = 'qi hui'
What is the Rank of Qi Hui?
<table0>[community_health_workers] { <col0>[INT]:[name] <col1>[VARCHAR]:[location] <col2>[VARCHAR]:[patients_served] <col3>[INT]:[INSERT] }
SELECT location, SUM( patients_served ) as total_patients FROM `<table0>` WHERE location = 'Urban' GROUP BY location;
What is the total number of patients served by community health workers in urban areas?
<table0>[allergy] { <col0>[allergyid]:[number] <col1>[patientunitstayid]:[number] <col2>[drugname]:[text] <col3>[allergyname]:[text] <col4>[allergytime]:[time] } <table1>[patient] { <col0>[uniquepid]:[text] <col1>[patienthealthsystemstayid]:[number] <col2>[patientunitstayid]:[number] <col3>[gender]:[text] <col4>[age]:...
SELECT t3.`<table6>`name FROM ( SELECT t2.`<table6>`name, DENSE_RANK( ) OVER ( ORDER BY COUNT( * ) DESC ) AS c1 FROM ( SELECT patient.uniquepid, `<table6>`.`<table6>`time FROM `<table6>` JOIN patient ON `<table6>`.patientunitstayid = patient.patientunitstayid WHERE `<table6>`.`<table6>`name = 'neurosurgery consultation...
what is the top five most common procedures that followed during the same month for patients who received neurosurgery consultation during the previous year?
<table0>[heritage_sites] { <col0>[INT]:[name] <col1>[VARCHAR]:[location] <col2>[VARCHAR]:[type] <col3>[VARCHAR]:[INSERT] }
SELECT COUNT( * ) FROM heritage_sites;
How many heritage sites are in the 'heritage_sites' table?
<table0>[table_8739] { <col0>[Outcome]:[text] <col1>[Year]:[real] <col2>[Championship]:[text] <col3>[Surface]:[text] <col4>[Partner]:[text] <col5>[Opponents]:[final] <col6>[text]:[Score] <col7>[final]:[text] }
SELECT "Surface" FROM `<table0>` WHERE "Opponents in final" = 'gigi fernández robin white'
What is Surface, when Opponents, when Final is 'Gigi Fern ndez Robin White'?
<table0>[table_name_39] { <col0>[label]:[VARCHAR] <col1>[format]:[VARCHAR] <col2>[edition_s]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "digital download" AND edition_s_ = "bonus tracks version"
Tell me the label for digital download for bonus tracks version
<table0>[energy_efficiency_stats] { <col0>[building_type]:[VARCHAR] <col1>[255]:[area] <col2>[VARCHAR]:[255] <col3>[energy_efficiency]:[FLOAT] }
SELECT AVG( `<col3>` ) FROM `<table0>` WHERE `<col0>` = 'Residential' AND area = 'Urban';
What is the average energy efficiency of residential buildings in the 'Urban' area?
<table0>[TagSynonyms] { <col0>[number]:[SourceTagName] <col1>[text]:[TargetTagName] <col2>[text]:[CreationDate] <col3>[time]:[OwnerUserId] <col4>[number]:[AutoRenameCount] <col5>[number]:[LastAutoRename] <col6>[time]:[Score] <col7>[number]:[ApprovedByUserId] <col8>[number]:[ApprovalDate] } <table1>[VoteTypes] { <col0>...
SELECT ROW_NUMBER( ) OVER ( ORDER BY Reputation DESC ) AS "#", Id AS "user_link", Reputation FROM `<table18>` WHERE LOWER( Location ) LIKE '%united arab emirates%' ORDER BY Reputation DESC LIMIT 150
Top 50 users from UAE.
<table0>[table_name_25] { <col0>[position]:[VARCHAR] <col1>[crewe_alexandra_career]:[VARCHAR] <col2>[goals]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "1988–1990" AND `<col2>` = 31
What is the position when the Crewe Alexandra career is 1988 1990, with 31 goals?
<table0>[TagSynonyms] { <col0>[number]:[SourceTagName] <col1>[text]:[TargetTagName] <col2>[text]:[CreationDate] <col3>[time]:[OwnerUserId] <col4>[number]:[AutoRenameCount] <col5>[number]:[LastAutoRename] <col6>[time]:[Score] <col7>[number]:[ApprovedByUserId] <col8>[number]:[ApprovalDate] } <table1>[ReviewTaskResults] ...
SELECT * FROM `<table19>` WHERE PostTypeId = 1 AND Score >= 25 AND Tags LIKE ( '%##param##%' )
Query answers by PostTypeId, Score and Subject Areas.
<table0>[table_name_36] { <col0>[shoulder]:[VARCHAR] <col1>[length]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "57.85 ( 2.278 )"
What is the shoulder measurement of the gun with a length of 57.85 (2.278)?
<table0>[table_10452] { <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 "Home `<col2>` score" = '19.15 ( 129 )'
On what date did the home team score 19.15 (129)?
<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 Id AS "post_link", Tags, Score, AnswerCount AS Answers FROM `<table28>` WHERE STR_POSITION( Tags, @tag ) > 0 AND LOWER( Title ) LIKE REPLACE( @tag, '-', ' ' ) + '%' AND ClosedDate IS NULL ORDER BY Score DESC
Posts tagged with tag that contain the tag as title prefix.
<table0>[Rooms] { <col0>[RoomId]:[TEXT] <col1>[roomName]:[TEXT] <col2>[beds]:[INTEGER] <col3>[bedType]:[TEXT] <col4>[maxOccupancy]:[INTEGER] <col5>[basePrice]:[INTEGER] <col6>[decor]:[TEXT] } <table1>[Reservations] { <col0>[Code]:[INTEGER] <col1>[Room]:[TEXT] <col2>[CheckIn]:[TEXT] <col3>[CheckOut]:[TEXT] <col4>[Rate]...
SELECT roomName, COUNT( roomName ) FROM `<table1>` AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId WHERE `<col6>` LIKE '%ROY%' GROUP BY roomName ORDER BY roomName
Find the number of the name of rooms booked by some customers whose first name contains ROY, and sort in ascending by the bar.
<table0>[ReviewRejectionReasons] { <col0>[number]:[text] <col1>[Description]:[text] <col2>[PostTypeId]:[number] } <table1>[ReviewTaskTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table2>[PostHistoryTypes] { <col0>[number]:[text] } <table3>[ReviewTasks] { <col0>[number]:[ReviewTaskTypeId] <col1>[number...
SELECT COUNT( P.Id ) AS "Questions", COUNT( P2.Id ) AS "Unresolved", 10000 * COUNT( P2.Id ) / COUNT( P.Id ) / 100.0 AS "Percent", MIN( U.DisplayName ) AS "Who", MIN( U.Reputation ) AS "Rep", YEAR( MIN( U.CreationDate ) ) AS "Joined", YEAR( MIN( U.LastAccessDate ) ) AS "Last Seen" FROM `<table20>` AS P LEFT JOIN Users A...
Unresolved questions with answers by user.
<table0>[PostHistoryTypes] { <col0>[number]:[text] } <table1>[ReviewTaskResultTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table2>[ReviewTaskStates] { <col0>[number]:[text] <col1>[Description]:[text] } <table3>[CloseReasonTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table4>[PostLinks...
SELECT T.TagName, COUNT( Pot.TagId ) AS TagCount, SUM( P.Score ) AS TagScore FROM `<table28>` AS T, Post`<table28>` AS Pot, Posts AS P, Users AS U, PostTypes AS Pt WHERE U.Id = P.OwnerUserId AND Pt.Id = P.PostTypeId AND ( u.Id = 548225 ) AND Pot.PostId = P.ParentId AND T.Id = Pot.TagId GROUP BY T.TagName ORDER BY COUNT...
My Tags by Post Count.
<table0>[microlab] { <col0>[microlabid]:[number] <col1>[patientunitstayid]:[number] <col2>[culturesite]:[text] <col3>[organism]:[text] <col4>[culturetakentime]:[time] } <table1>[patient] { <col0>[uniquepid]:[text] <col1>[patienthealthsystemstayid]:[number] <col2>[patientunitstayid]:[number] <col3>[gender]:[text] <col4...
SELECT t3.drugname FROM ( SELECT t2.drugname, DENSE_RANK( ) OVER ( ORDER BY COUNT( * ) DESC ) AS c1 FROM ( SELECT patient.uniquepid, `<table2>`.`<table2>`time FROM `<table2>` JOIN patient ON `<table2>`.patientunitstayid = patient.patientunitstayid WHERE `<table2>`.`<table2>`name = 'sepsis - severe' AND DATETIME( `<tabl...
what is the four drug most frequently prescribed to the patients aged 40s within 2 months after they have been diagnosed with sepsis - severe since 5 years ago?
<table0>[table_name_70] { <col0>[city]:[VARCHAR] <col1>[date]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "october 26, 2007"
Which City has a Date on october 26, 2007
<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>`.marital_status = "WIDOWED" AND diagnoses.long_title = "Benign neoplasm of spinal meninges"
how many widowed patients had the diagnosis long title benign neoplasm of spinal meninges?
<table0>[daily_oil_production] { <col0>[platform_id]:[INT] <col1>[production_date]:[DATE] <col2>[oil_production]:[FLOAT] }
SELECT `<col2>` FROM `<table0>` WHERE `<col0>` = 2 AND `<col1>` BETWEEN '2020-03-01' AND '2020-03-03';
Find the daily oil production for platform 2 in March 2020
<table0>[mental_health_parity] { <col0>[state]:[VARCHAR] <col1>[violations]:[INT] }
SELECT state, SUM( `<col1>` ) FROM `<table0>` GROUP BY state;
What is the total number of mental health parity violations for each state?
<table0>[table_name_46] { <col0>[record]:[VARCHAR] <col1>[game_site]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "raymond james stadium"
What is the record when the game was played at raymond james stadium?
<table0>[table_name_37] { }
SELECT 2007 FROM `<table0>` WHERE 2003 = "85"
What is 2007, when 2003 is "85"?
<table0>[table_62846] { <col0>[Peak]:[text] <col1>[Country]:[text] <col2>[Elevation]:[real] <col3>[Prominence]:[real] <col4>[Col]:[real] }
SELECT AVG( "Prominence ( m )" ) FROM `<table0>` WHERE "Col ( m )" = '350'
Which Prominence (m) has a Col (m) of 350?
<table0>[Spacecraft] { <col0>[SpacecraftID]:[INT] <col1>[VARCHAR]:[Manufacturer] <col2>[VARCHAR]:[Mass] } <table1>[SpaceMissions] { <col0>[MissionID]:[INT] <col1>[SpacecraftID]:[INT] <col2>[VARCHAR]:[LaunchDate] <col3>[DATE]:[INSERT] <col4>[Spacecraft]:[SpacecraftID] <col5>[Manufacturer]:[Mass] <col6>[VALUES]:[Voyager...
SELECT SUM( s.Mass ) FROM `<table0>` s INNER JOIN SpaceMissions sm ON s.`<table0>`ID = sm.`<table0>`ID WHERE sm.LaunchDate < '2010-01-01';
What was the combined mass of spacecraft involved in space missions before 2010?
<table0>[texas_energy] { <col0>[INT]:[source] <col1>[TEXT]:[generation] <col2>[FLOAT]:[INSERT] }
SELECT AVG( generation ) FROM `<table0>` WHERE source IN ( 'wind', 'solar' );
What is the average energy generation from renewable sources in Texas?
<table0>[warehouses] { <col0>[INT]:[capacity] } <table1>[inventory] { <col0>[INT]:[warehouse_id] <col1>[INT]:[pallets] <col2>[INT]:[INSERT] <col3>[warehouses]:[capacity] <col4>[VALUES]:[500] <col5>[250]:[1000] <col6>[750]:[INSERT] }
SELECT MAX( pallets ) as max_pallets FROM ( SELECT i.warehouse_id, SUM( i.pallets ) as pallets FROM `<table1>` i GROUP BY i.warehouse_id ) t;
What is the maximum number of pallets stored in a single warehouse?
<table0>[repair_assignment] { <col0>[technician_id]:[number] <col1>[repair_id]:[number] <col2>[machine_id]:[number] } <table1>[technician] { <col0>[technician_id]:[number] <col1>[name]:[text] <col2>[team]:[text] <col3>[starting_year]:[number] <col4>[age]:[number] } <table2>[repair] { <col0>[repair_id]:[number] <col1>...
SELECT team, COUNT( * ) FROM `<table1>` GROUP BY `<col2>`
For each team, how many technicians are there?
<table0>[table_19716903_1] { <col0>[isolation]:[VARCHAR] <col1>[mountain_peak]:[VARCHAR] }
SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "Jack Mountain"
How many different isolation numbers does the Jack Mountain peak have?
<table0>[Apartment_Buildings] { <col0>[building_id]:[INTEGER] <col1>[building_short_name]:[CHAR] <col2>[building_full_name]:[VARCHAR] <col3>[building_description]:[VARCHAR] <col4>[255]:[building_address] <col5>[VARCHAR]:[255] <col6>[building_manager]:[VARCHAR] <col7>[building_phone]:[VARCHAR] } <table1>[Apartment_Faci...
SELECT guest_first_name, COUNT( guest_first_name ) FROM `<table5>` AS T1 JOIN Guests AS T2 ON T1.guest_id = T2.guest_id GROUP BY guest_first_name
Show the number of bookings for different guests and group by guest first name in a bar chart.
<table0>[table_228973_9] { <col0>[title]:[VARCHAR] <col1>[original_air_date]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "February 4, 2003"
If the original air date is February 4, 2003, what is the episode title?
<table0>[table_25724294_2] { <col0>[field_goals]:[INTEGER] <col1>[player]:[VARCHAR] }
SELECT MAX( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "Walter Rheinschild"
How many field goals did Walter Rheinschild have?
<table0>[SuggestedEdits] { <col0>[number]:[PostId] <col1>[number]:[CreationDate] <col2>[time]:[ApprovalDate] <col3>[time]:[RejectionDate] <col4>[time]:[OwnerUserId] <col5>[number]:[Comment] <col6>[text]:[Text] <col7>[text]:[Title] <col8>[text]:[Tags] <col9>[text]:[RevisionGUID] } <table1>[Votes] { <col0>[number]:[Post...
SELECT Id AS "user_link", Location, Reputation FROM `<table9>` WHERE AboutMe LIKE '%jesus%' OR AboutMe LIKE '%Jesus%' ORDER BY Reputation DESC
People with Jesus in their about me section. Yeah, what the name says
<table0>[table_name_97] { <col0>[rank]:[INTEGER] <col1>[city]:[VARCHAR] }
SELECT AVG( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "mashhad" AND 1976 < 667770
What is teh average rank of the city of mashhad, which had less than 667770 in 1976?
<table0>[Artifacts] { <col0>[INT]:[site] <col1>[VARCHAR]:[artifact_name] <col2>[VARCHAR]:[date_found] <col3>[DATE]:[description] <col4>[TEXT]:[analyzed_by] <col5>[VARCHAR]:[analyzed_date] <col6>[DATE]:[INSERT] } <table1>[Experts] { <col0>[INT]:[name] <col1>[VARCHAR]:[expertise] <col2>[VARCHAR]:[country] <col3>[VARCHAR...
SELECT SUM( a.artifact_count ) as total_artifacts, e.name as expert_name FROM ( SELECT analyzed_by, COUNT( id ) as artifact_count FROM `<table0>` WHERE analyzed_by IN ( SELECT name FROM `<table1>` WHERE expertise = 'Ceramics' ) GROUP BY analyzed_by ) a JOIN ( SELECT name, MAX( artifact_count ) as max_artifacts FROM ( S...
What is the total number of artifacts analyzed by experts specializing in ceramics, and the name of the expert with the most analyzed artifacts?
<table0>[table_61768] { <col0>[Outcome]:[text] <col1>[Date]:[real] <col2>[Championship]:[text] <col3>[Surface]:[text] <col4>[Opponent]:[text] <col5>[Score]:[text] }
SELECT "Surface" FROM `<table0>` WHERE "Date" > '1979' AND "Championship" = 'melbourne indoor, australia' AND "Score" = '2–6, 6–2, 6–2'
What was the surface later than 1979, for the Melbourne Indoor, Australia, and the score was 2 6, 6 2, 6 2?
<table0>[table_16040] { <col0>[Character]:[text] <col1>[1954]:[Broadway] <col2>[text]:[1955] <col3>[broadcast]:[text] <col4>[1960]:[broadcast] <col5>[text]:[1979] <col6>[Broadway]:[text] <col7>[1990]:[Broadway] <col8>[text]:[1991] <col9>[Broadway]:[text] <col10>[1998]:[Broadway] <col11>[text]:[1999] <col12>[Broadway]:[...
SELECT "1990 Broadway" FROM `<table0>` WHERE "1955 broadcast" = 'Tom Halloran'
Who played in the 1990 Broadway after Tom Halloran played the character in the 1955 Broadcast?
<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>[job_history] { <col0>[EMPLOY...
SELECT HIRE_DATE, `<col7>` FROM `<table5>` WHERE `<col5>` < '2002-06-21' ORDER BY `<col5>` DESC
For those employees who was hired before 2002-06-21, draw a line chart about the change of salary over hire_date , and show from high to low by the HIRE_DATE.
<table0>[locations] { <col0>[LOCATION_ID]:[decimal] <col1>[STREET_ADDRESS]:[varchar] <col2>[POSTAL_CODE]:[varchar] <col3>[CITY]:[varchar] <col4>[STATE_PROVINCE]:[varchar] <col5>[COUNTRY_ID]:[varchar] } <table1>[jobs] { <col0>[JOB_ID]:[varchar] <col1>[JOB_TITLE]:[varchar] <col2>[MIN_SALARY]:[decimal] <col3>[MAX_SALARY]...
SELECT HIRE_DATE, AVG( `<col9>` ) FROM `<table2>` WHERE `<col5>` < '2002-06-21'
For those employees who was hired before 2002-06-21, give me the comparison about the average of manager_id over the hire_date bin hire_date by time.
<table0>[table_name_48] { <col0>[crowd]:[VARCHAR] <col1>[score]:[VARCHAR] }
SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "97-80"
How many were in the crowd when the score was 97-80?
<table0>[table_name_54] { <col0>[director_s]:[VARCHAR] <col1>[recipient]:[VARCHAR] }
SELECT director_s_ FROM `<table0>` WHERE `<col1>` = "redbag pictures ltd"
Who was the director that had a recipient of Redbag Pictures Ltd?
<table0>[visitor_statistics] { <col0>[INT]:[PRIMARY] <col1>[KEY]:[country] <col2>[VARCHAR]:[year] <col3>[INT]:[month] <col4>[INT]:[visitors] }
CREATE VIEW `<table0>`_by_month AS SELECT country, year, month, SUM( visitors ) AS total_visitors FROM `<table0>` GROUP BY country, year, month;
Create a view for the international visitor statistics by month
<table0>[lab] { <col0>[labid]:[number] <col1>[patientunitstayid]:[number] <col2>[labname]:[text] <col3>[labresult]:[number] <col4>[labresulttime]:[time] } <table1>[patient] { <col0>[uniquepid]:[text] <col1>[patienthealthsystemstayid]:[number] <col2>[patientunitstayid]:[number] <col3>[gender]:[text] <col4>[age]:[text] ...
SELECT COUNT( * ) FROM `<table4>` WHERE `<table4>`.`<table1>`unitstayid IN ( SELECT `<table1>`.`<table1>`unitstayid FROM `<table1>` WHERE `<table1>`.`<table1>`healthsystemstayid IN ( SELECT `<table1>`.`<table1>`healthsystemstayid FROM `<table1>` WHERE `<table1>`.uniquepid = '030-42006' ) ) AND `<table4>`.cellpath LIKE ...
how many time did patient 030-42006 produce a balance this exchange (ml) output on this month/26?
<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>[lab] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[itemid]:[text] <col3...
SELECT COUNT( DISTINCT `<table2>`.subject_id ) FROM `<table2>` WHERE `<table2>`.diagnosis = "SQUAMOUS CELL CARCINOMA ORAL TONGUE/SDA" AND `<table2>`.age < "54"
give me the number of patients whose primary disease is squamous cell carcinoma oral tongue/sda and age is less than 54?
<table0>[table_name_75] { <col0>[caps]:[INTEGER] <col1>[club_province]:[VARCHAR] <col2>[position]:[VARCHAR] }
SELECT AVG( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "meralomas" AND `<col2>` = "centre"
What is the average number of caps for Meralomas with positions of centre?
<table0>[table_19764939_1] { <col0>[total]:[VARCHAR] <col1>[player]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "Jamie Carragher"
Name the total for jamie carragher
<table0>[mzjzjlb] { <col0>[HXPLC]:[number] <col1>[HZXM]:[text] <col2>[JLSJ]:[time] <col3>[JZJSSJ]:[time] <col4>[JZKSBM]:[text] <col5>[JZKSMC]:[text] <col6>[JZKSRQ]:[time] <col7>[JZLSH]:[text] <col8>[JZZDBM]:[text] <col9>[JZZDSM]:[text] <col10>[JZZTDM]:[number] <col11>[JZZTMC]:[text] <col12>[text]:[KLX] <col13>[number]:...
SELECT COUNT( * ) FROM `<table0>` WHERE `<table0>`.ZZYSGH = '21789346' AND `<table0>`.JZKSRQ BETWEEN '2006-07-08' AND '2008-09-02'
在06年7月8日到08年9月2日内多少人是医生21789346看的门诊?
<table0>[d_items] { <col0>[row_id]:[number] <col1>[itemid]:[number] <col2>[label]:[text] <col3>[linksto]:[text] } <table1>[chartevents] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[itemid]:[number] <col5>[charttime]:[time] <col6>[valuenum]:[number] <...
SELECT `<table6>`.startdate FROM `<table6>` WHERE `<table6>`.hadm_id IN ( SELECT `<table2>`.hadm_id FROM `<table2>` WHERE `<table2>`.subject_id = 25814 ) AND `<table6>`.route = 'ir' AND STRFTIME( '%y-%m', `<table6>`.startdate ) >= '2102-11' ORDER BY `<table6>`.startdate LIMIT 1
when has patient 25814 been prescribed medication for the first time since 11/2102 via ir route?
<table0>[table_name_73] { <col0>[player]:[VARCHAR] <col1>[pos]:[VARCHAR] <col2>[previous_team]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "f" AND `<col2>` = "new york knicks"
What F Player was previously with the New York Knicks?
<table0>[table_10718984_2] { <col0>[original_air_date]:[VARCHAR] <col1>[no_in_season]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = 23
When did the no. 23 show originally air?
<table0>[film] { <col0>[Film_ID]:[int] <col1>[Rank_in_series]:[int] <col2>[Number_in_season]:[int] <col3>[Title]:[text] <col4>[Directed_by]:[text] <col5>[Original_air_date]:[text] <col6>[Production_code]:[text] } <table1>[schedule] { <col0>[Cinema_ID]:[int] <col1>[Film_ID]:[int] <col2>[Date]:[text] <col3>[Show_times_p...
SELECT Openning_year, COUNT( Openning_year ) FROM `<table2>` GROUP BY Openning_year ORDER BY Openning_year DESC
Bar chart of how many openning year from each openning year, and could you show in descending by the bars?
<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>[procedures] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[t...
SELECT COUNT( DISTINCT `<table3>`.subject_id ) FROM `<table3>` INNER JOIN diagnoses ON `<table3>`.hadm_id = diagnoses.hadm_id WHERE `<table3>`.admission_type = "EMERGENCY" AND diagnoses.short_title = "Gastrointest hemorr NOS"
how many patients with admission type emergency had diagnoses titled gastrointest hemorr nos?
<table0>[jobs] { <col0>[job_id]:[int] <col1>[job_title]:[varchar] <col2>[description]:[varchar] <col3>[requirement]:[varchar] <col4>[city]:[varchar] <col5>[state]:[varchar] <col6>[country]:[varchar] <col7>[zip]:[int] } <table1>[instructor] { <col0>[instructor_id]:[int] <col1>[name]:[varchar] <col2>[uniqname]:[varchar]...
SELECT DISTINCT `<table2>`.name, `<table2>`.number, program_`<table2>`.workload FROM `<table2>`, program_`<table2>` WHERE `<table2>`.department = 'EECS' AND program_`<table2>`.`<table2>`_id = `<table2>`.`<table2>`_id AND program_`<table2>`.workload = ( SELECT MAX( PROGRAM_COURSEalias1.workload ) FROM `<table2>` AS COUR...
What is the most challenging class ?
<table0>[sales] { <col0>[INT]:[item_id] <col1>[INT]:[price] <col2>[DECIMAL]:[category] <col3>[VARCHAR]:[255] }
SELECT SUM( price ) FROM `<table0>` WHERE category = 'ethical fashion';
Show the total price of all items in the ethical fashion category
<table0>[table_14570857_1] { <col0>[situation]:[VARCHAR] <col1>[original_us_airdate]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "December 5, 2007"
Which situation has an original u.s. airdate of December 5, 2007?
<table0>[machines] { <col0>[machine_id]:[INT] <col1>[type]:[TEXT] <col2>[schedule]:[TEXT] } <table1>[factories] { <col0>[factory_id]:[INT] <col1>[initiative]:[TEXT] }
SELECT `<table0>`.machine_id, `<table0>`.type, `<table0>`.schedule FROM `<table0>` LEFT JOIN factories ON `<table0>`.factory_id = factories.factory_id WHERE factories.initiative IS NULL;
Display the machine IDs, types, and maintenance schedules for machines in factories without industry 4.0 initiatives.
<table0>[table_name_50] { <col0>[outcome]:[VARCHAR] <col1>[surface]:[VARCHAR] <col2>[score]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "clay" AND `<col2>` = "4–6, 7–5, 2–6"
Which outcome has a Surface of clay and a Score of 4–6, 7–5, 2–6?
<table0>[university] { <col0>[School_ID]:[int] <col1>[School]:[text] <col2>[Location]:[text] <col3>[Founded]:[real] <col4>[Affiliation]:[text] <col5>[Enrollment]:[real] <col6>[Nickname]:[text] <col7>[Primary_conference]:[text] } <table1>[basketball_match] { <col0>[Team_ID]:[int] <col1>[School_ID]:[int] <col2>[Team_Nam...
SELECT ACC_Regular_Season, `<col0>` FROM `<table1>` ORDER BY `<col3>`
Show me team_id by acc regular season in a histogram, and sort by the bar in asc.
<table0>[table_name_22] { <col0>[uni_number]:[VARCHAR] <col1>[bats]:[VARCHAR] <col2>[surname]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "r" AND `<col2>` = "timms"
What's the Uni# of Timms, who has bats of R?
<table0>[table_16268026_3] { <col0>[state]:[VARCHAR] <col1>[interview]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "8.313 ( 8 )"
What state has an interview of 8.313 (8) ?
<table0>[table_204_983] { <col0>[number]:[year] <col1>[number]:[1st] <col2>[venue]:[text] <col3>[2nd]:[venue] <col4>[text]:[3rd] <col5>[venue]:[text] <col6>[4th]:[venue] <col7>[text]:[5th] <col8>[venue]:[text] <col9>[6th]:[venue] }
SELECT "year" FROM `<table0>` WHERE "3rd venue" = ( SELECT "1st venue" FROM `<table0>` WHERE "year" = 2011 )
in what year was the 3rd venue the same as 2011 's 1st venue ?
<table0>[table_20772] { <col0>[Home]:[team] <col1>[text]:[Home] <col2>[team]:[score] <col3>[text]:[Away] <col4>[team]:[text] <col5>[Away]:[team] <col6>[score]:[text] <col7>[Ground]:[text] <col8>[Crowd]:[real] <col9>[Date]:[text] }
SELECT "Date" FROM `<table0>` WHERE "Home team" = 'Adelaide'
What date was Adelaide the home team?
<table0>[treatment] { <col0>[treatmentid]:[number] <col1>[patientunitstayid]:[number] <col2>[treatmentname]:[text] <col3>[treatmenttime]:[time] } <table1>[cost] { <col0>[costid]:[number] <col1>[uniquepid]:[text] <col2>[patienthealthsystemstayid]:[number] <col3>[eventtype]:[text] <col4>[eventid]:[number] <col5>[charget...
SELECT COUNT( DISTINCT t1.uniquepid ) FROM ( SELECT patient.uniquepid, `<table0>`.`<table0>`time, patient.patienthealthsystemstayid FROM `<table0>` JOIN patient ON `<table0>`.patientunitstayid = patient.patientunitstayid WHERE `<table0>`.`<table0>`name = 'beta blocker - esmolol' AND STRFTIME( '%y', `<table0>`.`<table0>...
since 2105 how many patients were prescribed pantoprazole during the same hospital encounter after the procedure of beta blocker - esmolol.
<table0>[outputevents] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[charttime]:[time] <col5>[itemid]:[number] <col6>[value]:[number] } <table1>[prescriptions] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[start...
SELECT `<table11>`.charttime FROM `<table11>` WHERE `<table11>`.icustay_id IN ( SELECT `<table12>`.icustay_id FROM `<table12>` WHERE `<table12>`.hadm_id IN ( SELECT `<table15>`.hadm_id FROM `<table15>` WHERE `<table15>`.subject_id = 8773 ) AND NOT `<table12>`.outtime IS NULL ORDER BY `<table12>`.intime LIMIT 1 ) AND `<...
when did patient 8773 get the first intake of .9% normal saline on the first icu visit?
<table0>[table_40392] { <col0>[School]:[year] <col1>[text]:[text] <col2>[text]:[text] <col3>[text]:[text] <col4>[text]:[text] <col5>[text]:[text] }
SELECT "03-04" FROM `<table0>` WHERE "95-96" = '337,660'
What is 03-04, when 95-96 is 337,660?
<table0>[Astronauts] { <col0>[INT]:[name] <col1>[VARCHAR]:[organization] } <table1>[Missions] { <col0>[INT]:[astronaut_id] <col1>[INT]:[company] <col2>[VARCHAR]:[mission_type] <col3>[VARCHAR]:[INSERT] <col4>[Astronauts]:[name] <col5>[organization]:[VALUES] <col6>[Alice]:[SpacePioneers] <col7>[Bob]:[SpacePioneers] <col...
SELECT a.name FROM `<table0>` a LEFT JOIN Missions m ON a.id = m.astronaut_id AND a.organization = m.company WHERE m.id IS NULL AND a.organization = 'SpacePioneers';
Who are the astronauts that have not been on any mission for 'SpacePioneers'?
<table0>[table_name_81] { <col0>[position]:[VARCHAR] <col1>[school_club_team]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "east carolina"
What's the position listed for the east carolina team?
<table0>[demographic] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[name]:[text] <col3>[marital_status]:[text] <col4>[age]:[text] <col5>[dob]:[text] <col6>[gender]:[text] <col7>[language]:[text] <col8>[religion]:[text] <col9>[admission_type]:[text] <col10>[days_stay]:[text] <col11>[insurance]:[text] <col12>...
SELECT `<table4>`.drug_type, `<table4>`.route FROM `<table4>` WHERE `<table4>`.formulary_drug_cd = "ISOS10"
what is drug type and drug route of drug code isos10?
<table0>[crop] { <col0>[INTEGER]:[type] <col1>[TEXT]:[temperature] <col2>[FLOAT]:[humidity] <col3>[FLOAT]:[date] <col4>[DATE]:[region_id] } <table1>[region] { <col0>[INTEGER]:[name] }
SELECT r.name as region, c.type as `<table0>`, AVG( c.temperature ) as avg_temp, AVG( c.humidity ) as avg_hum FROM `<table0>` c INNER JOIN region r ON c.region_id = r.id WHERE c.date >= DATEADD( month, 0, DATEADD( day, DATEDIFF( day, 0, CURRENT_DATE ), 0 ) ) AND c.date < DATEADD( month, 1, DATEADD( day, DATEDIFF( day, ...
What is the average temperature and humidity for each crop type in the current month, grouped by geographical regions?
<table0>[table_70748] { <col0>[Year]:[real] <col1>[Catcher]:[text] <col2>[Baseman]:[text] <col3>[Second]:[Baseman] <col4>[text]:[Shortstop] <col5>[text]:[Baseman] <col6>[text]:[Rightfielder] <col7>[text]:[Centerfielder] <col8>[text]:[Leftfielder] <col9>[text]:[Starting] <col10>[Pitcher]:[text] }
SELECT "Shortstop" FROM `<table0>` WHERE "Catcher" = 'johnny roseboro' AND "Third Baseman" = 'jim lefebvre' AND "Second Baseman" = 'nate oliver'
What is the name of the shortstop when the Catcher was johnny roseboro, and a Third Baseman of jim lefebvre, and a Second Baseman of nate oliver?
<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>` WHERE `<table1>`.marital_status = "DIVORCED" AND `<table1>`.ethnicity = "BLACK/HAITIAN"
what is the number of patients whose marital status is divorced and ethnicity is black/haitian?
<table0>[table_name_46] { <col0>[centerfold_model]:[VARCHAR] }
SELECT 20 AS _questions FROM `<table0>` WHERE `<col0>` = "rachel jeán marteen"
Who was the 20 Questions section aimed at when Centerfold Model was Rachel Jeán Marteen?
<table0>[table_name_27] { <col0>[born_died]:[VARCHAR] <col1>[name]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "maliq bushati"
What is Born-Died, when Name is Maliq Bushati?
<table0>[LaborDisputes] { <col0>[DisputeID]:[INT] <col1>[Sector]:[VARCHAR] <col2>[Duration]:[INT] }
SELECT AVG( `<col2>` ) FROM `<table0>` WHERE `<col1>` = 'Transportation' AND `<col2>` > 30;
What is the average duration of labor disputes in the 'Transportation' sector that lasted more than 30 days?
<table0>[flight] { <col0>[aircraft_code_sequence]:[text] <col1>[airline_code]:[varchar] } <table1>[restriction] { <col0>[restriction_code]:[text] <col1>[advance_purchase]:[int] <col2>[stopovers]:[text] <col3>[saturday_stay_required]:[text] <col4>[minimum_stay]:[int] <col5>[maximum_stay]:[int] <col6>[application]:[text...
SELECT DISTINCT flight.flight_id FROM `<table20>` AS AIRPORT_SERVICE_0, `<table20>` 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 = 'BOSTON' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'ATLANTA' AND fl...
i would like some information on flights leaving BOSTON to ATLANTA
<table0>[CREATE] { <col0>[SCHEMA]:[GreenEnergy] } <table1>[RenewableProjects] { <col0>[project_id]:[INT] <col1>[name]:[VARCHAR] <col2>[location]:[VARCHAR] <col3>[installed_capacity]:[FLOAT] }
SELECT SUM( installed_capacity ) FROM GreenEnergy.RenewableProjects;
What is the total installed capacity of renewable energy projects in the 'GreenEnergy' schema?
<table0>[table_204_941] { <col0>[number]:[number] <col1>[date]:[text] <col2>[visitor]:[text] <col3>[score]:[text] <col4>[home]:[text] <col5>[record]:[text] }
SELECT COUNT( * ) FROM `<table0>`
how many games total are listed ?
<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>[Transactions...
SELECT Investor_details, COUNT( `<col1>` ) FROM `<table4>` GROUP BY `<col1>` ORDER BY `<col1>` DESC
Show all investor details, and count them by a bar chart, sort bars from high to low order please.
<table0>[CountryRegion] { <col0>[CountryRegionCode]:[text] <col1>[text]:[ModifiedDate] } <table1>[Culture] { <col0>[CultureID]:[text] <col1>[text]:[ModifiedDate] } <table2>[Currency] { <col0>[CurrencyCode]:[text] <col1>[text]:[ModifiedDate] } <table3>[CountryRegionCurrency] { <col0>[CountryRegionCode]:[text] <col1>[...
SELECT T2.EmailAddress FROM `<table4>` AS T1 INNER JOIN EmailAddress AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T1.EmailPromotion = 2
Please list the e-mail addresses of all the employees who wish to receive e-mail promotions from Adventureworks and selected partners.
<table0>[Ref_Transaction_Types] { <col0>[transaction_type_description]:[VARCHAR] <col1>[transaction_type_code]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "PUR"
Show the description of transaction type with code 'PUR'.
<table0>[aircraft] { <col0>[aircraft_code]:[varchar] <col1>[aircraft_description]:[varchar] <col2>[manufacturer]:[varchar] <col3>[basic_type]:[varchar] <col4>[engines]:[int] <col5>[propulsion]:[varchar] <col6>[wide_body]:[varchar] <col7>[wing_span]:[int] <col8>[length]:[int] <col9>[weight]:[int] <col10>[capacity]:[int]...
SELECT DISTINCT flight.flight_id FROM `<table14>` AS AIRPORT_SERVICE_0, `<table14>` AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE ( ( CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'ATLANTA' AND flight.arrival_time = ( SELECT MIN( FLIGHTalias1.arrival_time ) FROM `<table14>` ...
what flights can i take between BOSTON and ATLANTA so that when i leave BOSTON i will have the maximum amount of time on the ground in ATLANTA and still return in the same day
<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 procedures ON `<table1>`.hadm_id = procedures.hadm_id WHERE `<table1>`.diagnosis = "LEFT COLON CANCER" AND procedures.short_title = "Temporary tracheostomy"
count the number of patients whose primary disease is left colon cancer and procedure short title is temporary tracheostomy?
<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>`.marital_status = "MARRIED" AND diagnoses.short_title = "Bleed esoph var oth dis"
what is the number of patients whose marital status is married and diagnoses short title is bleed esoph var oth dis?
<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 COUNT( DISTINCT `<table2>`.subject_id ) FROM `<table2>` INNER JOIN diagnoses ON `<table2>`.hadm_id = diagnoses.hadm_id WHERE diagnoses.icd9_code = "2768"
give me the number of patients whose diagnoses icd9 code is 2768?
<table0>[teams] { <col0>[team_name]:[VARCHAR] <col1>[255]:[season_start_year] <col2>[INT]:[season_end_year] <col3>[INT]:[INSERT] } <table1>[games] { <col0>[team_name]:[VARCHAR] <col1>[255]:[location] <col2>[VARCHAR]:[255] <col3>[won]:[BOOLEAN] }
SELECT COUNT( * ) FROM `<table1>` WHERE `<col0>` = 'Spurs' AND location = 'away' AND `<col3>` = TRUE AND season_start_year = 2016 AND season_end_year = 2017;
How many games did the Spurs win at away games in the 2016-2017 season?