schema stringlengths 20 14.6k | query stringlengths 17 2.58k | question stringlengths 8 1.06k |
|---|---|---|
<table0>[table_name_14] { <col0>[team_1]:[VARCHAR] } | SELECT 1 AS st_leg FROM `<table0>` WHERE `<col0>` = "lesotho" | What was the 1st leg score for the match with Lesotho as team 1?
|
<table0>[health_insurance] { <col0>[INT]:[state] <col1>[TEXT]:[race] <col2>[TEXT]:[no_insurance] <col3>[BOOLEAN]:[INSERT] } | SELECT race, COUNT( * ) * 100.0 / ( SELECT COUNT( * ) FROM `<table0>` WHERE state = 'Texas' ) AS percentage FROM `<table0>` WHERE state = 'Texas' AND no_insurance = TRUE GROUP BY race; | What is the percentage of the population without health insurance in Texas by race? |
<table0>[table_name_40] { <col0>[dob]:[VARCHAR] <col1>[surname]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "cresswell" | Which DOB has a Surname of cresswell? |
<table0>[building_permits] { <col0>[permit_id]:[INT] <col1>[contractor_id]:[INT] <col2>[project_id]:[INT] <col3>[permit_expiration_date]:[DATE] } | DELETE FROM `<table0>` WHERE `<col3>` < CURRENT_DATE; | Delete all records with outdated building permits. |
<table0>[table_name_2] { <col0>[duration]:[VARCHAR] <col1>[character]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "clemens richter" | How many years did the soap opera run in which the character Clemens Richter was included? |
<table0>[carbon_prices] { <col0>[INT]:[PRIMARY] <col1>[KEY]:[year] <col2>[INT]:[price] } | DELETE FROM `<table0>` WHERE price > 50; | Delete all records in the 'carbon_prices' table with a price higher than 50 |
<table0>[Accidents] { <col0>[INT]:[VesselId] <col1>[INT]:[Year] <col2>[INT]:[INSERT] } <table1>[Cargo] { <col0>[INT]:[VesselId] <col1>[INT]:[Continent] <col2>[VARCHAR]:[INSERT] } | SELECT AVG( `<table0>`_Per_Vessel.`<table0>`_Count ) FROM ( SELECT VesselId, COUNT( * ) AS `<table0>`_Count FROM `<table0>` GROUP BY VesselId ) AS `<table0>`_Per_Vessel INNER JOIN ( SELECT VesselId, COUNT( * ) AS `<table1>`_Count FROM `<table1>` WHERE Continent = 'Asia' GROUP BY VesselId ) AS `<table1>`_Per_Vessel ON `... | What is the average number of accidents for vessels that have carried cargos from the Asian continent? |
<table0>[treatment] { <col0>[treatmentid]:[number] <col1>[patientunitstayid]:[number] <col2>[treatmentname]:[text] <col3>[treatmenttime]:[time] } <table1>[patient] { <col0>[uniquepid]:[text] <col1>[patienthealthsystemstayid]:[number] <col2>[patientunitstayid]:[number] <col3>[gender]:[text] <col4>[age]:[text] <col5>[et... | SELECT t3.`<table3>`name FROM ( SELECT t2.`<table3>`name, DENSE_RANK( ) OVER ( ORDER BY COUNT( * ) DESC ) AS c1 FROM ( SELECT patient.uniquepid, `<table3>`.`<table3>`time, patient.patienthealthsystemstayid FROM `<table3>` JOIN patient ON `<table3>`.patientunitstayid = patient.patientunitstayid WHERE `<table3>`.`<table3... | what are the five most frequently given diagnoses since 1 year ago for patients who were previously diagnosed with hypomagnesemia - etiology unknown within the same hospital visit? |
<table0>[icustays] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[first_careunit]:[text] <col5>[last_careunit]:[text] <col6>[first_wardid]:[number] <col7>[last_wardid]:[number] <col8>[intime]:[time] <col9>[outtime]:[time] } <table1>[d_icd_procedures] {... | SELECT COUNT( DISTINCT t1.subject_id ) FROM ( SELECT admissions.subject_id, `<table2>`.charttime, admissions.hadm_id FROM `<table2>` JOIN admissions ON `<table2>`.hadm_id = admissions.hadm_id WHERE `<table2>`.icd9_code = ( SELECT `<table1>`.icd9_code FROM `<table1>` WHERE `<table1>`.short_title = 'percu nephrostm w/o f... | until 4 years ago how many patients were prescribed ns (mini bag plus) in the same hospital visit after having undergone percu nephrostm w/o frag treatment? |
<table0>[head] { <col0>[head_ID]:[int] <col1>[name]:[text] <col2>[born_state]:[text] <col3>[age]:[real] } <table1>[department] { <col0>[Department_ID]:[int] <col1>[text]:[Creation] <col2>[text]:[Ranking] <col3>[int]:[Budget_in_Billions] <col4>[real]:[Num_Employees] } <table2>[management] { <col0>[department_ID]:[int]... | SELECT Name, Budget_in_Billions FROM `<table1>` | List the budget of each department in a bar chart. |
<table0>[cost] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[event_type]:[text] <col4>[event_id]:[number] <col5>[chargetime]:[time] } <table1>[d_icd_procedures] { <col0>[row_id]:[number] <col1>[icd9_code]:[text] <col2>[short_title]:[text] <col3>[long_title]:[text] } <table2>[ad... | SELECT AVG( `<table5>`.valuenum ) FROM `<table5>` WHERE `<table5>`.icustay_id IN ( SELECT `<table3>`.icustay_id FROM `<table3>` WHERE `<table3>`.hadm_id IN ( SELECT `<table2>`.hadm_id FROM `<table2>` WHERE `<table2>`.subject_id = 25796 ) ) AND `<table5>`.itemid IN ( SELECT `<table6>`.itemid FROM `<table6>` WHERE `<tabl... | what is the yearly average of heart rate for patient 25796 until 49 months ago?
|
<table0>[table_22044] { <col0>[Home]:[1st] <col1>[leg]:[text] <col2>[Home]:[2nd] <col3>[leg]:[text] <col4>[1st]:[Leg] <col5>[text]:[2nd] <col6>[leg]:[text] <col7>[Aggregate]:[text] } | SELECT "Home ( `<col4>` `<col1>` )" FROM `<table0>` WHERE "2nd leg" = '3-2' | If the second leg is 3-2, what is the first leg?
|
<table0>[table_name_84] { <col0>[release_date]:[VARCHAR] <col1>[format]:[VARCHAR] <col2>[title]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "cd" AND `<col2>` = "tsar wars" | What is Release Date, when Format is CD, and when Title is Tsar Wars?
|
<table0>[state] { <col0>[state_code]:[text] <col1>[state_name]:[text] <col2>[country_name]:[text] } <table1>[flight_fare] { <col0>[flight_id]:[int] <col1>[fare_id]:[int] } <table2>[flight] { <col0>[aircraft_code_sequence]:[text] <col1>[airline_code]:[varchar] } <table3>[month] { <col0>[month_number]:[int] <col1>[mon... | SELECT COUNT( DISTINCT airline.airline_code ) FROM airline, fare, flight, flight_fare WHERE fare.fare_basis_code = 'YN' AND flight_fare.fare_id = fare.fare_id AND flight.airline_code = airline.airline_code AND flight.flight_id = flight_fare.flight_id | how many airlines have flights with service class YN
|
<table0>[table_23430] { <col0>[Colt]:[model] <col1>[text]:[Military] <col2>[designation]:[text] <col3>[Barrel]:[Length] <col4>[text]:[Barrel] <col5>[text]:[Handguard] <col6>[type]:[text] <col7>[Buttstock]:[type] <col8>[text]:[Pistol] <col9>[grip]:[type] <col10>[text]:[Lower] <col11>[receiver]:[type] <col12>[text]:[Uppe... | SELECT "Rear `<col15>` type" FROM `<table0>` WHERE "Muzzle device" = 'ACR muzzle brake' | What is the rear sight type on the model with the acr muzzle brake device? |
<table0>[table_name_64] { <col0>[champion]:[VARCHAR] <col1>[VARCHAR]:[season] } | SELECT `<col0>` FROM `<table0>` WHERE third = "blaho blahoyeve" AND season = "1995-96" | Which Champion has a Third of blaho blahoyeve, and a Season of 1995-96?
|
<table0>[table_name_16] { <col0>[format]:[VARCHAR] <col1>[region]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "greece" | What is the Format of the release in Greece? |
<table0>[table_203_163] { <col0>[number]:[year] <col1>[number]:[total] <col2>[number]:[serbs] <col3>[text]:[hungarians] <col4>[text]:[germans] <col5>[text]:[romanians] <col6>[text]:[slovaks] } | SELECT "year" FROM `<table0>` WHERE "total" >= 600000 | which years were the totals at least 600,000 ?
|
<table0>[countries] { <col0>[country_name]:[VARCHAR] } <table1>[players] { <col0>[player_name]:[VARCHAR] <col1>[country_name]:[VARCHAR] <col2>[points]:[INT] <col3>[INSERT]:[countries] <col4>[country_name]:[VALUES] <col5>[USA]:[Australia] <col6>[Canada]:[INSERT] } | SELECT country_name, SUM( `<col2>` ) as total_points FROM `<table1>` GROUP BY `<col1>` ORDER BY total_points DESC LIMIT 3; | Find the top 3 countries with the highest total basketball points scored by players. |
<table0>[table_name_65] { <col0>[year]:[VARCHAR] <col1>[manager]:[VARCHAR] <col2>[finish]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "jesus alfaro" AND `<col2>` = "6th" | Name the year for jesus alfaro and finish of 6th |
<table0>[nomination] { <col0>[Festival_ID]:[VARCHAR] <col1>[Artwork_ID]:[VARCHAR] } <table1>[festival_detail] { <col0>[Festival_Name]:[VARCHAR] <col1>[Festival_ID]:[VARCHAR] } <table2>[artwork] { <col0>[Artwork_ID]:[VARCHAR] } | SELECT T1.Festival_ID, T3.Festival_Name FROM `<table0>` AS T1 JOIN artwork AS T2 ON T1.Artwork_ID = T2.Artwork_ID JOIN festival_detail AS T3 ON T1.Festival_ID = T3.Festival_ID GROUP BY T1.Festival_ID HAVING COUNT( * ) >= 2 | Show the ids and names of festivals that have at least two nominations for artworks. |
<table0>[table_1805191_14] { <col0>[candidates]:[VARCHAR] <col1>[first_elected]:[VARCHAR] <col2>[party]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = 1998 AND `<col2>` = "Republican" | Who were the candidates when the first elected was a republican in 1998? |
<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 `<table13>`_code FROM `<table13>` WHERE `<table13>`_code = 'BNA' | what is BNA |
<table0>[table_31296] { <col0>[Round]:[real] <col1>[Country]:[text] <col2>[Circuit]:[text] <col3>[Date]:[text] <col4>[Pole]:[Position] <col5>[text]:[Fastest] <col6>[Lap]:[text] <col7>[Winning]:[Rider] <col8>[text]:[Winning] <col9>[Team]:[text] <col10>[Report]:[text] } | SELECT "Circuit" FROM `<table0>` WHERE "Fastest Lap" = 'Sam Lowes' AND "Winning Rider" = 'Luca Scassa' | what is the circuit where the fastest lap is sam lowes and the winning rider is luca scassa?
|
<table0>[equipment_sequence] { <col0>[aircraft_code_sequence]:[varchar] <col1>[aircraft_code]:[varchar] } <table1>[city] { <col0>[city_code]:[varchar] <col1>[city_name]:[varchar] <col2>[state_code]:[varchar] <col3>[country_name]:[varchar] <col4>[time_zone_code]:[varchar] } <table2>[month] { <col0>[month_number]:[int]... | SELECT DISTINCT flight.flight_id FROM `<table20>` AS AIRPORT_SERVICE_0, `<table20>` AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, flight WHERE ( ( date_day.day_number = 21 AND date_day.month_number = 2 AND date_day.year = 1991 AND days.day_name = date_day.day_name AND flight.departure_time > 120... | i would like to see information for flights from SAN FRANCISCO leaving after 12pm to PITTSBURGH on monday |
<table0>[table_name_20] { <col0>[co_2_g_km]:[VARCHAR] <col1>[mpg_uk_combined]:[VARCHAR] <col2>[l_100km_urban__cold]:[VARCHAR] <col3>[fuel_type]:[VARCHAR] <col4>[manufacturer]:[VARCHAR] } | SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col3>` = "diesel" AND `<col4>` = "fiat" AND l_100km_urban__cold_ > 6.3 AND `<col1>` = 43.5 | What's the CO2 g/km of a Fiat running on diesel with the L/100km urban more than 6.3 and an mpg-UK combined of 43.5? |
<table0>[table_name_91] { <col0>[date]:[VARCHAR] <col1>[competition]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "uncaf nations cup 2009" | Name the date of the uncaf nations cup 2009 |
<table0>[table_30120633_1] { <col0>[area__acres]:[VARCHAR] <col1>[poor_law_union]:[VARCHAR] <col2>[townland]:[VARCHAR] } | SELECT area__acres__ FROM `<table0>` WHERE `<col1>` = "Bandon" AND `<col2>` = "Lissagroom" | How many acres does the area of Lissagroom with Bandon as its poor law union cover?
|
<table0>[SuggestedEditVotes] { <col0>[number]:[SuggestedEditId] <col1>[number]:[UserId] <col2>[number]:[VoteTypeId] <col3>[number]:[CreationDate] <col4>[time]:[TargetUserId] <col5>[number]:[TargetRepChange] } <table1>[PostTags] { <col0>[PostId]:[number] <col1>[TagId]:[number] } <table2>[CloseAsOffTopicReasonTypes] { ... | SELECT ROW_NUMBER( ) OVER ( ORDER BY Reputation DESC ) AS "#", Id AS "user_link", Reputation FROM `<table25>` WHERE Location LIKE '%Turkey%' ORDER BY Reputation DESC | Get top users from Armenia.
|
<table0>[t_kc21] { <col0>[CLINIC_ID]:[text] <col1>[CLINIC_TYPE]:[text] <col2>[COMP_ID]:[text] <col3>[DATA_ID]:[text] <col4>[DIFF_PLACE_FLG]:[number] <col5>[FERTILITY_STS]:[number] <col6>[FLX_MED_ORG_ID]:[text] <col7>[HOSP_LEV]:[number] <col8>[HOSP_STS]:[number] <col9>[IDENTITY_CARD]:[text] <col10>[INPT_AREA_BED]:[text]... | SELECT ( SELECT `<table1>`.OVE_PAY FROM `<table1>` JOIN t_kc21_`<table1>` JOIN t_kc21 ON t_kc21_`<table1>`.MED_SAFE_PAY_ID = `<table1>`.MED_SAFE_PAY_ID AND t_kc21_`<table1>`.MED_CLINIC_ID = t_kc21.MED_CLINIC_ID WHERE t_kc21.MED_CLINIC_ID = '81557970327' ) / ( SELECT `<table1>`.MED_AMOUT FROM `<table1>` WHERE t_kc21_`<t... | 看一下统筹基金支出占医疗费总额的比例,就是81557970327那个医疗就诊
|
<table0>[drought_impact] { <col0>[county]:[VARCHAR] <col1>[state]:[VARCHAR] <col2>[year]:[INT] <col3>[impact]:[BOOLEAN] } | SELECT state, `<col0>` FROM `<table0>` WHERE year=2019 AND impact=TRUE; | List all the drought-affected counties in each state in 2019. |
<table0>[table_train_72] { <col0>[int]:[extracorporeal_membrane_oxygenation_ecmo_cannulation] <col1>[bool]:[heart_disease] <col2>[bool]:[meningitis_or_encephalitis] <col3>[bool]:[sepsis] <col4>[bool]:[cancer] <col5>[bool]:[prisoners] <col6>[bool]:[NOUSE] } | SELECT * FROM `<table0>` WHERE cancer = 1 | history of cancer or undergoing treatment for cancer.
|
<table0>[patients] { <col0>[INT]:[name] <col1>[VARCHAR]:[age] <col2>[INT]:[gender] <col3>[VARCHAR]:[race] <col4>[VARCHAR]:[ethnicity] <col5>[VARCHAR]:[INSERT] } | SELECT CASE WHEN age >= 18 AND age < 30 THEN '18-29' WHEN age >= 30 AND age < 50 THEN '30-49' WHEN age >= 50 AND age < 65 THEN '50-64' ELSE '65+' END AS age_group, COUNT( * ) as count FROM `<table0>` GROUP BY age_group; | Retrieve the number of patients by age group in the patients table. |
<table0>[table_29418619_1] { <col0>[former_school]:[VARCHAR] <col1>[hometown]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "North Port, FL" | What is the former school of the player from North Port, FL? |
<table0>[Ingredient_Sourcing] { <col0>[SupplierID]:[INT] <col1>[ProductID]:[INT] <col2>[Organic]:[BOOLEAN] <col3>[Country]:[VARCHAR] } | SELECT Country, SUM( `<col2>` ) as TotalOrganic FROM `<table0>` GROUP BY `<col3>` ORDER BY TotalOrganic DESC; | Which country sources the most organic ingredients for cosmetic products? |
<table0>[reservations] { <col0>[code]:[number] <col1>[room]:[text] <col2>[checkin]:[text] <col3>[checkout]:[text] <col4>[rate]:[number] <col5>[lastname]:[text] <col6>[firstname]:[text] <col7>[adults]:[number] <col8>[kids]:[number] } <table1>[rooms] { <col0>[roomid]:[text] <col1>[roomname]:[text] <col2>[beds]:[number] ... | SELECT T2.roomname FROM `<table0>` AS T1 JOIN rooms AS T2 ON T1.room = T2.roomid GROUP BY T1.room HAVING COUNT( * ) > 60 | What are the names of rooms whose reservation frequency exceeds 60 times?
|
<table0>[voting_record] { <col0>[stuid]:[number] <col1>[registration_date]:[text] <col2>[election_cycle]:[text] <col3>[president_vote]:[number] <col4>[vice_president_vote]:[number] <col5>[secretary_vote]:[number] <col6>[treasurer_vote]:[number] <col7>[class_president_vote]:[number] <col8>[class_senator_vote]:[number] ... | SELECT MAX( `<col3>` ), MIN( `<col3>` ) FROM `<table1>` WHERE `<col5>` = 600 | Tell me the ages of the oldest and youngest students studying major 600. |
<table0>[table_name_62] { <col0>[constructor]:[VARCHAR] <col1>[grid]:[VARCHAR] <col2>[driver]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` < 5 AND `<col2>` = "michael schumacher" | What Constructor did Michael Schumacher have with a Grid smaller than 5?
|
<table0>[country] { <col0>[integer]:[country_name] } <table1>[ranking_system] { <col0>[integer]:[system_name] } <table2>[ranking_criteria] { <col0>[integer]:[ranking_system_id] <col1>[integer]:[criteria_name] } <table3>[university] { <col0>[integer]:[country_id] <col1>[integer]:[university_name] } <table4>[universi... | SELECT AVG( T2.score ) FROM `<table2>` AS T1 INNER JOIN university_ranking_year AS T2 ON T1.id = T2.`<table2>`_id WHERE T1.criteria_name = 'Alumni' AND T2.year = 2008 | Calculate the average score per university under Alumni criteria in 2008. |
<table0>[grants] { <col0>[INT]:[department] <col1>[VARCHAR]:[FLOAT] } | SELECT SUM( amount ) FROM `<table0>` WHERE department = 'Arts and Humanities'; | Find the total grant amount awarded to the 'Arts and Humanities' department |
<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 prescriptions ON `<table1>`.hadm_id = prescriptions.hadm_id WHERE `<table1>`.admission_type = "EMERGENCY" AND prescriptions.formulary_drug_cd = "ENOX80I" | count the number of patients whose admission type is emergency and drug code is enox80i?
|
<table0>[course_offering] { <col0>[offering_id]:[int] <col1>[course_id]:[int] <col2>[semester]:[int] <col3>[section_number]:[int] <col4>[start_time]:[time] <col5>[end_time]:[time] <col6>[monday]:[varchar] <col7>[tuesday]:[varchar] <col8>[wednesday]:[varchar] <col9>[thursday]:[varchar] <col10>[friday]:[varchar] <col11>[... | SELECT COUNT( DISTINCT instructor.instructor_id ) FROM course, course_offering, instructor, offering_instructor, semester WHERE course.course_id = course_offering.course_id AND course.department = 'WOMENSTD' AND course.number = 498 AND offering_instructor.instructor_id = instructor.instructor_id AND offering_instructor... | For Spring 2019 , how many professors teach WOMENSTD 498 ? |
<table0>[Apartment_Facilities] { <col0>[apt_id]:[INTEGER] <col1>[facility_code]:[CHAR] } <table1>[Apartments] { <col0>[apt_id]:[INTEGER] <col1>[building_id]:[INTEGER] <col2>[apt_type_code]:[CHAR] <col3>[apt_number]:[CHAR] <col4>[bathroom_count]:[INTEGER] <col5>[bedroom_count]:[INTEGER] <col6>[room_count]:[CHAR] } <ta... | SELECT booking_status_code, COUNT( * ) FROM `<table5>` GROUP BY `<col3>` ORDER BY `<col3>` | Show the booking status code and the corresponding number of bookings Show bar chart, sort booking_status_code from low to high order. |
<table0>[Activity] { <col0>[actid]:[INTEGER] <col1>[activity_name]:[varchar] } <table1>[Faculty] { <col0>[FacID]:[INTEGER] <col1>[Lname]:[VARCHAR] <col2>[Fname]:[VARCHAR] <col3>[Rank]:[VARCHAR] <col4>[Sex]:[VARCHAR] <col5>[Phone]:[INTEGER] <col6>[Room]:[VARCHAR] <col7>[Building]:[VARCHAR] } <table2>[Faculty_Participa... | SELECT Rank, COUNT( `<col3>` ) FROM `<table1>` GROUP BY `<col3>` | Show the number of faculty for each rank in a bar chart. |
<table0>[city_waste_generation] { <col0>[city_id]:[INT] <col1>[city_name]:[VARCHAR] <col2>[population]:[INT] <col3>[waste_generated]:[FLOAT] } | SELECT city_name, AVG( waste_generated/population ) OVER ( PARTITION BY city_name ) as avg_waste_per_capita FROM city_waste_generation; | What is the average waste generation rate per capita in each city? |
<table0>[table_name_89] { <col0>[home_team]:[VARCHAR] <col1>[venue]:[VARCHAR] } | SELECT `<col0>` AS score FROM `<table0>` WHERE `<col1>` = "mcg" | What is the Home team score for the Venue named MCG? |
<table0>[attorneys] { <col0>[attorney_id]:[INT] <col1>[attorney_state]:[VARCHAR] } <table1>[cases] { <col0>[case_id]:[INT] <col1>[attorney_id]:[INT] } | SELECT a.attorney_state, COUNT( c.case_id ) FROM `<table0>` a INNER JOIN cases c ON a.attorney_id = c.attorney_id GROUP BY a.attorney_state; | How many cases were handled by attorneys in each state, based on the 'attorney_state' column in the 'attorneys' table? |
<table0>[PostHistory] { <col0>[number]:[PostHistoryTypeId] <col1>[number]:[PostId] <col2>[number]:[RevisionGUID] <col3>[CreationDate]:[time] <col4>[UserId]:[number] <col5>[UserDisplayName]:[text] <col6>[Comment]:[text] <col7>[Text]:[text] <col8>[ContentLicense]:[text] } <table1>[CloseAsOffTopicReasonTypes] { <col0>[nu... | SELECT P.Title AS Title, CAST( P.Score AS FLOAT ) / CAST( P.ViewCount AS FLOAT ) AS SVRatio, P.Score AS Score, P.ViewCount AS Views, P.CreationDate AS CreationDate FROM `<table27>` AS P WHERE P.PostTypeId = 1 AND P.Score >= @MinScore AND P.ViewCount >= @MinViews ORDER BY SVRatio DESC LIMIT 20 | Post Score/View ratio - top 20 most valuable posts. Returns 20 question posts with the highest Score/View ratio, (arguably) being a measure of the post quality (as opposed to - popularity). |
<table0>[labor] { <col0>[labor_id]:[INT] <col1>[state]:[VARCHAR] <col2>[employed_date]:[DATE] <col3>[gender]:[VARCHAR] <col4>[profession]:[VARCHAR] } | SELECT state, gender, COUNT( * ) FROM `<table0>` WHERE `<col4>` = 'Construction' AND `<col2>` BETWEEN '2021-01-01' AND '2021-12-31' AND `<col1>` = 'Texas' GROUP BY state, gender; | How many construction laborers were employed in Texas in 2021, by gender? |
<table0>[Museums] { <col0>[city]:[VARCHAR] <col1>[name]:[VARCHAR] <col2>[visitors]:[INT] } | SELECT city, SUM( `<col2>` ) FROM `<table0>` GROUP BY city; | What is the total number of visitors to museums in Tokyo and Seoul? |
<table0>[table_test_29] { <col0>[int]:[bleeding] <col1>[int]:[left_ventricular_ejection_fraction_lvef] <col2>[int]:[systolic_blood_pressure_sbp] <col3>[int]:[hemoglobin_a1c_hba1c] <col4>[float]:[heart_disease] <col5>[bool]:[trauma] <col6>[bool]:[renal_disease] <col7>[bool]:[creatinine_clearance_cl] <col8>[float]:[hemor... | SELECT * FROM `<table0>` WHERE hemorrhagic_stroke = 1 | history of hemorrhagic stroke. |
<table0>[lab] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[itemid]:[text] <col3>[charttime]:[text] <col4>[flag]:[text] <col5>[value_unit]:[text] <col6>[label]:[text] <col7>[fluid]:[text] } <table1>[procedures] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:... | SELECT COUNT( DISTINCT `<table2>`.subject_id ) FROM `<table2>` INNER JOIN lab ON `<table2>`.hadm_id = lab.hadm_id WHERE `<table2>`.admityear < "2172" AND lab.label = "Fibrin Degradation Products" | give me the number of patients whose admission year is less than 2172 and lab test name is fibrin degradation products?
|
<table0>[conditions] { <col0>[condition_id]:[INT] <col1>[condition_name]:[TEXT] <col2>[prevalence]:[INT] } <table1>[treatments] { <col0>[treatment_id]:[INT] <col1>[patient_id]:[INT] <col2>[condition_id]:[INT] <col3>[treatment_date]:[DATE] } | SELECT `<table0>`.condition_name, COUNT( * ) as num_patients FROM `<table0>` JOIN treatments ON `<table0>`.condition_id = treatments.condition_id WHERE state = 'Texas' GROUP BY `<table0>`.condition_name ORDER BY num_patients DESC LIMIT 5; | List the top 5 most common mental health conditions treated in Texas. |
<table0>[table_name_84] { <col0>[year]:[VARCHAR] <col1>[play_by_play]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "don earle" | What year was the play-by-play for Don Earle? |
<table0>[table_204_60] { <col0>[number]:[number] <col1>[constituency]:[nname] <col2>[text]:[constituency] <col3>[nnumber]:[number] <col4>[member]:[legislative] <col5>[assembly]:[text] <col6>[political]:[party] } | SELECT "constituency\nname" FROM `<table0>` WHERE "sl no" < ( SELECT "sl no" FROM `<table0>` WHERE "constituency\nname" = 'barhampur' ) AND "political party" = 'asom gana parishad' | previous to barhampur , what is the name of the constituency associated with the asom gana parishad listed ?
|
<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 `<table3>`.dob, `<table3>`.expire_flag FROM `<table3>` WHERE `<table3>`.subject_id = "7578" | what is date of birth and death status of subject id 7578?
|
<table0>[threat_intelligence] { <col0>[threat_id]:[INT] <col1>[country]:[VARCHAR] <col2>[255]:[score] <col3>[INT]:[threat_date] <col4>[DATE]:[INSERT] } | SELECT AVG( score ) FROM `<table0>` WHERE EXTRACT( MONTH FROM threat_date ) = 6 AND `<col1>` IN ( 'China', 'Japan', 'Australia' ); | What is the average threat intelligence score for countries in the Asia-Pacific region in the month of June? |
<table0>[PublicServices] { <col0>[state]:[VARCHAR] <col1>[year]:[INT] <col2>[budget]:[INT] } | SELECT AVG( `<col2>` ) FROM `<table0>` WHERE `<col0>` = 'Florida' AND `<col1>` = 2022; | Identify the average budget allocated to public services in Florida in 2022. |
<table0>[Players] { <col0>[PlayerID]:[INT] <col1>[Country]:[VARCHAR] <col2>[boolean]:[Playtime] <col3>[INT]:[INSERT] } | SELECT Country, AVG( Playtime ) FROM `<table0>` WHERE VR = true GROUP BY Country; | What is the average playtime for players who play games in VR, by country? |
<table0>[camera_lens] { <col0>[int]:[brand] <col1>[text]:[name] <col2>[text]:[focal_length_mm] <col3>[real]:[max_aperture] } <table1>[mountain] { <col0>[int]:[name] <col1>[text]:[Height] <col2>[real]:[Prominence] <col3>[real]:[Range] <col4>[text]:[Country] } <table2>[photos] { <col0>[int]:[camera_lens_id] <col1>[int]... | SELECT brand, COUNT( brand ) FROM `<table0>` GROUP BY brand | Show the number of brand from each brand |
<table0>[table_name_90] { <col0>[champion]:[VARCHAR] <col1>[runner_up]:[VARCHAR] <col2>[year]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "jimmy connors" AND `<col2>` < 1978 | Who was the champion earlier than 1978 when the runner-up was Jimmy Connors?
|
<table0>[d_labitems] { <col0>[row_id]:[number] <col1>[itemid]:[number] <col2>[label]:[text] } <table1>[diagnoses_icd] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icd9_code]:[text] <col4>[charttime]:[time] } <table2>[d_items] { <col0>[row_id]:[number] <col1>[itemid]:[number] <... | SELECT MAX( t1.c1 ) FROM ( SELECT SUM( `<table5>`.`<table5>` ) AS c1 FROM `<table5>` WHERE `<table5>`.hadm_id IN ( SELECT `<table11>`.hadm_id FROM `<table11>` WHERE `<table11>`.itemid IN ( SELECT `<table0>`.itemid FROM `<table0>` WHERE `<table0>`.label = 'ld, body fluid' ) ) AND DATETIME( `<table5>`.chargetime ) >= DAT... | tell me the maximum total hospital cost that involves ld, body fluid since 5 years ago?
|
<table0>[procedures] { <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>[la... | SELECT `<table3>`.route FROM `<table3>` WHERE `<table3>`.formulary_drug_cd = "GELCLAIR" | what is drug route of drug code gelclair?
|
<table0>[table_name_75] { <col0>[unit]:[VARCHAR] <col1>[construction_start]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "1 december 1984" | Construction start of 1 december 1984 is what unit? |
<table0>[teaches] { <col0>[varchar]:[course_id] <col1>[varchar]:[sec_id] <col2>[varchar]:[semester] <col3>[varchar]:[year] } <table1>[advisor] { <col0>[s_ID]:[varchar] <col1>[i_ID]:[varchar] } <table2>[time_slot] { <col0>[time_slot_id]:[varchar] <col1>[day]:[varchar] <col2>[start_hr]:[numeric] <col3>[start_min]:[nume... | SELECT title, COUNT( `<col1>` ) FROM `<table6>` AS T1 JOIN prereq AS T2 ON T1.`<table6>`_id = T2.`<table6>`_id GROUP BY `<col1>` ORDER BY `<col1>` | How many courses have two prerequisites? Show me a bar chart grouping by title, and could you sort by the bar in asc? |
<table0>[vitalperiodic] { <col0>[vitalperiodicid]:[number] <col1>[patientunitstayid]:[number] <col2>[temperature]:[number] <col3>[sao2]:[number] <col4>[heartrate]:[number] <col5>[respiration]:[number] <col6>[systemicsystolic]:[number] <col7>[systemicdiastolic]:[number] <col8>[systemicmean]:[number] <col9>[observationti... | SELECT COUNT( DISTINCT t1.uniquepid ) FROM ( SELECT patient.uniquepid, `<table3>`.`<table3>`time FROM `<table3>` JOIN patient ON `<table3>`.patientunitstayid = patient.patientunitstayid WHERE `<table3>`.`<table3>`name = 'sepsis - sepsis with multi-organ dysfunction' AND DATETIME( `<table3>`.`<table3>`time, 'start of ye... | how many patients underwent mri - head within 2 months after they had been diagnosed with sepsis - sepsis with multi-organ dysfunction, in this year?
|
<table0>[routes] { <col0>[INT]:[route_number] <col1>[INT]:[route_type] <col2>[TEXT]:[city] } | DELETE FROM `<table0>` WHERE route_type = 'Tram'; | Delete all records from the 'routes' table where the 'route_type' is 'Tram' |
<table0>[table_204_894] { <col0>[number]:[season] <col1>[number]:[winner] <col2>[text]:[score] <col3>[text]:[runners] <col4>[text]:[venue] } | SELECT ABS( "score" - "score" ) FROM `<table0>` WHERE "season" = 2005 | how many more points did w connection score than san juan jabloteh in 2005 ? |
<table0>[diagnoses] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table1>[procedures] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table2>[demogr... | SELECT COUNT( DISTINCT `<table2>`.subject_id ) FROM `<table2>` WHERE `<table2>`.diagnosis = "ATRIAL FIBRILLATION\THORACOSCOPIC MAZE PROCEDURE BILATERAL/SDA" AND `<table2>`.dod_year <= "2183.0" | report the number of patients who died on or before 2183 and had atrial fibrillation/thoracoscopic maze procedure bilateral/sda primary disease. |
<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 `<table4>`.subject_id ) FROM `<table4>` INNER JOIN lab ON `<table4>`.hadm_id = lab.hadm_id WHERE lab.itemid = "51257" AND lab.flag = "abnormal" | what is the number of patients whose item id is 51257 and lab test abnormal status is abnormal?
|
<table0>[PostsWithDeleted] { <col0>[number]:[PostTypeId] <col1>[number]:[AcceptedAnswerId] <col2>[number]:[ParentId] <col3>[number]:[CreationDate] <col4>[time]:[DeletionDate] <col5>[time]:[Score] <col6>[number]:[ViewCount] <col7>[number]:[Body] <col8>[text]:[OwnerUserId] <col9>[number]:[OwnerDisplayName] <col10>[text]:... | SELECT pl.PostId AS "post_link", COUNT( LinkTypeId ) AS "Number of dupe-targets" FROM `<table17>` AS pl WHERE pl.LinkTypeId = 3 GROUP BY pl.PostId ORDER BY 'Number of dupe-targets' DESC | Find questions with X duplicate targets.
|
<table0>[program_requirement] { <col0>[program_id]:[int] <col1>[category]:[varchar] <col2>[min_credit]:[int] <col3>[additional_req]:[varchar] } <table1>[offering_instructor] { <col0>[offering_instructor_id]:[int] <col1>[offering_id]:[int] <col2>[instructor_id]:[int] } <table2>[program] { <col0>[program_id]:[int] <col... | SELECT COUNT( * ) > 0 FROM `<table17>` INNER JOIN program_`<table17>` ON program_`<table17>`.`<table17>`_id = `<table17>`.`<table17>`_id WHERE `<table17>`.department = 'REEES' AND `<table17>`.number = 695 AND program_`<table17>`.category LIKE '%ULCS%' | For ULCS , does REEES 695 count ?
|
<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 ground_service.transport_type FROM city, ground_service WHERE city.city_name = 'PITTSBURGH' AND ground_service.city_code = city.city_code AND ground_service.transport_type = 'RENTAL CAR' | in PITTSBURGH i'd like to RENTAL CAR |
<table0>[person_info] { <col0>[CSD]:[text] <col1>[CSRQ]:[time] <col2>[GJDM]:[text] <col3>[GJMC]:[text] <col4>[JGDM]:[text] <col5>[JGMC]:[text] <col6>[MZDM]:[text] <col7>[MZMC]:[text] <col8>[RYBH]:[text] <col9>[XBDM]:[number] <col10>[XBMC]:[text] <col11>[XLDM]:[text] <col12>[XLMC]:[text] <col13>[text]:[ZYLBDM] <col14>[t... | SELECT `<table6>`.SHRGH, `<table6>`.SHRXM FROM `<table6>` WHERE `<table6>`.JYZBLSH = '40478366536' | 审核人的工号以及姓名在检验结果指标记录40478366536是什么?
|
<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 p.Id AS "post_link" FROM `<table24>` AS p JOIN Users AS u ON p.OwnerUserId = u.Id WHERE p.Body LIKE '%' + u.DisplayName + '%' ORDER BY p.ViewCount DESC LIMIT 1000 | Top 1000 people that use their name in their post.. |
<table0>[time_zone] { <col0>[time_zone_code]:[text] <col1>[time_zone_name]:[text] <col2>[hours_from_gmt]:[int] } <table1>[code_description] { <col0>[code]:[varchar] <col1>[description]:[text] } <table2>[fare] { <col0>[fare_id]:[int] <col1>[from_airport]:[varchar] <col2>[to_airport]:[varchar] <col3>[fare_basis_code]:[... | SELECT DISTINCT `<table7>`_code FROM `<table7>` WHERE `<table7>`_code = 'D10' | what is the abbreviation D10
|
<table0>[course_prerequisite] { <col0>[pre_course_id]:[int] <col1>[course_id]:[int] } <table1>[student] { <col0>[student_id]:[int] <col1>[lastname]:[varchar] <col2>[firstname]:[varchar] <col3>[program_id]:[int] <col4>[declare_major]:[varchar] <col5>[total_credit]:[int] <col6>[total_gpa]:[float] <col7>[entered_as]:[var... | SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, program_course, semester WHERE course_offering.start_time > '12:00' AND course.course_id = course_offering.course_id AND program_course.category LIKE '%ULCS%' AND program_course.course_id = course.course_id AND semester.semester... | Regarding upper level electives for next Winter after 12:00 A.M. , which ones will be available ?
|
<table0>[student_program_participation] { <col0>[student_id]:[INT] <col1>[program_name]:[VARCHAR] <col2>[semester]:[VARCHAR] } | SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` = 'Lifelong Learning' AND `<col2>` = 'Fall 2021'; | How many students participated in the 'Lifelong Learning' program in the 'Fall 2021' semester? |
<table0>[table_name_56] { <col0>[long]:[VARCHAR] <col1>[avg_g]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "5.9" | For the Avg/G of 5.9, what was the long? |
<table0>[table_name_65] { <col0>[score]:[VARCHAR] <col1>[date]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "1 august 2008" | What was the final score on 1 August 2008? |
<table0>[table_27267] { <col0>[English]:[text] <col1>[Slovianski]:[text] <col2>[u0421]:[u043b] <col3>[u043e]:[u0432] <col4>[u0458]:[u0430] <col5>[u043d]:[u0441] <col6>[u043a]:[u0438] <col7>[text]:[Russian] <col8>[text]:[Ukrainian] <col9>[text]:[Belarusian] <col10>[text]:[Polish] <col11>[text]:[Czech] <col12>[text]:[Slo... | SELECT "Slovak" FROM `<table0>` WHERE "Ukrainian" = 'пес, собака' | What area all values for Slovak when value for Ukranian is , ? |
<table0>[IntelligenceOperations] { <col0>[region]:[TEXT] <col1>[year]:[INTEGER] <col2>[num_operations]:[INTEGER] } | SELECT region, SUM( `<col2>` ) FROM `<table0>` WHERE `<col0>` = 'Asia-Pacific' AND `<col1>` = 2021 GROUP BY region; | How many intelligence operations were conducted in the Asia-Pacific region last year? |
<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_items] { <col0>[row_id]:[number] <col1>[itemid]:[number] <col2>[label]:[text] ... | SELECT MAX( t1.c1 ) FROM ( SELECT SUM( `<table7>`.`<table7>` ) AS c1 FROM `<table7>` WHERE `<table7>`.hadm_id IN ( SELECT `<table6>`.hadm_id FROM `<table6>` WHERE `<table6>`.icd9_code = ( SELECT `<table5>`.icd9_code FROM `<table5>` WHERE `<table5>`.short_title = 'oth transureth prostatec' ) ) GROUP BY `<table7>`.hadm_i... | what are the maximum total hospital costs involving a procedure called a oth transureth prostatec? |
<table0>[satellites] { <col0>[INT]:[PRIMARY] <col1>[KEY]:[name] <col2>[VARCHAR]:[launch_year] <col3>[INT]:[country] <col4>[VARCHAR]:[INSERT] } | DELETE FROM `<table0>` WHERE launch_year < 2000; | Delete all records from the 'satellites' table that were launched before 2000 |
<table0>[Dams] { <col0>[DamID]:[int] <col1>[varchar]:[100] <col2>[ConstructionDate]:[date] } | SELECT COUNT( * ) FROM `<table0>` WHERE `<col2>` <= '2018-12-31'; | How many dams were constructed in the year 2018 or before? |
<table0>[station] { <col0>[integer]:[name] <col1>[text]:[lat] <col2>[real]:[long] <col3>[real]:[dock_count] <col4>[integer]:[city] <col5>[text]:[installation_date] } <table1>[status] { <col0>[station_id]:[integer] <col1>[bikes_available]:[integer] <col2>[docks_available]:[integer] <col3>[time]:[text] } <table2>[trip]... | SELECT CAST( SUM( IIF( subscription_type = 'Subscriber', 1, 0 ) ) AS REAL ) / SUM( IIF( subscription_type = 'Customer', 1, 0 ) ) FROM `<table2>` WHERE start_station_name = '2nd at South Park' AND end_station_name = '2nd at South Park' | What is the ratio for subscriber to customer given that the starting and the ending stations is 2nd at South Park? |
<table0>[Album] { <col0>[AlbumId]:[integer] <col1>[Title]:[varchar] <col2>[160]:[ArtistId] } <table1>[InvoiceLine] { <col0>[InvoiceLineId]:[integer] <col1>[InvoiceId]:[integer] <col2>[TrackId]:[integer] <col3>[UnitPrice]:[decimal] <col4>[Quantity]:[integer] } <table2>[Invoice] { <col0>[InvoiceId]:[integer] <col1>[Cus... | SELECT Phone, COUNT( `<col12>` ) FROM `<table8>` GROUP BY `<col12>` ORDER BY `<col12>` | List the number of the phone numbers of all employees, list in asc by the names please.
|
<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 t3.drug FROM ( SELECT t2.drug, DENSE_RANK( ) OVER ( ORDER BY COUNT( * ) DESC ) AS c1 FROM ( SELECT admissions.subject_id, `<table8>`.charttime, admissions.hadm_id FROM `<table8>` JOIN admissions ON `<table8>`.hadm_id = admissions.hadm_id WHERE `<table8>`.icd9_code = ( SELECT `<table1>`.icd9_code FROM `<table1>` ... | what are the three most commonly prescribed medications that were prescribed to the male patients in the 40s during the same hospital visit after they were diagnosed with chr diastolic hrt fail since 2101? |
<table0>[ota_partners] { <col0>[INT]:[partner_name] <col1>[TEXT]:[region] <col2>[TEXT]:[commission_percentage] <col3>[FLOAT]:[INSERT] } | SELECT AVG( commission_percentage ) FROM `<table0>` WHERE region = 'Europe'; | What is the average commission percentage of OTA partners based in 'Europe'? |
<table0>[diagnoses_icd] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icd9_code]:[text] <col4>[charttime]:[time] } <table1>[microbiologyevents] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[charttime]:[time] <col4>[spec_type_desc]:[text] <... | SELECT 1 * ( STRFTIME( '%j', CURRENT_TIME( ) ) - STRFTIME( '%j', `<table5>`.intime ) ) FROM `<table5>` WHERE `<table5>`.hadm_id IN ( SELECT `<table7>`.hadm_id FROM `<table7>` WHERE `<table7>`.subject_id = 2518 AND `<table7>`.dischtime IS NULL ) AND `<table5>`.careunit = 'csru' ORDER BY `<table5>`.intime LIMIT 1 | how many days have passed from the first time patient 2518 stayed in careunit csru during the current hospital visit?
|
<table0>[table_name_82] { <col0>[away_team]:[VARCHAR] <col1>[venue]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "mcg" | Which Away team has a Venue of mcg? |
<table0>[table_37725] { <col0>[Favorite]:[professional] <col1>[sport]:[text] <col2>[2005]:[text] <col3>[2008]:[text] <col4>[2011]:[text] <col5>[2012]:[text] } | SELECT "2011" FROM `<table0>` WHERE "2005" = '4.2%' | What is listed for the 2011 that has a 2005 of 4.2%?
|
<table0>[ocean_acidification_data] { <col0>[INT]:[PRIMARY] <col1>[KEY]:[marine_species] <col2>[VARCHAR]:[255] <col3>[ph_level]:[DECIMAL] } <table1>[monitoring_stations] { <col0>[INT]:[PRIMARY] <col1>[KEY]:[station_name] <col2>[VARCHAR]:[255] <col3>[region]:[VARCHAR] } | SELECT `<table0>`.marine_species, `<table0>`.ph_level FROM `<table0>` INNER JOIN monitoring_stations ON `<table0>`.id = monitoring_stations.id WHERE monitoring_stations.region = 'west_pacific'; | Which marine species have been recorded in the 'west_pacific' region and their ph levels? |
<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 `<table2>`.admission_type = "EMERGENCY" AND lab.label = "Reticulocyte Count, Manual" | how many patients whose admission type is emergency and lab test name is reticulocyte count, manual? |
<table0>[table_203_69] { <col0>[number]:[representative] <col1>[text]:[title] <col2>[text]:[number] <col3>[number]:[appointed] } | SELECT "representative" FROM `<table0>` ORDER BY "from" DESC LIMIT 1 | who was the last person appointed on this table ? |
<table0>[party] { <col0>[YEAR]:[VARCHAR] <col1>[Governor]:[VARCHAR] } | SELECT DISTINCT `<col0>` FROM `<table0>` WHERE `<col1>` = "Eliot Spitzer" | In which distinct years was the governor "Eliot Spitzer"? |
<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 t1.`<table8>`name FROM ( SELECT `<table8>`.`<table8>`name, DENSE_RANK( ) OVER ( ORDER BY COUNT( * ) DESC ) AS c1 FROM `<table8>` WHERE `<table8>`.`<table0>`unitstayid IN ( SELECT `<table0>`.`<table0>`unitstayid FROM `<table0>` WHERE `<table0>`.age BETWEEN 20 AND 29 ) AND DATETIME( `<table8>`.`<table8>`time ) <= ... | show me the top four most common diagnoses for patients aged 20s until 4 years ago?
|
<table0>[startup] { <col0>[INT]:[name] <col1>[TEXT]:[founder_gender] <col2>[TEXT]:[founding_year] <col3>[INT]:[funding_round_size] <col4>[INT]:[INSERT] } | SELECT SUM( funding_round_size ) FROM `<table0>` WHERE founder_gender = 'Female' AND founding_year = 2020; | What is the total funding raised by startups founded by women in 2020? |
<table0>[Artist] { <col0>[ArtistID]:[INT] <col1>[ArtistName]:[VARCHAR] <col2>[Age]:[INT] <col3>[TotalArtworks]:[INT] } | SELECT AVG( `<col2>` ) FROM `<table0>` WHERE `<col3>` > 5; | What is the average age of artists who created more than 5 artworks? |
<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 `<table2>`.diagnosis, diagnoses.long_title FROM `<table2>` INNER JOIN diagnoses ON `<table2>`.hadm_id = diagnoses.hadm_id WHERE `<table2>`.name = "Jane Dillard" | find out the primary disease and long title of diagnosis for patient jane dillard. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.