schema
stringlengths
20
14.6k
query
stringlengths
17
2.58k
question
stringlengths
8
1.06k
<table0>[table_name_11] { <col0>[game]:[VARCHAR] <col1>[home_team]:[VARCHAR] <col2>[date]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "st. louis" AND `<col2>` = "april 12"
What is the Game number on April 12 with St. Louis Home Team?
<table0>[table_name_40] { <col0>[award]:[VARCHAR] <col1>[category]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "music video acting award"
Which Award has a Category of music video acting award?
<table0>[underwater_sites] { <col0>[INT]:[PRIMARY] <col1>[KEY]:[name] <col2>[VARCHAR]:[255] <col3>[country]:[VARCHAR] <col4>[255]:[depth] }
SELECT AVG( depth ) FROM `<table0>` WHERE `<col3>` = 'Fiji';
What is the average depth of underwater sites in Fiji?
<table0>[PostHistoryTypes] { <col0>[number]:[text] } <table1>[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]:[R...
WITH firstrev_cte AS ( SELECT MIN( ph.Id ) AS MinId, p.Id FROM `<table17>` AS p JOIN `<table10>` AS ph ON ph.PostId = p.Id WHERE ph.Text LIKE '%<##tagName##>%' AND ph.`<table10>`TypeId IN ( 3, 6, 9 ) GROUP BY p.Id ), users_cte AS ( SELECT PostId AS pid, `<col4>` AS uid, `<col5>` AS udn FROM `<table10>` INNER JOIN first...
Number of tag-additions (per user).
<table0>[Has_Allergy] { <col0>[StuID]:[INTEGER] <col1>[Allergy]:[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>[Allergy_Type] { <...
SELECT Sex, AVG( `<col3>` ) FROM `<table1>` GROUP BY `<col4>`
Show me mean age by sex in a histogram
<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>`.days_stay, lab."CATEGORY" FROM `<table4>` INNER JOIN lab ON `<table4>`.hadm_id = lab.hadm_id WHERE `<table4>`.subject_id = "18372"
what is days of hospital stay and lab test category of subject id 18372?
<table0>[table_name_95] { <col0>[country]:[VARCHAR] }
SELECT 2011 FROM `<table0>` WHERE `<col0>` = "united states"
What was the value in 2011 for United States?
<table0>[jybgb] { <col0>[BBCJBW]:[text] <col1>[BBDM]:[text] <col2>[BBMC]:[text] <col3>[BBZT]:[number] <col4>[BGDH]:[text] <col5>[BGJGDM]:[text] <col6>[BGJGMC]:[text] <col7>[BGRGH]:[text] <col8>[BGRQ]:[time] <col9>[BGRXM]:[text] <col10>[BGSJ]:[time] <col11>[CJRQ]:[time] <col12>[JSBBRQSJ]:[time] <col13>[JSBBSJ]:[time] <c...
SELECT txmzjzjlb.JZLSH FROM `<table1>` JOIN txmzjzjlb ON `<table1>`.YLJGDM = txmzjzjlb.YLJGDM AND `<table1>`.KH = txmzjzjlb.KH AND `<table1>`.KLX = txmzjzjlb.KLX WHERE `<table1>`.RYBH = '96787952' AND `<table1>`.YLJGDM = '6798205' AND txmzjzjlb.JZKSMC LIKE '%手外科%' UNION SELECT ftxmzjzjlb.JZLSH FROM `<table1>` JOIN ftxm...
在医院6798205的科室名中有手外科几个字的就诊科室的门诊中,有哪些是患者96787952的就诊记录流水号
<table0>[ReviewTaskResults] { <col0>[number]:[ReviewTaskId] <col1>[number]:[ReviewTaskResultTypeId] <col2>[number]:[CreationDate] <col3>[time]:[RejectionReasonId] <col4>[number]:[Comment] } <table1>[PostTypes] { <col0>[number]:[text] } <table2>[ReviewTaskTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <t...
SELECT q.ViewCount AS "views", ROUND( q.ViewCount / q.AnswerCount, 2 ) AS "views_per_answer", q.AnswerCount AS "answer_count", q.Id AS "post_link", a.Score AS "answer_score", ( CASE WHEN q.AcceptedAnswerId = a.Id THEN 'Yes' ELSE NULL END ) AS "accepted", FLOOR( ( TIME_TO_STR( q.CreationDate, '%-HOUR' ) * 60 + TIME_TO_S...
Which of my answers have helped the Internet?. Shows you questions that you've answered that have significant view counts.
<table0>[highways] { <col0>[INT]:[name] <col1>[VARCHAR]:[255] <col2>[location]:[VARCHAR] <col3>[255]:[length] <col4>[FLOAT]:[INSERT] }
SELECT SUM( length ) FROM `<table0>` WHERE `<col2>` = 'Canada';
What is the total length of all the highways in Canada?
<table0>[table_name_2] { <col0>[outcome]:[VARCHAR] <col1>[score]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "6–3, 6–4"
What is the Outcome of the match with a Score of 6 3, 6 4?
<table0>[table_name_24] { <col0>[driver]:[VARCHAR] <col1>[rounds]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "3"
Name the driver for 3 rounds
<table0>[table_name_12] { <col0>[college_junior_club_team]:[VARCHAR] <col1>[nhl_team]:[VARCHAR] <col2>[nationality]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "toronto maple leafs" AND `<col2>` = "united states"
What College/junior/club had a player of United States nationality drafted by the Toronto Maple Leafs?
<table0>[table_26263954_1] { <col0>[english]:[VARCHAR] <col1>[kunrei_shiki]:[VARCHAR] }
SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "otya"
how many number of english when kunrei-shiki is otya
<table0>[PostFeedback] { <col0>[number]:[PostId] <col1>[number]:[IsAnonymous] <col2>[boolean]:[VoteTypeId] <col3>[number]:[CreationDate] } <table1>[CloseReasonTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table2>[ReviewTaskResults] { <col0>[number]:[ReviewTaskId] <col1>[number]:[ReviewTaskResultTypeId]...
SELECT COUNT( * ) FROM `<table15>`
How many users on StackOverflow.
<table0>[suppliers] { <col0>[INT]:[name] <col1>[TEXT]:[Praseodymium_production_2022] <col2>[FLOAT]:[environmental_impact_score] }
SELECT name, Praseodymium_production_2022, environmental_impact_score FROM `<table0>` ORDER BY Praseodymium_production_2022 DESC, environmental_impact_score ASC LIMIT 5;
List the top 5 Praseodymium suppliers based on 2022 production and their respective environmental impact scores.
<table0>[artist] { <col0>[artist_id]:[INT] <col1>[artist_name]:[VARCHAR] <col2>[country]:[VARCHAR] } <table1>[song] { <col0>[song_id]:[INT] <col1>[song_name]:[VARCHAR] <col2>[artist_id]:[INT] <col3>[length]:[INT] }
SELECT AVG( s.length ) FROM `<table0>` a JOIN song s ON a.`<table0>`_id = s.`<table0>`_id WHERE a.country = 'USA';
What is the average length (in seconds) of songs released by artists from the USA?
<table0>[city_budgets] { <col0>[city]:[VARCHAR] <col1>[255]:[sector] <col2>[VARCHAR]:[255] <col3>[budget]:[INT] <col4>[INSERT]:[city_budgets] }
SELECT SUM( `<col3>` ) FROM `<table0>` WHERE ( `<col0>` = 'City H' OR `<col0>` = 'City I' ) AND sector = 'healthcare'
What is the total budget allocated for healthcare in 'City H' and 'City I'?
<table0>[creative_ai_budget] { <col0>[INT]:[PRIMARY] <col1>[KEY]:[project_name] <col2>[VARCHAR]:[budget] <col3>[FLOAT]:[INSERT] }
SELECT project_name, budget FROM `<table0>` WHERE budget > 50000;
List of creative AI projects with budget over 50000.
<table0>[table_name_95] { <col0>[venue]:[VARCHAR] <col1>[discipline]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "3.3km c prologue"
What was the venue with a 3.3km c prologue discipline?
<table0>[table_61694] { <col0>[Date]:[text] <col1>[Date]:[text] <col2>[Position]:[text] <col3>[text]:[text] }
SELECT "Position" FROM `<table0>` WHERE "From" = 'leicester city'
What is the position of the player from Leicester City?
<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( * ) > 0 FROM `<table0>` WHERE `<table0>`.`<table1>`unitstayid IN ( SELECT `<table1>`.`<table1>`unitstayid FROM `<table1>` WHERE `<table1>`.`<table1>`healthsystemstayid IN ( SELECT `<table1>`.`<table1>`healthsystemstayid FROM `<table1>` WHERE `<table1>`.uniquepid = '002-16314' ) ) AND `<table0>`.`<table0>`...
did patient 002-16314 undergo an vitamin b12 test until 11/2100?
<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 procedures ON `<table1>`.hadm_id = procedures.hadm_id WHERE `<table1>`.insurance = "Self Pay" AND procedures.long_title = "Initial insertion of transvenous lead [electrode] into ventricle"
provide the number of patients whose insurance is self pay and procedure long title is initial insertion of transvenous lead [electrode] into ventricle?
<table0>[SuggestedEditVotes] { <col0>[number]:[SuggestedEditId] <col1>[number]:[UserId] <col2>[number]:[VoteTypeId] <col3>[number]:[CreationDate] <col4>[time]:[TargetUserId] <col5>[number]:[TargetRepChange] } <table1>[PostHistory] { <col0>[number]:[PostHistoryTypeId] <col1>[number]:[PostId] <col2>[number]:[RevisionGUI...
SELECT YEAR( CreationDate ) + ( MONTH( CreationDate ) / 12.0 ), COUNT( * ) * 1.0 / ( CASE WHEN YEAR( CreationDate ) = YEAR( @maxdate ) AND MONTH( CreationDate ) = MONTH( @maxdate ) THEN DAY( @maxdate ) ELSE DAY( DATEADD( DD, -1, DATEADD( MM, DATEDIFF( MM, -1, CreationDate ), 0 ) ) ) END ) FROM `<table28>` WHERE ParentI...
Questions and Answers per Day by Month.
<table0>[PostHistoryTypes] { <col0>[number]:[text] } <table1>[FlagTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table2>[Posts] { <col0>[number]:[PostTypeId] <col1>[number]:[AcceptedAnswerId] <col2>[number]:[ParentId] <col3>[number]:[CreationDate] <col4>[time]:[DeletionDate] <col5>[time]:[Score] <col6>[...
SELECT MONTH( p.CreationDate ), COUNT( p.Id ), ( SELECT COUNT( q.Id ) FROM `<table2>` AS q WHERE YEAR( q.CreationDate ) = '##Year##' AND MONTH( q.CreationDate ) = MONTH( p.CreationDate ) AND q.Score > 0 AND q.PostTypeId = 1 ), ( SELECT COUNT( r.Id ) FROM `<table2>` AS r WHERE YEAR( r.CreationDate ) = '##Year##' AND MON...
Positive score posts per month.
<table0>[table_name_64] { <col0>[la_crescenta__montrose]:[VARCHAR] <col1>[glendale]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "$57,112"
What is the figure for La Crescenta-Montrose when Gelndale is $57,112?
<table0>[d_icd_diagnoses] { <col0>[row_id]:[number] <col1>[icd9_code]:[text] <col2>[short_title]:[text] <col3>[long_title]:[text] } <table1>[patients] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[gender]:[text] <col3>[dob]:[time] <col4>[dod]:[time] } <table2>[prescriptions] { <col0>[row_id]:[number] <...
SELECT `<table3>`.valuenum FROM `<table3>` WHERE `<table3>`.icustay_id IN ( SELECT `<table13>`.icustay_id FROM `<table13>` WHERE `<table13>`.hadm_id IN ( SELECT `<table11>`.hadm_id FROM `<table11>` WHERE `<table11>`.subject_id = 9038 AND NOT `<table11>`.dischtime IS NULL ORDER BY `<table11>`.admittime LIMIT 1 ) ) AND `...
what the last height of patient 9038 during their first hospital encounter.
<table0>[film] { }
SELECT COUNT( * ) FROM `<table0>`
How many film are there?
<table0>[customer] { <col0>[cust_id]:[text] <col1>[cust_name]:[text] <col2>[acc_type]:[text] <col3>[acc_bal]:[number] <col4>[no_of_loans]:[number] <col5>[credit_score]:[number] <col6>[branch_id]:[number] <col7>[state]:[text] } <table1>[bank] { <col0>[branch_id]:[number] <col1>[bname]:[text] <col2>[no_of_customers]:[nu...
SELECT AVG( `<col2>` ) FROM `<table1>` WHERE `<col4>` = 'Utah'
What is the average number of customers across banks in the state of Utah?
<table0>[table_22255] { <col0>[Canton]:[text] <col1>[Years]:[Kindergarten] <col2>[real]:[Years] <col3>[Kindergarten]:[provided] <col4>[text]:[Years] <col5>[Kindergarten]:[legally] <col6>[required]:[text] <col7>[Length]:[Primary] <col8>[School]:[real] <col9>[Length]:[mandatory] <col10>[Secondary]:[School] <col11>[real]:...
SELECT "Integrated `<col10>` Schools?" FROM `<table0>` WHERE "Canton" = 'Basel-Stadt'
Are there integrated secondary schools in Basel-Stadt?
<table0>[hospitals] { <col0>[INT]:[PRIMARY] <col1>[KEY]:[name] <col2>[TEXT]:[state] <col3>[TEXT]:[total_beds] }
INSERT INTO hospitals ( name, state, total_beds ) VALUES ( 'Hospital AZ', 'AZ', 1000 );
Add a new record to the "hospitals" table for a hospital located in "AZ" with 1000 total beds
<table0>[table_name_69] { <col0>[grid]:[INTEGER] <col1>[laps]:[VARCHAR] <col2>[driver]:[VARCHAR] }
SELECT AVG( `<col0>` ) FROM `<table0>` WHERE `<col1>` < 14 AND `<col2>` = "reine wisell"
What is the average grid when the laps are smaller than 14 and Reine Wisell is the driver?
<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 `<table4>`.subject_id ) FROM `<table4>` INNER JOIN diagnoses ON `<table4>`.hadm_id = diagnoses.hadm_id WHERE `<table4>`.admission_location = "EMERGENCY ROOM ADMIT" AND diagnoses.icd9_code = "78039"
count the number of patients whose admission location is emergency room admit and diagnoses icd9 code is 78039?
<table0>[treatment] { <col0>[treatmentid]:[number] <col1>[patientunitstayid]:[number] <col2>[treatmentname]:[text] <col3>[treatmenttime]:[time] } <table1>[vitalperiodic] { <col0>[vitalperiodicid]:[number] <col1>[patientunitstayid]:[number] <col2>[temperature]:[number] <col3>[sao2]:[number] <col4>[heartrate]:[number] <...
SELECT 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 = '10 ml cup : magnesium hydroxide 2400 mg/10ml...
what are the three most commonly prescribed drugs for patients in 2105 that are also prescribed with 10 ml cup : magnesium hydroxide 2400 mg/10ml po susp at the same time?
<table0>[PrecisionAgriculture] { <col0>[HarvestYield]:[FieldID] <col1>[INT]:[Yield] <col2>[FLOAT]:[HarvestDate] } <table1>[PrecisionAgriculture] { <col0>[FieldDetails]:[FieldID] <col1>[INT]:[FieldSize] <col2>[FLOAT]:[Location] <col3>[VARCHAR]:[255] }
CREATE VIEW PrecisionAgriculture.AvgYieldByLocation AS SELECT fd.Location, AVG( hy.Yield ) FROM PrecisionAgriculture.FieldDetails fd INNER JOIN PrecisionAgriculture.HarvestYield hy ON fd.FieldID = hy.FieldID WHERE fd.FieldSize > 5000 GROUP BY fd.Location;
Create a view that selects the location and average yield of the fields with a size greater than 5000 square meters
<table0>[table_name_32] { <col0>[tournament]:[VARCHAR] <col1>[winning_score]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = –7( 66 - 72 - 69 - 74 = 281 )
Which tournament has a winning score at 7 (66-72-69-74=281)?
<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 `<table4>`.subject_id ) FROM `<table4>` INNER JOIN diagnoses ON `<table4>`.hadm_id = diagnoses.hadm_id INNER JOIN lab ON `<table4>`.hadm_id = lab.hadm_id WHERE diagnoses.short_title = "Long-term use of insulin" AND lab.label = "Urobilinogen"
what is the number of patients whose diagnoses short title is long-term use of insulin and lab test name is urobilinogen?
<table0>[drilling_operations] { <col0>[drill_id]:[INT] <col1>[well_id]:[INT] <col2>[start_date]:[DATE] <col3>[end_date]:[DATE] <col4>[status]:[VARCHAR] }
SELECT `<col1>` FROM `<table0>` WHERE `<col4>` = 'Completed' AND `<col2>` BETWEEN '2020-01-01' AND '2020-12-31' GROUP BY well_id;
Which wells had drilling operations completed in 2020?
<table0>[transactions] { <col0>[INT]:[transaction_hash] <col1>[VARCHAR]:[255] <col2>[gas_limit]:[INT] <col3>[timestamp]:[TIMESTAMP] }
SELECT AVG( `<col2>` ) as avg_gas_limit FROM `<table0>` WHERE `<col3>` >= DATE_SUB( NOW( ), INTERVAL 30 DAY );
What is the average gas limit for transactions in the last 30 days?
<table0>[table_name_50] { <col0>[opponents]:[VARCHAR] <col1>[date]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "may 6, 2006"
Who competed on may 6, 2006?
<table0>[table_dev_37] { <col0>[int]:[gender] <col1>[string]:[hemoglobin_a1c_hba1c] <col2>[float]:[diabetes_mellitus] <col3>[bool]:[dysglycemia] <col4>[bool]:[creatinine_clearance_cl] <col5>[float]:[estimated_glomerular_filtration_rate_egfr] <col6>[int]:[fasting_plasma_glucose] <col7>[int]:[serum_creatinine] <col8>[flo...
SELECT * FROM `<table0>` WHERE estimated_glomerular_filtration_rate_egfr < 60 OR ( serum_creatinine >= 1.4 AND gender = 'male' ) OR ( serum_creatinine >= 1.3 AND gender = 'female' )
egfr < 60 ml / min / 1.73 m2, or serum creatinine >= 1.4 mg / dl for male and >= 1.3 mg / dl for female
<table0>[table_name_18] { <col0>[license]:[VARCHAR] <col1>[actual_version]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "9.0"
Which License has an Actual Vaersion of 9.0?
<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>[prescriptions] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icustay_id]:[text] <col3>[drug_type...
SELECT MIN( `<table3>`.age ) FROM `<table3>` WHERE `<table3>`.gender = "M" AND `<table3>`.dob_year > "2076"
how many male patients were born after the year 2076?
<table0>[autonomous_taxis] { <col0>[taxi_id]:[INT] <col1>[ride_id]:[INT] <col2>[ride_city]:[VARCHAR] }
SELECT ride_city, COUNT( `<col1>` ) FROM `<table0>` GROUP BY ride_city;
List the number of autonomous taxi rides in Tokyo and Osaka, grouped by city.
<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 prescriptions ON `<table0>`.hadm_id = prescriptions.hadm_id WHERE `<table0>`.dod_year <= "2133.0" AND prescriptions.formulary_drug_cd = "ALBU17H"
count the number of patients who died in or before 2133 and their drug code is albu17h.
<table0>[ResilienceMetrics] { <col0>[INT]:[system_type] <col1>[TEXT]:[metric_number] <col2>[TEXT]:[description] <col3>[TEXT]:[INSERT] }
SELECT DISTINCT metric_number, description FROM `<table0>` WHERE system_type = 'Power Grid';
What are the unique resilience metrics for 'Power Grid' systems?
<table0>[NutritionData] { <col0>[product_id]:[INT] <col1>[product_type]:[VARCHAR] <col2>[is_vegan]:[BOOLEAN] <col3>[calorie_count]:[INT] }
SELECT product_type, MAX( `<col3>` ) FROM `<table0>` WHERE `<col2>` = TRUE GROUP BY product_type;
What is the maximum calorie count for vegan products in the NutritionData table, grouped by product type?
<table0>[PostHistoryTypes] { <col0>[number]:[text] } <table1>[Votes] { <col0>[number]:[PostId] <col1>[number]:[VoteTypeId] <col2>[number]:[UserId] <col3>[number]:[CreationDate] <col4>[time]:[BountyAmount] } <table2>[ReviewTaskTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table3>[PostsWithDeleted] { <c...
SELECT ROW_NUMBER( ) OVER ( ORDER BY Reputation DESC ) AS "#", Id AS "user_link", Reputation FROM `<table23>` WHERE LOWER( Location ) LIKE '%moscow%' OR UPPER( Location ) LIKE '%MOSCOW%' OR Location LIKE '%Moscow%' AND Reputation >= 100 ORDER BY Reputation DESC
Top users from Moscow, Russia.
<table0>[Tags] { <col0>[number]:[TagName] <col1>[text]:[Count] <col2>[number]:[ExcerptPostId] <col3>[number]:[WikiPostId] } <table1>[PendingFlags] { <col0>[number]:[FlagTypeId] <col1>[number]:[PostId] <col2>[number]:[CreationDate] <col3>[time]:[CloseReasonTypeId] <col4>[number]:[CloseAsOffTopicReasonTypeId] <col5>[num...
SELECT a.Id AS "Post Link", a.Score AS "A.Score", a.Body AS "A.Body", c.Text AS "C.Text", c.Score AS "C.Score" FROM `<table18>` AS q JOIN `<table18>` AS a ON q.Id = a.ParentId JOIN Comments AS c ON a.Id = c.PostId WHERE a.PostTypeId = 2 AND a.OwnerUserId = '##AnswererID:int##' AND c.UserId = '##CommenterID:int##' ORDER...
Comments by one user on answers by another user.
<table0>[Volunteers] { <col0>[INT]:[name] <col1>[TEXT]:[country] <col2>[TEXT]:[hours] <col3>[FLOAT]:[quarter] <col4>[TEXT]:[year] <col5>[INT]:[INSERT] }
SELECT country, AVG( hours ) FROM `<table0>` WHERE quarter = 'Q4' AND year = 2021 GROUP BY country;
What is the average volunteer hour contribution by volunteers in each country in Q4 of 2021?
<table0>[financial_wellbeing_age_gender] { <col0>[person_id]:[INT] <col1>[age]:[INT] <col2>[gender]:[VARCHAR] <col3>[score]:[INT] }
SELECT FLOOR( `<col1>` / 10 ) * 10 AS age_group, gender, AVG( `<col3>` ) FROM `<table0>` GROUP BY age_group, gender;
What is the average financial wellbeing score for each age group and gender?
<table0>[table_name_20] { <col0>[visitor]:[VARCHAR] <col1>[record]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "3–18"
Whose Visitor has a Record of 3 18?
<table0>[current] { <col0>[ballotpedia_id]:[text] <col1>[bioguide_id]:[text] <col2>[birthday_bio]:[date] <col3>[cspan_id]:[real] <col4>[fec_id]:[text] <col5>[first_name]:[text] <col6>[gender_bio]:[text] <col7>[google_entity_id_id]:[text] <col8>[govtrack_id]:[integer] <col9>[house_history_id]:[real] <col10>[icpsr_id]:[r...
SELECT COUNT( * ) FROM `<table0>` AS T1 INNER JOIN ``<table0>`-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.gender_bio = 'F' AND ( T2.class IS NULL OR T2.class = '' )
State number of legislators who are not the senator among female legislators.
<table0>[meals] { <col0>[INT]:[name] <col1>[TEXT]:[vegetarian] <col2>[BOOLEAN]:[price] <col3>[INT]:[INSERT] }
SELECT AVG( `<table0>`.price ) FROM `<table0>` WHERE `<table0>`.vegetarian = true;
What is the average price of vegetarian meals across all restaurants?
<table0>[program] { <col0>[program_id]:[int] <col1>[name]:[varchar] <col2>[college]:[varchar] <col3>[introduction]:[varchar] } <table1>[program_requirement] { <col0>[program_id]:[int] <col1>[category]:[varchar] <col2>[min_credit]:[int] <col3>[additional_req]:[varchar] } <table2>[student_record] { <col0>[student_id]:[...
SELECT DISTINCT course.department, course.name, course.number FROM course, program_course WHERE course.department LIKE '%MEMS%' AND program_course.category LIKE 'PreMajor' AND program_course.course_id = course.course_id
To declare a major in MEMS , are there certain classes that I need to take ?
<table0>[Accounts] { <col0>[Account_ID]:[INTEGER] <col1>[Statement_ID]:[INTEGER] <col2>[Account_Details]:[VARCHAR] } <table1>[Projects] { <col0>[Project_ID]:[INTEGER] <col1>[Project_Details]:[VARCHAR] } <table2>[Ref_Budget_Codes] { <col0>[Budget_Type_Code]:[CHAR] <col1>[Budget_Type_Description]:[VARCHAR] } <table3>[...
SELECT Statement_ID, COUNT( * ) FROM `<table0>` GROUP BY `<col1>`
what are the different statement ids on accounts, and the number of accounts for each?
<table0>[document_types] { <col0>[document_type_code]:[text] <col1>[document_description]:[text] } <table1>[projects] { <col0>[project_id]:[number] <col1>[organisation_id]:[number] <col2>[project_details]:[text] } <table2>[research_outcomes] { <col0>[outcome_code]:[text] <col1>[outcome_description]:[text] } <table3>...
SELECT date_from, `<col4>` FROM `<table5>` WHERE `<col1>` IN ( SELECT `<col1>` FROM `<table5>` GROUP BY `<col1>` ORDER BY COUNT( * ) DESC LIMIT 1 ) UNION SELECT date_from, `<col4>` FROM `<table5>` WHERE `<col2>` = 'leader'
From what date and to what date do the staff work on a project that has the most staff and has staff in a leader role?
<table0>[diagnoses] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table1>[prescriptions] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icustay_id]:[text] <col3>[drug_type]:[text] <col4>[drug]:[text] <col5>[formulary_drug_...
SELECT COUNT( DISTINCT `<table2>`.subject_id ) FROM `<table2>` INNER JOIN procedures ON `<table2>`.hadm_id = procedures.hadm_id WHERE `<table2>`.diagnosis = "NEWBORN" AND procedures.short_title = "Packed cell transfusion"
get the number of patients with newborn primary disease who had packed cell transfusion procedure.
<table0>[parttime_workers] { <col0>[INT]:[industry] <col1>[VARCHAR]:[salary] <col2>[FLOAT]:[union_member] <col3>[BOOLEAN]:[INSERT] }
SELECT MIN( salary ) FROM `<table0>` WHERE industry = 'manufacturing' AND union_member = false;
What is the minimum salary of part-time workers who are not union members in the 'manufacturing' industry?
<table0>[table_name_73] { <col0>[date]:[VARCHAR] <col1>[venue]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "exhibition stadium"
On what Date was the Venue at Exhibition Stadium?
<table0>[procedures_icd] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icd9_code]:[text] <col4>[charttime]:[time] } <table1>[inputevents_cv] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[charttime]:[time] <col5>...
SELECT DISTINCT `<table7>`.`<table7>` FROM `<table7>` WHERE `<table7>`.event_type = '`<table12>`' AND `<table7>`.event_id IN ( SELECT `<table12>`.row_id FROM `<table12>` WHERE `<table12>`.itemid IN ( SELECT `<table13>`.itemid FROM `<table13>` WHERE `<table13>`.label = 'ethanol' ) )
what's the price of ethanol.
<table0>[customers] { <col0>[INT]:[age] } <table1>[orders] { <col0>[INT]:[customer_id] <col1>[INT]:[dish_id] <col2>[INT]:[order_date] }
SELECT o.dish_id, COUNT( * ) FROM `<table1>` o JOIN customers c ON o.customer_id = c.id WHERE c.age BETWEEN 18 AND 35 GROUP BY o.dish_id;
Determine the number of times each dish was ordered by customers in the 18-35 age range.
<table0>[patient] { <col0>[uniquepid]:[text] <col1>[patienthealthsystemstayid]:[number] <col2>[patientunitstayid]:[number] <col3>[gender]:[text] <col4>[age]:[text] <col5>[ethnicity]:[text] <col6>[hospitalid]:[number] <col7>[wardid]:[number] <col8>[admissionheight]:[number] <col9>[admissionweight]:[number] <col10>[disch...
SELECT COUNT( * ) > 0 FROM `<table8>` WHERE `<table8>`.`<table0>`unitstayid IN ( SELECT `<table0>`.`<table0>`unitstayid FROM `<table0>` WHERE `<table0>`.`<table0>`healthsystemstayid IN ( SELECT `<table0>`.`<table0>`healthsystemstayid FROM `<table0>` WHERE `<table0>`.uniquepid = '013-29301' ) ) AND DATETIME( `<table8>`....
in 08/this year has patient 013-29301 had any allergies?
<table0>[manufacturing_machines] { <col0>[INT]:[region] <col1>[VARCHAR]:[255] <col2>[number_of_machines]:[INT] }
SELECT region, MAX( `<col2>` ) FROM `<table0>` GROUP BY region;
What is the maximum number of machines in the manufacturing industry for each region?
<table0>[table_name_84] { <col0>[sideline_reporters]:[VARCHAR] <col1>[color_commentator]:[VARCHAR] <col2>[pregame_analysts]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "john harkes" AND `<col2>` = "alexi lalas and steve mcmanaman"
When John Harkes was the color commentator, and Alexi Lalas and Steve McManaman were the pregame analysts, who were the sideline reporters?
<table0>[weekly_weather] { <col0>[station_id]:[int] <col1>[day_of_week]:[text] <col2>[high_temperature]:[int] <col3>[low_temperature]:[int] <col4>[precipitation]:[real] <col5>[wind_speed_mph]:[int] } <table1>[route] { <col0>[train_id]:[int] <col1>[station_id]:[int] } <table2>[station] { <col0>[int]:[network_name] <co...
SELECT name, COUNT( name ) FROM `<table3>` GROUP BY name ORDER BY name DESC
Plot how many name by grouped by name as a bar graph, I want to order by the X in descending please.
<table0>[university] { <col0>[School_ID]:[int] <col1>[School]:[text] <col2>[Location]:[text] <col3>[Founded]:[real] <col4>[Affiliation]:[text] <col5>[Enrollment]:[real] <col6>[Nickname]:[text] <col7>[Primary_conference]:[text] } <table1>[basketball_match] { <col0>[Team_ID]:[int] <col1>[School_ID]:[int] <col2>[Team_Nam...
SELECT ACC_Road, `<col0>` FROM `<table1>` GROUP BY ACC_Home, `<col6>` ORDER BY `<col6>` DESC
Find ACC_Road and Team_ID , and group by attribute ACC_Home, and visualize them by a bar chart, and could you show X in descending order?
<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.icd9_code = "42613" AND lab."CATEGORY" = "Hematology"
give me the number of patients whose diagnoses icd9 code is 42613 and lab test category is hematology?
<table0>[time_zone] { <col0>[time_zone_code]:[text] <col1>[time_zone_name]:[text] <col2>[hours_from_gmt]:[int] } <table1>[aircraft] { <col0>[aircraft_code]:[varchar] <col1>[aircraft_description]:[varchar] <col2>[manufacturer]:[varchar] <col3>[basic_type]:[varchar] <col4>[engines]:[int] <col5>[propulsion]:[varchar] <co...
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_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'OAKLAND' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'DENVER' AND fl...
show me all flights arriving to DENVER from OAKLAND
<table0>[table_name_83] { <col0>[high_assists]:[VARCHAR] <col1>[team]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "@ milwaukee"
What is High Assists, when Team is "@ Milwaukee"?
<table0>[patients] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[gender]:[text] <col3>[dob]:[time] <col4>[dod]:[time] } <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>...
SELECT DISTINCT `<table2>`.`<table2>` FROM `<table2>` WHERE `<table2>`.event_type = '`<table5>`' AND `<table2>`.event_id IN ( SELECT `<table5>`.row_id FROM `<table5>` WHERE `<table5>`.icd9_code = ( SELECT `<table3>`.icd9_code FROM `<table3>` WHERE `<table3>`.short_title = 'nonsp abn find-gu organs' ) )
how much does it cost to check for nonsp abn find-gu organs?
<table0>[table_30285] { <col0>[English]:[word] <col1>[text]:[Slovak] <col2>[text]:[Czech] <col3>[text]:[Rusyn] <col4>[text]:[Ukrainian] <col5>[text]:[Belarusian] <col6>[text]:[Polish] <col7>[text]:[Serbo] <col8>[Croatian]:[text] <col9>[Bulgarian]:[text] }
SELECT "English word" FROM `<table0>` WHERE "Ukrainian" = 'Дякую ( diakuju )'
How do you say the ukrainian word (diakuju) in English?
<table0>[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] <col7>[valueuom]:[text] } <table1>[d_icd_diagnoses] { <col0>[row_id]:[number] <col1>[icd9_code]:[text] <col2>[short...
SELECT `<table1>`.short_title FROM `<table1>` WHERE `<table1>`.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, `<table8>`.charttime FROM `<table8>` JOIN admissions ON `<table8>`.hadm_id = admissions.hadm_id WHERE `...
what were the three most frequently diagnosed diagnoses for patients who had been diagnosed with preterm nec 2000-2499g before within the same month, since 5 years ago?
<table0>[table_204_850] { <col0>[number]:[name] <col1>[text]:[railway] <col2>[text]:[series] <col3>[text]:[maker] <col4>[text]:[dates] <col5>[text]:[drive] <col6>[text]:[wheel] <col7>[arrangement]:[text] <col8>[weight]:[text] <col9>[power]:[text] <col10>[notes]:[text] }
SELECT "name" FROM `<table0>` ORDER BY "weight" LIMIT 1
which locomotive weighs the least ?
<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>` WHERE `<table3>`.discharge_location = "LONG TERM CARE HOSPITAL" AND `<table3>`.dob_year < "2058"
provide the number of patients whose discharge location is long term care hospital and year of birth is less than 2058?
<table0>[table_63863] { <col0>[Year]:[real] <col1>[Population]:[real] <col2>[Year]:[change] <col3>[text]:[Year] <col4>[change]:[text] <col5>[Rank]:[Provinces] }
SELECT AVG( "Year" ) FROM `<table0>` WHERE "Ten `<col0>` % change" = '67.3' AND "Rank Among Provinces" > '5'
What is the average year having a rank among provinces over 5 and ten-year percentage change of 67.3?
<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 `<table5>`.`<table5>`time FROM `<table5>` WHERE `<table5>`.`<table7>`unitstayid IN ( SELECT `<table7>`.`<table7>`unitstayid FROM `<table7>` WHERE `<table7>`.`<table7>`healthsystemstayid IN ( SELECT `<table7>`.`<table7>`healthsystemstayid FROM `<table7>` WHERE `<table7>`.uniquepid = '002-59265' ) AND NOT `<table7...
what was the last time of patient 002-59265's epoprostenol intake on the last icu visit?
<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>`.age < "71" AND diagnoses.icd9_code = "2875"
give me the number of patients whose age is less than 71 and diagnoses icd9 code is 2875?
<table0>[authorship] { <col0>[authid]:[number] <col1>[instid]:[number] <col2>[paperid]:[number] <col3>[authorder]:[number] } <table1>[papers] { <col0>[paperid]:[number] <col1>[title]:[text] } <table2>[inst] { <col0>[instid]:[number] <col1>[name]:[text] <col2>[country]:[text] } <table3>[authors] { <col0>[authid]:[num...
SELECT t1.name FROM `<table2>` AS t1 JOIN authorship AS t2 ON t1.`<table2>`id = t2.`<table2>`id JOIN papers AS t3 ON t2.paperid = t3.paperid GROUP BY t1.name ORDER BY COUNT( * ) DESC LIMIT 1
Which institution has the most papers? Find the name of the institution.
<table0>[table_44355] { <col0>[Game]:[real] <col1>[Team]:[text] <col2>[Score]:[text] <col3>[Location]:[Attendance] <col4>[text]:[Series] }
SELECT MAX( "Game" ) FROM `<table0>` WHERE "Team" = '@boston' AND "Series" = '0-1'
what is the highest game when the team is @boston and the series is 0-1?
<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 lab ON `<table2>`.hadm_id = lab.hadm_id WHERE lab.itemid = "51458"
give me the number of patients whose item id is 51458?
<table0>[airport] { <col0>[airport_code]:[varchar] <col1>[airport_name]:[text] <col2>[airport_location]:[text] <col3>[state_code]:[varchar] <col4>[country_name]:[varchar] <col5>[time_zone_code]:[varchar] <col6>[minimum_connect_time]:[int] } <table1>[code_description] { <col0>[code]:[varchar] <col1>[description]:[text]...
SELECT DISTINCT flight.flight_id FROM `<table14>` AS AIRPORT_SERVICE_0, `<table14>` AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, days AS DAYS_0, days AS DAYS_1, flight WHERE ( ( DAYS_0.day_name = 'WEDNESDAY' AND DAYS_1.day_name = 'THURSDAY' AND flight.flight_days = DAYS_0.days_code AND flight.flight_days = DAY...
show me the flights from BOSTON to PITTSBURGH leaving WEDNESDAY and THURSDAY
<table0>[north_america_hotels] { <col0>[country]:[VARCHAR] <col1>[type]:[VARCHAR] }
SELECT country, COUNT( * ) as count FROM `<table0>` WHERE `<col1>` = 'Luxury' GROUP BY `<col0>` ORDER BY count DESC;
Which countries in North America have the most luxury hotels?
<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 `<table1>` AS AIRPORT_SERVICE_0, `<table1>` AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, flight WHERE ( ( CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'TAMPA' AND date_day.day_number = 25 AND date_day.month_number = 6 AND date_day.y...
list all nonstop flights from NEWARK to TAMPA leaving on friday
<table0>[hardware_data] { <col0>[model_id]:[INT] <col1>[model_name]:[VARCHAR] <col2>[platform]:[VARCHAR] <col3>[application]:[VARCHAR] }
SELECT platform, COUNT( `<col0>` ) as num_models FROM `<table0>` GROUP BY platform;
What is the distribution of models trained on different hardware platforms for AI applications?
<table0>[Products] { <col0>[Code]:[INTEGER] <col1>[VARCHAR]:[255] <col2>[Price]:[DECIMAL] <col3>[Manufacturer]:[INTEGER] } <table1>[Manufacturers] { <col0>[Code]:[INTEGER] <col1>[VARCHAR]:[255] <col2>[Headquarter]:[VARCHAR] <col3>[255]:[Founder] <col4>[VARCHAR]:[255] <col5>[Revenue]:[REAL] }
SELECT T2.Founder, T1.Code FROM `<table0>` AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Founder ORDER BY T2.Founder
For those records from the products and each product's manufacturer, visualize a bar chart about the distribution of founder and the sum of code , and group by attribute founder, show by the X from low to high.
<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_Road, `<col1>` FROM `<table1>`
I want to know the proportion of school id for each all road.
<table0>[exists] { <col0>[wells]:[well_id] <col1>[int]:[region] <col2>[varchar]:[production_year] <col3>[int]:[gas_production] <col4>[int]:[INSERT] <col5>[wells]:[well_id] <col6>[region]:[production_year] <col7>[gas_production]:[VALUES] <col8>[Marcellus]:[Shale] <col9>[2018]:[900000] <col10>[Marcellus]:[Shale] <col11>[...
SELECT gas_production FROM wells WHERE well_id = 6 AND region = 'Marcellus Shale';
Find the gas production of the well with ID 6 in the Marcellus Shale region
<table0>[table_name_12] { <col0>[date]:[VARCHAR] <col1>[score]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "1–6 6–1 3–6"
On what day was the score of 1 6 6 1 3 6 achieved?
<table0>[basketball_match] { <col0>[Team_ID]:[int] <col1>[School_ID]:[int] <col2>[Team_Name]:[text] <col3>[ACC_Regular_Season]:[text] <col4>[ACC_Percent]:[text] <col5>[ACC_Home]:[text] <col6>[ACC_Road]:[text] <col7>[All_Games]:[text] <col8>[All_Games_Percent]:[int] <col9>[All_Home]:[text] <col10>[All_Road]:[text] <col1...
SELECT Team_ID, `<col8>` FROM `<table0>` GROUP BY `<col2>`
Visualize the relationship between Team_ID and All_Games_Percent , and group by attribute Team_Name.
<table0>[table_55479] { <col0>[Tournament]:[text] <col1>[2007]:[text] <col2>[2008]:[text] <col3>[2009]:[text] <col4>[2010]:[text] <col5>[2011]:[text] <col6>[2012]:[text] }
SELECT "2009" FROM `<table0>` WHERE "2008" = '2r' AND "2011" = '2r'
What is the categorization in 2009 when it was 2R in 2008 and 2011?
<table0>[exhibition_record] { <col0>[Exhibition_ID]:[int] <col1>[Date]:[text] <col2>[Attendance]:[int] } <table1>[exhibition] { <col0>[Exhibition_ID]:[int] <col1>[Year]:[int] <col2>[Theme]:[text] <col3>[Artist_ID]:[int] <col4>[Ticket_Price]:[real] } <table2>[artist] { <col0>[Artist_ID]:[int] <col1>[text]:[Country] <c...
SELECT Country, AVG( Age ) FROM `<table2>` GROUP BY Country ORDER BY AVG( Age )
What are the average ages of artists by countries? Visualize the result with a histogram, and I want to display in asc by the total number.
<table0>[table_21578303_2] { <col0>[stage]:[VARCHAR] <col1>[time__eet]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE time__eet_ = "15:17"
Which stage has 15:17 as time?
<table0>[unions] { <col0>[INT]:[name] <col1>[VARCHAR]:[255] <col2>[state]:[VARCHAR] } <table1>[union_industry] { <col0>[INT]:[union_id] <col1>[INT]:[industry] <col2>[VARCHAR]:[255] <col3>[workers]:[INT] <col4>[INSERT]:[unions] <col5>[name]:[state] <col6>[VALUES]:[AFT] <col7>[Texas]:[INSERT] }
SELECT ui.industry, MAX( ui.workers ) as max_workers FROM `<table1>` ui JOIN unions u ON ui.union_id = u.id WHERE u.state = 'Texas' GROUP BY ui.industry;
What is the maximum number of workers in each union by industry in Texas?
<table0>[countries] { <col0>[COUNTRY_ID]:[varchar] <col1>[COUNTRY_NAME]:[varchar] <col2>[REGION_ID]:[decimal] } <table1>[locations] { <col0>[LOCATION_ID]:[decimal] <col1>[STREET_ADDRESS]:[varchar] <col2>[POSTAL_CODE]:[varchar] <col3>[CITY]:[varchar] <col4>[STATE_PROVINCE]:[varchar] <col5>[COUNTRY_ID]:[varchar] } <tab...
SELECT HIRE_DATE, SUM( `<col10>` ) FROM `<table5>` WHERE `<col5>` < '2002-06-21' ORDER BY SUM( `<col10>` ) DESC
For those employees who was hired before 2002-06-21, give me the comparison about the sum of department_id over the hire_date bin hire_date by time, could you show in descending by the total number please?
<table0>[dual_carrier] { <col0>[main_airline]:[varchar] <col1>[low_flight_number]:[int] <col2>[high_flight_number]:[int] <col3>[dual_airline]:[varchar] <col4>[service_name]:[text] } <table1>[flight_fare] { <col0>[flight_id]:[int] <col1>[fare_id]:[int] } <table2>[flight] { <col0>[aircraft_code_sequence]:[text] <col1>[...
SELECT DISTINCT flight.flight_id FROM `<table3>` AS AIRPORT_SERVICE_0, `<table3>` AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, flight WHERE ( ( CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'LOS ANGELES' AND date_day.day_number = 20 AND date_day.month_number = 1 AND date...
i need a flight from NEWARK to LOS ANGELES leaving tomorrow evening
<table0>[services] { <col0>[service_id]:[number] <col1>[service_type_code]:[text] } <table1>[participants] { <col0>[participant_id]:[number] <col1>[participant_type_code]:[text] <col2>[participant_details]:[text] } <table2>[participants_in_events] { <col0>[event_id]:[number] <col1>[participant_id]:[number] } <table3...
SELECT service_id, `<col2>` FROM `<table3>`
List the service id and details for the events.
<table0>[table_50819] { <col0>[Number]:[real] <col1>[Player]:[text] <col2>[Position]:[text] <col3>[Height]:[text] <col4>[Weight]:[real] <col5>[Years]:[Exp] <col6>[text]:[College] }
SELECT "Position" FROM `<table0>` WHERE "Weight" > '200' AND "Number" < '44' AND "Years Exp" = '9' AND "College" = 'university of new mexico'
What is Position, when Weight is greater than 200, when Number is less than 44, when Years Exp is 9, and when College is 'University of New Mexico'?
<table0>[cargo_data] { <col0>[INT]:[vessel_name] <col1>[TEXT]:[cargo_weight] <col2>[INT]:[region] <col3>[TEXT]:[loading_date] }
SELECT AVG( cargo_weight ) FROM `<table0>` WHERE region = 'Arctic' AND loading_date >= DATE_SUB( CURRENT_DATE, INTERVAL 1 MONTH );
What is the average cargo weight for vessels in the Arctic region?
<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 = "ELECTIVE" AND lab.label = "Asparate Aminotransferase ( AST )"
provide the number of patients whose admission type is elective and lab test name is asparate aminotransferase (ast)?