schema stringlengths 20 14.6k | query stringlengths 17 2.58k | question stringlengths 8 1.06k |
|---|---|---|
<table0>[class_of_service] { <col0>[booking_class]:[varchar] <col1>[rank]:[int] <col2>[class_description]:[text] } <table1>[equipment_sequence] { <col0>[aircraft_code_sequence]:[varchar] <col1>[aircraft_code]:[varchar] } <table2>[days] { <col0>[days_code]:[varchar] <col1>[day_name]:[varchar] } <table3>[state] { <col... | SELECT DISTINCT airline.airline_code FROM airline, airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE ( ( flight.airline_code = 'UA' ) AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BALTIMORE' AND flight.to_airport = AIRPO... | does UA fly from DENVER to BALTIMORE |
<table0>[game_sales] { <col0>[INT]:[game_name] <col1>[VARCHAR]:[genre] <col2>[VARCHAR]:[sale_date] <col3>[DATE]:[revenue] <col4>[DECIMAL]:[INSERT] } | SELECT SUM( `<table0>`.revenue ) FROM `<table0>` WHERE `<table0>`.genre = 'Simulation' AND `<table0>`.sale_date >= DATEADD( month, -6, GETDATE( ) ) AND ( `<table0>`.country = 'USA' OR `<table0>`.country = 'Canada' ); | What is the total revenue of the 'Simulation' game genre sold in the United States and Canada in the last 6 months? |
<table0>[church] { <col0>[Church_ID]:[int] <col1>[text]:[Organized_by] <col2>[text]:[Open_Date] <col3>[int]:[Continuation_of] } <table1>[wedding] { <col0>[Church_ID]:[int] <col1>[Male_ID]:[int] <col2>[Female_ID]:[int] <col3>[Year]:[int] } <table2>[people] { <col0>[People_ID]:[int] <col1>[text]:[Country] <col2>[text]:... | SELECT Open_Date, COUNT( Open_Date ) FROM `<table0>` ORDER BY COUNT( Open_Date ) DESC | Bar chart x axis open date y axis how many open date, rank total number in desc order.
|
<table0>[table_dev_3] { <col0>[int]:[bleeding] <col1>[int]:[hemoglobin_a1c_hba1c] <col2>[float]:[trauma] <col3>[bool]:[diabetic] <col4>[string]:[creatinine_clearance_cl] <col5>[float]:[surgery] <col6>[bool]:[autonomic_dysfunction] <col7>[bool]:[urine_protein] <col8>[int]:[proteinuria] <col9>[int]:[body_mass_index_bmi] ... | SELECT * FROM `<table0>` WHERE surgery = 1 OR ( trauma = 1 AND bleeding > 500 ) | surgery or trauma with significant blood loss ( more than 500 ml ) within the last 3 months prior to trial start
|
<table0>[table_name_95] { <col0>[date]:[VARCHAR] <col1>[circuit]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "bahrain international circuit" | What's the date of Bahrain International Circuit? |
<table0>[table_name_76] { <col0>[date]:[VARCHAR] <col1>[circuit]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "pescara" | Name the date for pescara |
<table0>[prescriptions] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icustay_id]:[text] <col3>[drug_type]:[text] <col4>[drug]:[text] <col5>[formulary_drug_cd]:[text] <col6>[route]:[text] <col7>[drug_dose]:[text] } <table1>[demographic] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[name]:[text]... | SELECT COUNT( DISTINCT `<table1>`.subject_id ) FROM `<table1>` INNER JOIN diagnoses ON `<table1>`.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON `<table1>`.hadm_id = prescriptions.hadm_id WHERE diagnoses.short_title = "BMI less than 19,adult" AND prescriptions.drug_type = "ADDITIVE" | how many patients whose diagnoses short title is bmi less than 19,adult and drug type is additive?
|
<table0>[Visitors] { <col0>[INT]:[race] <col1>[VARCHAR]:[region] <col2>[VARCHAR]:[exhibition] <col3>[VARCHAR]:[num_visitors] <col4>[INT]:[INSERT] } | SELECT SUM( num_visitors ) FROM `<table0>` WHERE race = 'AAPI' AND region = 'Southern'; | What is the total number of visitors who identified as AAPI and attended exhibitions in the Southern region? |
<table0>[diagnoses] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table1>[prescriptions] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icustay_id]:[text] <col3>[drug_type]:[text] <col4>[drug]:[text] <col5>[formulary_drug_... | SELECT COUNT( DISTINCT `<table4>`.subject_id ) FROM `<table4>` INNER JOIN diagnoses ON `<table4>`.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON `<table4>`.hadm_id = prescriptions.hadm_id WHERE diagnoses.short_title = "Status autm crd dfbrltr" AND prescriptions.drug_type = "BASE" | count the number of patients on base drug type prescription who have had automatic implantable cardiac defibrillator in situ procedure. |
<table0>[CybersecurityIncidents] { <col0>[region]:[VARCHAR] <col1>[255]:[year] <col2>[INT]:[incidents] <col3>[INT]:[INSERT] } | SELECT MAX( incidents ) FROM `<table0>` WHERE `<col0>` = 'North America'; | What is the maximum number of cybersecurity incidents reported in the North American region in a single year? |
<table0>[table_name_41] { <col0>[total]:[VARCHAR] <col1>[set_1]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "24:26" | What is the Total of the 24:26 Set 1?
|
<table0>[lab] { <col0>[labid]:[number] <col1>[patientunitstayid]:[number] <col2>[labname]:[text] <col3>[labresult]:[number] <col4>[labresulttime]:[time] } <table1>[medication] { <col0>[medicationid]:[number] <col1>[patientunitstayid]:[number] <col2>[drugname]:[text] <col3>[dosage]:[text] <col4>[routeadmin]:[text] <col... | SELECT t2.drugname FROM ( SELECT `<table4>`.uniquepid, `<table7>`.`<table7>`time FROM `<table7>` JOIN `<table4>` ON `<table7>`.`<table4>`unitstayid = `<table4>`.`<table4>`unitstayid WHERE `<table4>`.`<table4>`healthsystemstayid IN ( SELECT `<table4>`.`<table4>`healthsystemstayid FROM `<table4>` WHERE `<table4>`.uniquep... | what is the name of the drug patient 030-53416 was prescribed within 2 days after having received a inotropic agent procedure in the last hospital encounter.
|
<table0>[table_70507] { <col0>[Team]:[text] <col1>[Country]:[text] <col2>[Value]:[real] <col3>[Debt]:[value] <col4>[text]:[change] <col5>[year]:[text] <col6>[Revenue]:[real] <col7>[Operating]:[income] } | SELECT MAX( "Operating income( $m )" ) FROM `<table0>` WHERE "% change on year" = '2' AND "Value ( $M )" < '1,036' | What is the highest operating income that change by 2% and is less than $1,036m?
|
<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 lab ON `<table4>`.hadm_id = lab.hadm_id WHERE `<table4>`.diagnosis = "CHEST PAIN" AND lab.fluid = "Joint Fluid" | count the number of patients whose primary disease is chest pain and lab test fluid is joint fluid. |
<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>[airport] { <col0>[airport_code]:[varchar] <col1>[airport_name]:[text] <col2>[airport_location]:[text] <col3>[state_code]:[varcha... | SELECT DISTINCT flight.departure_time FROM `<table15>` AS AIRPORT_SERVICE_0, `<table15>` 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 = 'BOSTON' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.ci... | one way
|
<table0>[EnergyConsumption] { <col0>[INT]:[country] <col1>[VARCHAR]:[sequence] <col2>[INT]:[energy] <col3>[INT]:[INSERT] } | SELECT country, AVG( energy ) OVER ( PARTITION BY country ORDER BY sequence ROWS BETWEEN 2 PRECEDING AND CURRENT ROW ) AS moving_avg FROM EnergyConsumption; | What is the moving average of energy consumption for the latest 3 virtual tours in each country? |
<table0>[table_name_92] { <col0>[date]:[VARCHAR] <col1>[winning_score]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = –5( 70 - 65 - 69 - 75 = 279 ) | On which date was the Winning score –5 (70-65-69-75=279)? |
<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>`.diagnosis = "OVERDOSE" AND lab.flag = "delta" | how many patients whose primary disease is overdose and lab test abnormal status is delta?
|
<table0>[ai_for_social_equality] { <col0>[INT]:[project_name] <col1>[VARCHAR]:[255] <col2>[contact_person]:[VARCHAR] <col3>[255]:[INSERT] } | SELECT `<col2>` FROM `<table0>` WHERE project_name = 'AI for Social Equality'; | Who is the contact person for the AI for Social Equality project? |
<table0>[table_name_49] { <col0>[city]:[VARCHAR] <col1>[opposition]:[VARCHAR] <col2>[year]:[VARCHAR] <col3>[venue]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col2>` < 1907 AND `<col3>` = "old trafford" AND `<col1>` = "sussex" | Which city held the game in Old Trafford before 1907 when the Opposition was sussex? |
<table0>[table_name_55] { <col0>[event]:[VARCHAR] <col1>[opponent]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "carlos alexandre pereira" | Which event had Carlos Alexandre Pereira as opponent?
|
<table0>[table_name_68] { <col0>[crowd]:[INTEGER] <col1>[away_team]:[VARCHAR] } | SELECT MIN( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "st kilda" | In games where st kilda was the away team, what was the smallest crowd?
|
<table0>[table_2668378_5] { <col0>[party]:[VARCHAR] <col1>[district]:[VARCHAR] } | SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "Kentucky 1" | Name the number of party for kentucky 1
|
<table0>[arctic_stations] { <col0>[INT]:[station_name] <col1>[TEXT]:[temperature] <col2>[DECIMAL]:[measurement_date] <col3>[DATE]:[INSERT] } | SELECT station_name, MAX( temperature ) FROM `<table0>` WHERE measurement_date BETWEEN '2023-01-01' AND '2023-12-31' UNION SELECT station_name, MIN( temperature ) FROM `<table0>` WHERE measurement_date BETWEEN '2023-01-01' AND '2023-12-31'; | Find the stations with the highest and lowest temperatures recorded in 2023. |
<table0>[prescriptions] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[startdate]:[time] <col4>[enddate]:[time] <col5>[drug]:[text] <col6>[dose_val_rx]:[text] <col7>[dose_unit_rx]:[text] <col8>[route]:[text] } <table1>[icustays] { <col0>[row_id]:[number] <col1>[subject_id]:[numbe... | SELECT MIN( `<table13>`.valuenum ) FROM `<table13>` WHERE `<table13>`.icustay_id IN ( SELECT `<table1>`.icustay_id FROM `<table1>` WHERE `<table1>`.hadm_id IN ( SELECT `<table8>`.hadm_id FROM `<table8>` WHERE `<table8>`.subject_id = 12726 ) AND `<table1>`.outtime IS NULL ) AND `<table13>`.itemid IN ( SELECT `<table2>`.... | indicate the daily minimum amount of temperature c (calc) for patient 12726 on the current icu visit. |
<table0>[microlab] { <col0>[microlabid]:[number] <col1>[patientunitstayid]:[number] <col2>[culturesite]:[text] <col3>[organism]:[text] <col4>[culturetakentime]:[time] } <table1>[diagnosis] { <col0>[diagnosisid]:[number] <col1>[patientunitstayid]:[number] <col2>[diagnosisname]:[text] <col3>[diagnosistime]:[time] <col4>... | SELECT `<table7>`.drugstarttime FROM `<table7>` WHERE `<table7>`.`<table3>`unitstayid IN ( SELECT `<table3>`.`<table3>`unitstayid FROM `<table3>` WHERE `<table3>`.`<table3>`healthsystemstayid IN ( SELECT `<table3>`.`<table3>`healthsystemstayid FROM `<table3>` WHERE `<table3>`.uniquepid = '016-27397' ) ) AND `<table7>`.... | what was the first time patient 016-27397 was prescribed a drug via per j tube route in 12/this year?
|
<table0>[procedures] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table1>[demographic] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[name]:[text] <col3>[marital_status]:[text] <col4>[age]:[text] <col5>[dob]:[text] <col6>... | SELECT COUNT( DISTINCT `<table1>`.subject_id ) FROM `<table1>` INNER JOIN procedures ON `<table1>`.hadm_id = procedures.hadm_id WHERE `<table1>`.admityear < "2194" AND procedures.short_title = "Arterial catheterization" | give me the number of patients whose admission year is less than 2194 and procedure short title is arterial catheterization? |
<table0>[table_72598] { <col0>[Tournament]:[text] <col1>[Country]:[text] <col2>[Location]:[text] <col3>[Current]:[Venue] <col4>[text]:[Began] <col5>[real]:[Court] <col6>[surface]:[text] } | SELECT "Current Venue" FROM `<table0>` WHERE "Location" = 'Mason, Ohio' | Which current venues location is Mason, Ohio?
|
<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 T2.Name, T1.Price FROM `<table1>` AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name | For those records from the products and each product's manufacturer, visualize a bar chart about the distribution of name and the average of price , and group by attribute name.
|
<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>[microbiologyevents] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[... | SELECT MIN( `<table3>`.valuenum ) FROM `<table3>` WHERE `<table3>`.icustay_id IN ( SELECT `<table11>`.icustay_id FROM `<table11>` WHERE `<table11>`.hadm_id IN ( SELECT `<table7>`.hadm_id FROM `<table7>` WHERE `<table7>`.subject_id = 3229 ) AND NOT `<table11>`.outtime IS NULL ORDER BY `<table11>`.intime LIMIT 1 ) AND `<... | whats patient 3229 minimum arterial bp mean on the first icu visit?
|
<table0>[Badges] { <col0>[number]:[UserId] <col1>[number]:[text] <col2>[Date]:[time] <col3>[Class]:[number] <col4>[TagBased]:[boolean] } <table1>[CloseReasonTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table2>[PostsWithDeleted] { <col0>[number]:[PostTypeId] <col1>[number]:[AcceptedAnswerId] <col2>[num... | SELECT COUNT( Q.Id ) FROM `<table18>` AS Q, `<table18>` AS A, `<table18>` AS OA WHERE Q.AnswerCount > 1 AND A.ParentId = Q.Id AND OA.ParentId = Q.Id AND A.Id = Q.AcceptedAnswerId AND OA.Id != Q.AcceptedAnswerId AND A.Score < OA.Score | Questions where accepted answer score lower than any other answer score. |
<table0>[table_name_74] { <col0>[livery]:[VARCHAR] <col1>[status]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "in service as coaching stock" | what livery has a status of in service as coaching stock?
|
<table0>[table_name_7] { <col0>[overall]:[INTEGER] <col1>[college]:[VARCHAR] } | SELECT MIN( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "oregon state" | What is the smallest overall for Oregon State?
|
<table0>[community_education] { <col0>[attendee_id]:[INT] <col1>[program]:[VARCHAR] <col2>[year]:[INT] <col3>[score]:[INT] } | SELECT COUNT( DISTINCT `<col1>` ) FROM `<table0>` WHERE `<col2>` = 2021; | what is the total number of community education programs in 2021? |
<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 lab ON `<table1>`.hadm_id = lab.hadm_id WHERE lab.itemid = "50994" | find out the number of patients with lab test item id 50994. |
<table0>[table_name_10] { <col0>[lost]:[INTEGER] <col1>[points]:[VARCHAR] <col2>[draw]:[VARCHAR] } | SELECT SUM( `<col0>` ) FROM `<table0>` WHERE `<col1>` > 21 AND `<col2>` = 2 | What is the total value for Lost, when the value for Points is greater than 21, and when the value for Draw is 2? |
<table0>[table_204_232] { <col0>[number]:[rank] <col1>[number]:[nation] <col2>[text]:[gold] <col3>[number]:[silver] <col4>[number]:[bronze] <col5>[number]:[total] } | SELECT "nation" FROM `<table0>` WHERE "gold" < ( SELECT "gold" FROM `<table0>` WHERE "nation" = 'colombia' ) ORDER BY "gold" DESC LIMIT 1 | nation to earn the most gold medals after colombia
|
<table0>[procedures] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table1>[diagnoses] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table2>[prescr... | SELECT COUNT( DISTINCT `<table4>`.subject_id ) FROM `<table4>` INNER JOIN lab ON `<table4>`.hadm_id = lab.hadm_id WHERE `<table4>`.dob_year < "2123" AND lab.label = "Immunoglobulin A" | what is the number of patients whose year of birth is less than 2123 and lab test name is immunoglobulin a? |
<table0>[table_name_69] { <col0>[home_team]:[VARCHAR] <col1>[away_team]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "richmond" | What home team has Richmond listed as their Away team? |
<table0>[restorative_programs] { <col0>[program_id]:[INT] <col1>[state]:[VARCHAR] } | SELECT COUNT( * ) FROM `<table0>` WHERE `<col1>` = 'New York'; | What is the total number of restorative justice programs in the state of New York? |
<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>[cinema] { <col0>[Cinema_ID]:[int] <col1>[text]:[Openning_year] <col2>[int]:[Capacity] <col3>[int]... | SELECT Title, MAX( T1.Price ) FROM `<table2>` AS T1 JOIN film AS T2 ON T1.Film_ID = T2.Film_ID GROUP BY Title | What are the title and maximum price of each film. |
<table0>[table_73257] { <col0>[text]:[Nationality] <col1>[text]:[real] <col2>[text]:[League] <col3>[Apps]:[real] <col4>[League]:[Goals] <col5>[real]:[Finals] <col6>[Apps]:[real] <col7>[Finals]:[Goals] <col8>[real]:[Position] } | SELECT MAX( "Finals Apps" ) FROM `<table0>` | Name the mosst finals apps
|
<table0>[table_13804825_2] { <col0>[song_title]:[VARCHAR] <col1>[artist]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "Billy Vaughn" | what is the nme of the song performed by billy vaughn? |
<table0>[co2_emissions] { <col0>[product_id]:[INT] <col1>[country]:[VARCHAR] } <table1>[products] { <col0>[product_id]:[INT] <col1>[product_name]:[VARCHAR] <col2>[INSERT]:[co2_emissions] <col3>[product_id]:[country] <col4>[co2_emissions]:[VALUES] <col5>[Sweden]:[INSERT] } | SELECT AVG( `<table0>` ) FROM `<table0>` INNER JOIN products ON `<table0>`.product_id = products.product_id WHERE products.country IN ( 'UK', 'Sweden' ); | What is the average CO2 emissions per product for products manufactured in the UK and Sweden? |
<table0>[rating] { <col0>[rid]:[number] <col1>[mid]:[number] <col2>[stars]:[number] <col3>[ratingdate]:[time] } <table1>[movie] { <col0>[mid]:[number] <col1>[title]:[text] <col2>[year]:[number] <col3>[director]:[text] } <table2>[reviewer] { <col0>[rid]:[number] <col1>[name]:[text] } | SELECT T1.title, T1.director FROM `<table1>` AS T1 JOIN `<table1>` AS T2 ON T1.director = T2.director WHERE T1.title <> T2.title ORDER BY T1.director, T1.title | For all directors who have directed more than one movie, what movies have they directed and what are their names?
|
<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>[transfers] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]... | SELECT COUNT( DISTINCT `<table3>`.subject_id ) FROM `<table3>` WHERE `<table3>`.hadm_id IN ( SELECT `<table1>`.hadm_id FROM `<table1>` WHERE `<table1>`.careunit = 'sicu' AND DATETIME( `<table1>`.intime ) >= DATETIME( CURRENT_TIME( ), '-5 year' ) ) | how many patients were since 5 years ago in the sicu careunit. |
<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 `<table2>`.drug_type FROM `<table2>` WHERE `<table2>`.subject_id = "24425" | name the type of drug taken by patient with patient id 24425.
|
<table0>[jobs] { <col0>[JOB_ID]:[varchar] <col1>[JOB_TITLE]:[varchar] <col2>[MIN_SALARY]:[decimal] <col3>[MAX_SALARY]:[decimal] } <table1>[countries] { <col0>[COUNTRY_ID]:[varchar] <col1>[COUNTRY_NAME]:[varchar] <col2>[REGION_ID]:[decimal] } <table2>[regions] { <col0>[REGION_ID]:[decimal] <col1>[REGION_NAME]:[varchar... | SELECT JOB_ID, COUNT( `<col6>` ) FROM `<table5>` WHERE NOT `<col0>` IN ( SELECT `<col0>` FROM `<table4>` ) GROUP BY `<col6>` ORDER BY COUNT( `<col6>` ) DESC | For those employees who did not have any job in the past, visualize a bar chart about the distribution of job_id and the amount of job_id , and group by attribute job_id, and I want to sort by the how many job id from high to low.
|
<table0>[lab] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[itemid]:[text] <col3>[charttime]:[text] <col4>[flag]:[text] <col5>[value_unit]:[text] <col6>[label]:[text] <col7>[fluid]:[text] } <table1>[procedures] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:... | SELECT COUNT( DISTINCT `<table3>`.subject_id ) FROM `<table3>` INNER JOIN procedures ON `<table3>`.hadm_id = procedures.hadm_id INNER JOIN prescriptions ON `<table3>`.hadm_id = prescriptions.hadm_id WHERE procedures.icd9_code = "40" AND prescriptions.route = "NU" | how many patients with procedure icd9 code 40 have nu route of drug administration? |
<table0>[people] { <col0>[Birth_Place]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` GROUP BY `<col0>` ORDER BY COUNT( * ) DESC LIMIT 1 | What is the most common birth place of people?
|
<table0>[rd_expenditure] { <col0>[INT]:[year] <col1>[INT]:[DECIMAL] } | SELECT SUM( amount ) FROM `<table0>` WHERE year = 2020; | What was the total R&D expenditure for 2020? |
<table0>[table_name_37] { <col0>[race_name]:[VARCHAR] <col1>[circuit]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "snetterton" | What is the name of the race for which the circuit was Snetterton?
|
<table0>[PostNoticeTypes] { <col0>[number]:[ClassId] <col1>[number]:[text] <col2>[Body]:[text] <col3>[IsHidden]:[boolean] <col4>[Predefined]:[boolean] <col5>[PostNoticeDurationId]:[number] } <table1>[Votes] { <col0>[number]:[PostId] <col1>[number]:[VoteTypeId] <col2>[number]:[UserId] <col3>[number]:[CreationDate] <col... | SELECT CONCAT( 'https://math.stackexchange.com/questions/', PostId ), Score, Text, CreationDate FROM `<table20>` WHERE UserId = 11994 AND Text LIKE '%\newcommand%' AND NOT Text LIKE '%\begingroup%' COLLATE Latin1_General_100_CI_AI_SC ORDER BY CreationDate DESC | My \newcommand comments without \begingroup. |
<table0>[school_details] { <col0>[school_id]:[number] <col1>[nickname]:[text] <col2>[colors]:[text] <col3>[league]:[text] <col4>[class]:[text] <col5>[division]:[text] } <table1>[school] { <col0>[school_id]:[number] } <table2>[school_performance] { <col0>[school_id]:[number] <col1>[school_year]:[text] <col2>[class_a]:... | SELECT T1.location, T2.nickname FROM `<table1>` AS T1 JOIN `<table1>`_details AS T2 ON T1.`<table1>`_id = T2.`<table1>`_id | What are the location and nickname of each school? |
<table0>[prescriptions] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[startdate]:[time] <col4>[enddate]:[time] <col5>[drug]:[text] <col6>[dose_val_rx]:[text] <col7>[dose_unit_rx]:[text] <col8>[route]:[text] } <table1>[d_items] { <col0>[row_id]:[number] <col1>[itemid]:[number] <c... | SELECT COUNT( * ) > 0 FROM `<table14>` WHERE `<table14>`.itemid IN ( SELECT `<table12>`.itemid FROM `<table12>` WHERE `<table12>`.label = 'mchc' ) AND `<table14>`.hadm_id IN ( SELECT `<table6>`.hadm_id FROM `<table6>` WHERE `<table6>`.subject_id = 25733 AND `<table6>`.dischtime IS NULL ) | did patient 25733 receive any mchc lab tests on the current hospital visit?
|
<table0>[Ship] { <col0>[Ship_ID]:[int] <col1>[text]:[Type] <col2>[text]:[Built_Year] <col3>[real]:[Class] <col4>[text]:[Flag] } <table1>[captain] { <col0>[Captain_ID]:[int] <col1>[text]:[Ship_ID] <col2>[int]:[age] <col3>[text]:[Class] <col4>[text]:[Rank] } | SELECT Class, COUNT( Class ) FROM `<table1>` GROUP BY Class ORDER BY COUNT( Class ) DESC | Compare the total number of captains with different classes using a bar graph, and order from high to low by the the number of class. |
<table0>[table_4459] { <col0>[Episode]:[real] <col1>[Title]:[text] <col2>[Air]:[Date] <col3>[text]:[Demo] <col4>[text]:[Viewers] } | SELECT "Air Date" FROM `<table0>` WHERE "Demo" = '1.6/5' | When is the air date that demo-ed at 1.6/5?
|
<table0>[table_test_5] { <col0>[int]:[systemic_lupus_erythematosus] <col1>[bool]:[anemia] <col2>[bool]:[gender] <col3>[string]:[pregnancy_or_lactation] <col4>[bool]:[serum_potassium] <col5>[float]:[hemoglobin_a1c_hba1c] <col6>[float]:[heart_disease] <col7>[bool]:[renal_disease] <col8>[bool]:[creatinine_clearance_cl] <c... | SELECT * FROM `<table0>` WHERE ( gender = 'male' OR ( gender = 'female' AND pregnancy_or_lactation = 0 ) ) AND ( age >= 18 AND age <= 80 ) | male or non _ pregnant female , aged 18 _ 80 years old
|
<table0>[table_69326] { <col0>[text]:[Seasons] <col1>[text]:[Matches] <col2>[real]:[Inns] <col3>[real]:[Runs] } | SELECT MIN( "Runs" ) FROM `<table0>` WHERE "Name" = 'clem hill' AND "Inns" > '126' | Name of clem hill, and Inns larger than 126 has the lowest runs?
|
<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>[chartevents] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay... | SELECT `<table14>`.charttime FROM `<table14>` WHERE `<table14>`.icd9_code = ( SELECT `<table2>`.icd9_code FROM `<table2>` WHERE `<table2>`.short_title = 'nb obsrv suspct infect' ) AND `<table14>`.hadm_id IN ( SELECT `<table9>`.hadm_id FROM `<table9>` WHERE `<table9>`.subject_id = 62918 AND NOT `<table9>`.dischtime IS N... | when did patient 62918 first receive an nb obsrv suspct infect diagnosis when they visited the hospital first time? |
<table0>[table_name_19] { <col0>[best_score]:[VARCHAR] <col1>[worst_dancer_s]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE worst_dancer_s_ = "gethin jones/kenny logan" | What's the best score, with the worst dancer(s) gethin jones/kenny logan? |
<table0>[table_11982] { <col0>[Date]:[text] <col1>[Venue]:[text] <col2>[Opponent]:[text] <col3>[Result]:[text] <col4>[Tournament]:[text] <col5>[Scored]:[real] } | SELECT "Venue" FROM `<table0>` WHERE "Result" = '22-20' | Where was the game with the result of 22-20 played?
|
<table0>[Albums] { <col0>[AlbumID]:[INT] <col1>[AlbumName]:[VARCHAR] <col2>[ReleaseYear]:[INT] <col3>[Sales]:[INT] } | SELECT AVG( `<col3>` ) as AverageSales FROM `<table0>` WHERE `<col2>` BETWEEN 2010 AND 2019; | What is the average sales for albums released in the 2010s? |
<table0>[users] { <col0>[user_id]:[number] <col1>[role_code]:[text] <col2>[user_name]:[text] <col3>[user_login]:[text] <col4>[password]:[text] } <table1>[roles] { <col0>[role_code]:[text] <col1>[role_description]:[text] } <table2>[documents] { <col0>[document_code]:[text] <col1>[document_structure_code]:[text] <col2>... | SELECT document_name, `<col3>` FROM `<table2>` ORDER BY `<col3>` DESC LIMIT 1 | What is the name of the document which has been accessed the most times, as well as the number of times it has been accessed?
|
<table0>[table_204_360] { <col0>[number]:[year] <col1>[number]:[host] <col2>[text]:[gold] <col3>[text]:[silver] <col4>[text]:[bronze] } | SELECT "year" FROM `<table0>` WHERE "silver" = 'chile' OR "bronze" = 'chile' | which years did chile place silver or bronze ? |
<table0>[table_name_87] { <col0>[resolution]:[VARCHAR] <col1>[official_website]:[VARCHAR] <col2>[callsign]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "ketftv.com" AND `<col2>` = "kldo-dt2" | Name the resolution for ketftv.com and callsign of kldo-dt2 |
<table0>[keyphrase] { <col0>[keyphraseid]:[int] <col1>[keyphrasename]:[varchar] } <table1>[paperkeyphrase] { <col0>[paperid]:[int] <col1>[keyphraseid]:[int] } <table2>[paper] { <col0>[paperid]:[int] <col1>[title]:[varchar] <col2>[venueid]:[int] <col3>[year]:[int] <col4>[numciting]:[int] <col5>[numcitedby]:[int] <col6... | SELECT DISTINCT COUNT( DISTINCT paper.paperid ) FROM dataset, paper, paperdataset WHERE dataset.datasetname LIKE 'ImageNet' AND paperdataset.datasetid = dataset.datasetid AND paper.paperid = paperdataset.paperid | How many papers used ImageNet dataset ?
|
<table0>[procedures] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table1>[demographic] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[name]:[text] <col3>[marital_status]:[text] <col4>[age]:[text] <col5>[dob]:[text] <col6>... | SELECT COUNT( DISTINCT `<table1>`.subject_id ) FROM `<table1>` INNER JOIN diagnoses ON `<table1>`.hadm_id = diagnoses.hadm_id WHERE `<table1>`.insurance = "Government" AND diagnoses.long_title = "Other vitamin B12 deficiency anemia" | how many patients who have government insurance are diagnosed for other vitamin b12 anemia deficiency ?
|
<table0>[policyholders] { <col0>[INT]:[age] <col1>[INT]:[policy_id] <col2>[INT]:[INSERT] } <table1>[claims] { <col0>[INT]:[policy_id] <col1>[INT]:[claim_amount] <col2>[INT]:[INSERT] } | SELECT SUM( claim_amount ) FROM `<table1>` JOIN policyholders ON `<table1>`.policy_id = policyholders.policy_id WHERE policyholders.age > 40; | What is the total claim amount for policyholders who are older than 40? |
<table0>[table_name_84] { <col0>[grid]:[VARCHAR] <col1>[team]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "racing professionals" | What grid did the team racing professionals race on? |
<table0>[rural_infrastructure] { <col0>[INT]:[project_name] <col1>[VARCHAR]:[100] <col2>[location]:[VARCHAR] <col3>[start_date]:[DATE] <col4>[end_date]:[DATE] <col5>[duration]:[INT] } | DELETE FROM `<table0>` WHERE `<col2>` = 'Guatemala' AND `<col5>` > 48; | Delete all rural infrastructure projects in Guatemala that have a duration of more than 48 months. |
<table0>[table_name_80] { <col0>[laps]:[INTEGER] <col1>[year]:[VARCHAR] } | SELECT SUM( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "1958" | How many laps were in 1958?
|
<table0>[flight] { <col0>[flno]:[number] <col1>[origin]:[varchar2] <col2>[destination]:[varchar2] <col3>[distance]:[number] <col4>[departure_date]:[date] <col5>[arrival_date]:[date] <col6>[price]:[number] <col7>[aid]:[number] } <table1>[employee] { <col0>[eid]:[number] <col1>[name]:[varchar2] <col2>[salary]:[number] ... | SELECT destination, COUNT( `<col2>` ) FROM `<table0>` GROUP BY `<col2>` ORDER BY `<col2>` DESC | How many flights in each destination city? Return a bar chart, and order by the destination from high to low please. |
<table0>[lab] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[itemid]:[text] <col3>[charttime]:[text] <col4>[flag]:[text] <col5>[value_unit]:[text] <col6>[label]:[text] <col7>[fluid]:[text] } <table1>[procedures] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:... | SELECT COUNT( DISTINCT `<table3>`.subject_id ) FROM `<table3>` WHERE `<table3>`.gender = "F" AND `<table3>`.diagnosis = "MORBID OBESITY/SDA" | how many female patients had morbid obesity/sda as their primary disease?
|
<table0>[table_203_254] { <col0>[number]:[position] <col1>[number]:[team] <col2>[text]:[points] <col3>[number]:[played] <col4>[number]:[won] <col5>[number]:[drawn] <col6>[number]:[lost] <col7>[number]:[number] <col8>[number]:[difference] } | SELECT COUNT( "team" ) FROM `<table0>` WHERE "points" > 20 | list the number of teams who have more than 20 points . |
<table0>[restaurant] { <col0>[int]:[name] <col1>[varchar]:[food_type] <col2>[varchar]:[city_name] <col3>[varchar]:[rating] } <table1>[geographic] { <col0>[city_name]:[varchar] <col1>[county]:[varchar] <col2>[region]:[varchar] } <table2>[location] { <col0>[restaurant_id]:[int] <col1>[house_number]:[int] <col2>[street_... | SELECT location.house_number, restaurant.name FROM location, restaurant WHERE restaurant.city_name IN ( SELECT GEOGRAPHICalias0.city_name FROM `<table1>` AS GEOGRAPHICalias0 WHERE GEOGRAPHICalias0.region = 'bay area' ) AND restaurant.id = location.restaurant_id AND restaurant.rating > 2.5 | what are some good restaurants in the bay area ? |
<table0>[businesses] { <col0>[business_id]:[integer] <col1>[name]:[text] <col2>[address]:[text] <col3>[city]:[text] <col4>[postal_code]:[text] <col5>[latitude]:[real] <col6>[longitude]:[real] <col7>[phone_number]:[integer] <col8>[tax_code]:[text] <col9>[business_certificate]:[integer] <col10>[application_date]:[date] <... | SELECT CAST( SUM( CASE WHEN T2.risk_category = 'Moderate Risk' THEN 1 ELSE 0 END ) AS REAL ) * 100 / COUNT( T2.business_id ) FROM `<table0>` AS T1 INNER JOIN violations AS T2 ON T1.business_id = T2.business_id WHERE T1.name = 'Melody Lounge' | What percentage of the violations for "Melody Lounge" are moderate risks? |
<table0>[SuggestedEditVotes] { <col0>[number]:[SuggestedEditId] <col1>[number]:[UserId] <col2>[number]:[VoteTypeId] <col3>[number]:[CreationDate] <col4>[time]:[TargetUserId] <col5>[number]:[TargetRepChange] } <table1>[ReviewTaskTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table2>[Comments] { <col0>[nu... | SELECT ( SELECT CAST( COUNT( `<table18>`.Id ) AS FLOAT ) FROM `<table18>` WHERE VoteTypeId = 2 ) / ( SELECT CAST( COUNT( `<table18>`.Id ) AS FLOAT ) FROM `<table18>` WHERE VoteTypeId = 3 ) AS "Up `<table18>` / Down `<table18>`" | Up Votes vs Down Votes. |
<table0>[complaints] { <col0>[product_name]:[TEXT] <col1>[launch_year]:[INTEGER] <col2>[complaint_count]:[INTEGER] } | SELECT SUM( `<col2>` ) FROM `<table0>` WHERE `<col1>` >= 2020; | Number of complaints for cosmetic products launched since 2020? |
<table0>[circular_economy] { <col0>[country]:[VARCHAR] <col1>[255]:[year] <col2>[INT]:[initiatives] <col3>[INT]:[INSERT] } | SELECT c.country, COUNT( c.initiatives ) as num_initiatives FROM `<table0>` c GROUP BY c.country ORDER BY num_initiatives ASC; | What is the number of circular economy initiatives for each country in ascending 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 prescriptions ON `<table0>`.hadm_id = prescriptions.hadm_id WHERE `<table0>`.age < "43" AND prescriptions.formulary_drug_cd = "GABA100" | what is the number of patients less than 43 years who have drug code gaba100? |
<table0>[table_34442] { <col0>[Model]:[text] <col1>[Release]:[Date] <col2>[real]:[Price] <col3>[text]:[MIDI] <col4>[Inputs]:[Outputs] <col5>[text]:[Sampling] <col6>[Rate]:[text] <col7>[Sampling]:[Memory] <col8>[Upgrade]:[able] <col9>[text]:[Sampling] <col10>[Time]:[text] <col11>[Storage]:[Method] <col12>[text]:[Pad] <c... | SELECT "Sampling Memory/Upgrade-able" FROM `<table0>` WHERE "Sampling Rate" = '16-bit 44.1khz' | Which Sampling Memory/Upgrade-able has a rate of 16-bit 44.1khz?
|
<table0>[table_57156] { <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 "Away team" FROM `<table0>` WHERE "Home `<col2>` score" = '10.17 ( 77 )' | What is the away team that played when the home team scored 10.17 (77)?
|
<table0>[incident_attack_type] { <col0>[INT]:[incident_count] <col1>[INT]:[attack_type] <col2>[VARCHAR]:[incident_date] <col3>[DATE]:[INSERT] } | SELECT attack_type, SUM( incident_count ) as total_incidents FROM `<table0>` WHERE incident_date >= DATE_SUB( CURDATE( ), INTERVAL 1 YEAR ) GROUP BY attack_type; | How many security incidents were associated with each type of attack in the last year? |
<table0>[binance_smart_chain] { <col0>[dapp_name]:[TEXT] <col1>[network_name]:[TEXT] <col2>[transaction_volume]:[DECIMAL] } | SELECT dapp_name, network_name, SUM( `<col2>` ) as total_transaction_volume FROM `<table0>` WHERE `<col1>` = 'Binance Smart Chain' GROUP BY `<col0>` ORDER BY total_transaction_volume DESC LIMIT 3; | Find the top 3 decentralized applications by transaction volume in the 'Binance Smart Chain' network. |
<table0>[procedures_icd] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icd9_code]:[text] <col4>[charttime]:[time] } <table1>[d_items] { <col0>[row_id]:[number] <col1>[itemid]:[number] <col2>[label]:[text] <col3>[linksto]:[text] } <table2>[outputevents] { <col0>[row_id]:[number]... | SELECT COUNT( * ) FROM `<table2>` WHERE `<table2>`.icustay_id IN ( SELECT `<table4>`.icustay_id FROM `<table4>` WHERE `<table4>`.hadm_id IN ( SELECT `<table8>`.hadm_id FROM `<table8>` WHERE `<table8>`.subject_id = 87530 ) ) AND `<table2>`.itemid IN ( SELECT `<table1>`.itemid FROM `<table1>` WHERE `<table1>`.label = 'ga... | count the number of times that patient 87530 has until 20 months ago had gastric nasogastric output.
|
<table0>[Employees] { <col0>[EmployeeID]:[INT] <col1>[Gender]:[VARCHAR] <col2>[Department]:[VARCHAR] <col3>[Salary]:[FLOAT] } | SELECT Department, MAX( `<col3>` ) FROM `<table0>` GROUP BY Department; | What is the maximum salary in each department? |
<table0>[table_60701] { <col0>[Season]:[text] <col1>[League]:[text] <col2>[Teams]:[text] <col3>[Home]:[text] <col4>[Away]:[text] } | SELECT "Teams" FROM `<table0>` WHERE "Season" = '2009-10' | What team has a season of 2009-10?
|
<table0>[Student_Course_Enrolment] { <col0>[registration_id]:[INTEGER] <col1>[student_id]:[INTEGER] <col2>[course_id]:[INTEGER] <col3>[date_of_enrolment]:[DATETIME] <col4>[date_of_completion]:[DATETIME] } <table1>[Courses] { <col0>[course_id]:[INTEGER] <col1>[author_id]:[INTEGER] <col2>[subject_id]:[INTEGER] <col3>[co... | SELECT subject_name, COUNT( * ) FROM `<table1>` AS T1 JOIN Subjects AS T2 ON T1.subject_id = T2.subject_id GROUP BY T1.subject_id ORDER BY COUNT( * ) | How many courses for each subject? Plot a bar chart, and list by the Y in asc please.
|
<table0>[cases_by_type] { <col0>[case_id]:[INT] <col1>[district_id]:[INT] <col2>[case_type]:[VARCHAR] <col3>[open_date]:[DATE] <col4>[resolution_date]:[DATE] } | SELECT `<table0>`.district_id, `<table0>`.case_type, AVG( DATEDIFF( `<table0>`.resolution_date, `<table0>`.open_date ) ) as avg_time_to_resolution FROM `<table0>` WHERE `<table0>`.case_type = 'Civil' AND `<table0>`.open_date >= DATE_SUB( CURRENT_DATE, INTERVAL 1 YEAR ) GROUP BY `<table0>`.district_id, `<table0>`.case_t... | What is the average time to resolution for civil cases, by district, in the last year? |
<table0>[allergy] { <col0>[allergyid]:[number] <col1>[patientunitstayid]:[number] <col2>[drugname]:[text] <col3>[allergyname]:[text] <col4>[allergytime]:[time] } <table1>[intakeoutput] { <col0>[intakeoutputid]:[number] <col1>[patientunitstayid]:[number] <col2>[cellpath]:[text] <col3>[celllabel]:[text] <col4>[cellvalue... | SELECT ( SELECT `<table5>`.heartrate FROM `<table5>` WHERE `<table5>`.`<table8>`unitstayid IN ( SELECT `<table8>`.`<table8>`unitstayid FROM `<table8>` WHERE `<table8>`.`<table8>`healthsystemstayid IN ( SELECT `<table8>`.`<table8>`healthsystemstayid FROM `<table8>` WHERE `<table8>`.uniquepid = '011-23193' ) AND NOT `<ta... | is the heartrate of patient 011-23193 last measured on the first icu visit less than the value second to last measured on the first icu visit?
|
<table0>[table_name_8] { <col0>[bore]:[VARCHAR] <col1>[designation]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "12-pdr heavy" | What is the bore of the boat howitzers with a 12-pdr heavy designation? |
<table0>[song] { <col0>[artist_name]:[VARCHAR] <col1>[rating]:[INTEGER] } <table1>[artist] { <col0>[artist_name]:[VARCHAR] <col1>[country]:[VARCHAR] } | SELECT DISTINCT T1.`<table1>`_name, T1.country FROM `<table1>` AS T1 JOIN song AS T2 ON T1.`<table1>`_name = T2.`<table1>`_name WHERE T2.rating > 9 | List the name and country of origin for all singers who have produced songs with rating above 9.
|
<table0>[table_name_40] { <col0>[team]:[VARCHAR] <col1>[year]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = 1951 | Which team was in 1951? |
<table0>[members] { <col0>[member_id]:[INT] <col1>[membership_type]:[VARCHAR] <col2>[join_date]:[DATE] } | SELECT member_id, `<col2>` FROM `<table0>` WHERE `<table0>`hip_type = 'Premium' ORDER BY `<col2>` ASC LIMIT 1; | Find the earliest join date for members who have a premium membership. |
<table0>[flight_stop] { <col0>[flight_id]:[int] <col1>[stop_number]:[int] <col2>[stop_days]:[text] <col3>[stop_airport]:[text] <col4>[arrival_time]:[int] <col5>[arrival_airline]:[text] <col6>[arrival_flight_number]:[int] <col7>[departure_time]:[int] <col8>[departure_airline]:[text] <col9>[departure_flight_number]:[int]... | SELECT DISTINCT flight.departure_time FROM `<table16>` AS AIRPORT_SERVICE_0, `<table16>` 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 = 'SAN FRANCI... | when do planes leave BOSTON for SAN FRANCISCO |
<table0>[table_name_58] { <col0>[artist]:[VARCHAR] <col1>[draw]:[INTEGER] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` > 15 | Which artist has a draw greater than 15?
|
<table0>[body_builder] { <col0>[Body_Builder_ID]:[int] <col1>[People_ID]:[int] <col2>[Snatch]:[real] <col3>[Clean_Jerk]:[real] <col4>[Total]:[real] } <table1>[people] { <col0>[People_ID]:[int] <col1>[text]:[Height] <col2>[real]:[Weight] <col3>[real]:[Birth_Date] <col4>[text]:[Birth_Place] } | SELECT Body_Builder_ID, `<col1>` FROM `<table0>` | A scatter chart shows the correlation between Body_Builder_ID and People_ID . |
<table0>[Timed_Status_of_Things] { <col0>[thing_id]:[INTEGER] <col1>[Date_and_Date]:[DATETIME] <col2>[Status_of_Thing_Code]:[CHAR] } <table1>[Services] { <col0>[service_id]:[INTEGER] <col1>[organization_id]:[INTEGER] <col2>[service_type_code]:[CHAR] <col3>[service_details]:[VARCHAR] } <table2>[Customers] { <col0>[cus... | SELECT date_moved_in, COUNT( date_moved_in ) FROM `<table2>` AS T1 JOIN Customer_Events AS T2 ON T1.customer_id = T2.customer_id GROUP BY date_moved_in | What is the proportion of each customer's move in date? Show me the bar chart.
|
<table0>[table_49665] { <col0>[text]:[Height] <col1>[text]:[Weight] <col2>[text]:[Spike] <col3>[text]:[2013] <col4>[club]:[text] } | SELECT "Height" FROM `<table0>` WHERE "2013 club" = 'wvc dynamo moscow' | Name the Height which has a 2013 club of wvc dynamo moscow?
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.