schema stringlengths 20 14.6k | query stringlengths 17 2.58k | question stringlengths 8 1.06k |
|---|---|---|
<table0>[mental_health_parity] { <col0>[INT]:[regulation] <col1>[VARCHAR]:[100] <col2>[state]:[VARCHAR] <col3>[implementation_date]:[DATE] } <table1>[state_names] { <col0>[state]:[VARCHAR] <col1>[state_name]:[VARCHAR] } | SELECT EXTRACT( YEAR FROM m.implementation_date ) AS year, s.state_name, COUNT( m.id ) AS num_regulations FROM `<table0>` m INNER JOIN state_names s ON m.state = s.state WHERE m.implementation_date >= '2010-01-01' GROUP BY EXTRACT( YEAR FROM m.implementation_date ), s.state_name; | Show the number of mental health parity regulations implemented in each state by year since 2010. |
<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>`.admission_location = "TRANSFER FROM HOSP/EXTRAM" AND prescriptions.formulary_drug_cd = "INRHI" | give me the number of patients whose admission location is transfer from hosp/extram and drug code is inrhi?
|
<table0>[CloseAsOffTopicReasonTypes] { <col0>[number]:[IsUniversal] <col1>[boolean]:[InputTitle] <col2>[text]:[MarkdownInputGuidance] <col3>[text]:[MarkdownPostOwnerGuidance] <col4>[text]:[MarkdownPrivilegedUserGuidance] <col5>[text]:[MarkdownConcensusDescription] <col6>[text]:[CreationDate] <col7>[time]:[CreationModer... | SELECT years.number AS "year", months.number AS "month" FROM master.spt_values AS months CROSS JOIN master.spt_values AS years WHERE months.number BETWEEN 1 AND 12 AND months.type = 'P' AND years.type = 'P' AND years.number BETWEEN 2008 AND YEAR( CURRENT_TIMESTAMP( ) ) | Post Vote History By Month.
|
<table0>[table_16538] { <col0>[series]:[real] <col1>[season]:[real] <col2>[Title]:[text] <col3>[Directed]:[text] <col4>[Written]:[text] <col5>[Original]:[air] <col6>[date]:[text] <col7>[viewers]:[millions] } | SELECT "U.S. `<col7>` ( millions )" FROM `<table0>` WHERE "Title" = 'Throwing Heat' | How many millions of viewers watched the 'Throwing Heat' episode? |
<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 prescriptions ON `<table1>`.hadm_id = prescriptions.hadm_id WHERE `<table1>`.days_stay > "6" AND prescriptions.route = "IVPCA" | Find the number of patients who stayed in the hospital for more than 6 days and have ivpca as drug route. |
<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, `<col1>` FROM `<table0>` GROUP BY `<col10>` | Visualize the relationship between Team_ID and School_ID , and group by attribute All_Road. |
<table0>[table_name_71] { <col0>[range__varies_with_payload_weight]:[VARCHAR] <col1>[name_designation]:[VARCHAR] } | SELECT range__varies_with_payload_weight_ FROM `<table0>` WHERE `<col1>` = "shahab-4" | What is the range (varies by payload weight) for Shahab-4? |
<table0>[medication] { <col0>[medicationid]:[number] <col1>[patientunitstayid]:[number] <col2>[drugname]:[text] <col3>[dosage]:[text] <col4>[routeadmin]:[text] <col5>[drugstarttime]:[time] <col6>[drugstoptime]:[time] } <table1>[allergy] { <col0>[allergyid]:[number] <col1>[patientunitstayid]:[number] <col2>[drugname]:[... | SELECT 24 * ( STRFTIME( '%j', CURRENT_TIME( ) ) - STRFTIME( '%j', `<table9>`.`<table9>`time ) ) FROM `<table9>` WHERE `<table9>`.`<table7>`unitstayid IN ( SELECT `<table7>`.`<table7>`unitstayid FROM `<table7>` WHERE `<table7>`.`<table7>`healthsystemstayid IN ( SELECT `<table7>`.`<table7>`healthsystemstayid FROM `<table... | how many hours has elapsed since the last time that patient 005-87465 took a ogt flush intake on the current intensive care unit visit? |
<table0>[table_203_312] { <col0>[number]:[name] <col1>[text]:[club] <col2>[text]:[position] <col3>[text]:[years] <col4>[text]:[current] <col5>[status]:[text] <col6>[international]:[caps] } | SELECT "club" FROM `<table0>` WHERE "years" > 1988 ORDER BY "international caps" DESC LIMIT 1 | the team with the largest number of caps after 1988 |
<table0>[table_name_31] { <col0>[attendance]:[VARCHAR] <col1>[date]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "march 4" | How many people were in attendance on March 4? |
<table0>[City] { <col0>[integer]:[text] <col1>[CountryCode]:[text] <col2>[District]:[text] <col3>[Population]:[integer] } <table1>[Country] { <col0>[Code]:[text] <col1>[text]:[Continent] <col2>[text]:[Region] <col3>[text]:[SurfaceArea] <col4>[real]:[IndepYear] <col5>[integer]:[Population] <col6>[integer]:[LifeExpectan... | SELECT LocalName FROM `<table1>` WHERE Name = 'Ukraine' | What is the local name of Ukraine that they are also known for? |
<table0>[table_name_94] { <col0>[athlete]:[VARCHAR] <col1>[notes]:[VARCHAR] <col2>[rank]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "sc/d" AND `<col2>` = 6 | Which athlete had a rank of 6 and notes of sc/d? |
<table0>[latam_virtual_tours] { <col0>[hotel_id]:[INT] <col1>[hotel_name]:[VARCHAR] <col2>[255]:[views] } | SELECT hotel_id, hotel_name, MAX( views ) FROM latam_virtual_tours; | Which hotel in LATAM has the highest virtual tour engagement? |
<table0>[table_68523] { <col0>[Date]:[text] <col1>[Course]:[text] <col2>[Distance]:[text] <col3>[Type]:[text] <col4>[Winner]:[text] } | SELECT "Type" FROM `<table0>` WHERE "Course" = 'grosseto to rieti' | What type had a course of Grosseto To Rieti?
|
<table0>[jobs] { <col0>[JOB_ID]:[varchar] <col1>[JOB_TITLE]:[varchar] <col2>[MIN_SALARY]:[decimal] <col3>[MAX_SALARY]:[decimal] } <table1>[departments] { <col0>[DEPARTMENT_ID]:[decimal] <col1>[DEPARTMENT_NAME]:[varchar] <col2>[MANAGER_ID]:[decimal] <col3>[LOCATION_ID]:[decimal] } <table2>[countries] { <col0>[COUNTRY_... | SELECT HIRE_DATE, SUM( `<col7>` ) FROM `<table3>` WHERE `<col1>` LIKE '%D%' OR `<col1>` LIKE '%S%' | For all employees who have the letters D or S in their first name, find hire_date and the sum of salary bin hire_date by weekday, and visualize them by a bar chart.
|
<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 `<table4>`.icd9_code, procedures.short_title FROM `<table4>` INNER JOIN procedures ON `<table4>`.hadm_id = procedures.hadm_id WHERE `<table4>`.subject_id = "31066" | what is diagnoses icd9 code and procedure short title of subject id 31066? |
<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 `<table2>`.diagnosis, diagnoses.short_title FROM `<table2>` INNER JOIN diagnoses ON `<table2>`.hadm_id = diagnoses.hadm_id WHERE `<table2>`.subject_id = "25543" | find the primary disease and short title of diagnoses for patient with patient id 25543. |
<table0>[tickets_sold] { <col0>[concert_id]:[INT] <col1>[quantity]:[INT] } | SELECT COUNT( * ) FROM `<table0>` WHERE `<col1>` > 1000; | Count the number of concerts where more than 1000 tickets were sold. |
<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_Percent, `<col8>` FROM `<table1>` GROUP BY `<col3>` | Show the relation between acc percent and all_games_percent for each ACC_Regular_Season using a scatter chart |
<table0>[table_72792] { <col0>[Player]:[text] <col1>[real]:[Nationality] <col2>[text]:[Position] <col3>[text]:[Years] <col4>[Grizzlies]:[text] <col5>[School]:[Club] <col6>[Team]:[text] } | SELECT "Years for Grizzlies" FROM `<table0>` WHERE "No." = '32' | when did no. 32 play for grizzles
|
<table0>[table_name_47] { <col0>[score]:[VARCHAR] <col1>[tournament]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "clearwater, florida" | What is the final score of the tournament played in Clearwater, Florida?
|
<table0>[materials] { <col0>[material_id]:[INT] <col1>[site_id]:[INT] <col2>[quantity]:[INT] <col3>[material_date]:[DATE] } | SELECT site_id, material_date, SUM( quantity ) OVER ( PARTITION BY site_id ORDER BY material_date ) as total_quantity FROM materials; | Calculate the total quantity of materials used at each manufacturing site, per month. |
<table0>[diagnosis] { <col0>[diagnosisid]:[number] <col1>[patientunitstayid]:[number] <col2>[diagnosisname]:[text] <col3>[diagnosistime]:[time] <col4>[icd9code]:[text] } <table1>[vitalperiodic] { <col0>[vitalperiodicid]:[number] <col1>[patientunitstayid]:[number] <col2>[temperature]:[number] <col3>[sao2]:[number] <col... | SELECT `<table6>`.organism FROM `<table6>` WHERE `<table6>`.`<table4>`unitstayid IN ( SELECT `<table4>`.`<table4>`unitstayid FROM `<table4>` WHERE `<table4>`.`<table4>`healthsystemstayid IN ( SELECT `<table4>`.`<table4>`healthsystemstayid FROM `<table4>` WHERE `<table4>`.uniquepid = '031-23724' AND NOT `<table4>`.hospi... | what was the name of the organism found during the first other microbiology examination of patient 031-23724 in their last hospital encounter? |
<table0>[Volunteers] { <col0>[VolunteerID]:[INT] <col1>[SignUpDate]:[DATE] } | SELECT COUNT( * ) FROM `<table0>` WHERE YEAR( `<col1>` ) = 2022; | How many volunteers signed up in the 'Volunteers' table in 2022? |
<table0>[table_25599] { <col0>[real]:[Season] <col1>[real]:[Bowler] <col2>[text]:[Batsmen] <col3>[text]:[text] <col4>[text]:[Ground] <col5>[text]:[Scorecard] } | SELECT COUNT( "Bowler" ) FROM `<table0>` WHERE "Batsmen" = 'David Hussey Azhar Mahmood Gurkeerat Singh' | How many bowlers were there when david hussey azhar mahmood gurkeerat singh was the batsmen?
|
<table0>[table_test_4] { <col0>[int]:[ejection_fraction_ef] <col1>[int]:[systolic_blood_pressure_sbp] <col2>[int]:[active_infection] <col3>[bool]:[heart_disease] <col4>[bool]:[renal_disease] <col5>[bool]:[estimated_glomerular_filtration_rate_egfr] <col6>[int]:[cardiogenic_shock] <col7>[bool]:[diastolic_blood_pressure_d... | SELECT * FROM `<table0>` WHERE cardiogenic_shock = 1 OR systolic_blood_pressure_sbp < 100 OR diastolic_blood_pressure_dbp < 60 | cardiogenic shock or systolic bp < 100 mmhg or diastolic < 60 mmhg within the 24 hours prior to visits 1 or 2
|
<table0>[table_5289] { <col0>[Rank]:[real] <col1>[Player]:[text] <col2>[Country]:[text] <col3>[Earnings]:[real] <col4>[Events]:[real] <col5>[Wins]:[real] } | SELECT SUM( "Events" ) FROM `<table0>` WHERE "Earnings ( $ )" < '530,808' AND "Wins" < '2' AND "Rank" < '5' | Add up all the events whose earnings is less than $530,808, have less than 2 wins and is ranked lower than 5. |
<table0>[cost] { <col0>[costid]:[number] <col1>[uniquepid]:[text] <col2>[patienthealthsystemstayid]:[number] <col3>[eventtype]:[text] <col4>[eventid]:[number] <col5>[chargetime]:[time] } <table1>[diagnosis] { <col0>[diagnosisid]:[number] <col1>[patientunitstayid]:[number] <col2>[diagnosisname]:[text] <col3>[diagnosist... | SELECT DISTINCT `<table0>`.`<table0>` FROM `<table0>` WHERE `<table0>`.eventtype = '`<table5>`' AND `<table0>`.eventid IN ( SELECT `<table5>`.`<table5>`id FROM `<table5>` WHERE `<table5>`.drugname = 'lorazepam 0.5 mg tab' ) | tell me the cost of a prescription drug called lorazepam 0.5 mg tab? |
<table0>[Documents_to_be_Destroyed] { <col0>[Document_ID]:[INTEGER] <col1>[Destruction_Authorised_by_Employee_ID]:[INTEGER] <col2>[Destroyed_by_Employee_ID]:[INTEGER] <col3>[Planned_Destruction_Date]:[DATETIME] <col4>[Actual_Destruction_Date]:[DATETIME] <col5>[Other_Details]:[VARCHAR] } <table1>[Roles] { <col0>[Role_C... | SELECT Date_Stored, COUNT( `<col1>` ) FROM `<table3>` AS T1 JOIN Ref_Calendar AS T2 ON T1.Date_Stored = T2.Calendar_Date | Return a bar chart showing the number of documents stored in each weekday.
|
<table0>[prescriptions] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icustay_id]:[text] <col3>[drug_type]:[text] <col4>[drug]:[text] <col5>[formulary_drug_cd]:[text] <col6>[route]:[text] <col7>[drug_dose]:[text] } <table1>[diagnoses] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[te... | SELECT COUNT( DISTINCT `<table2>`.subject_id ) FROM `<table2>` WHERE `<table2>`.discharge_location = "SHORT TERM HOSPITAL" AND `<table2>`.dob_year < "2078" | count the number of patients whose discharge location is short term hospital and year of birth is less than 2078?
|
<table0>[water_leak_2] { <col0>[INT]:[city] <col1>[VARCHAR]:[255] <col2>[location]:[VARCHAR] <col3>[255]:[leak_volume] <col4>[FLOAT]:[leak_date] <col5>[DATE]:[INSERT] } | SELECT city, location, MAX( leak_volume ) FROM `<table0>` GROUP BY city, location, DATE_FORMAT( leak_date, '%Y-%m' ); | What is the maximum water leak volume by city, location, and month? |
<table0>[time_zone] { <col0>[time_zone_code]:[text] <col1>[time_zone_name]:[text] <col2>[hours_from_gmt]:[int] } <table1>[airport_service] { <col0>[city_code]:[varchar] <col1>[airport_code]:[varchar] <col2>[miles_distant]:[int] <col3>[direction]:[varchar] <col4>[minutes_distant]:[int] } <table2>[airline] { <col0>[air... | SELECT DISTINCT ground_service.transport_type FROM airport, ground_service WHERE airport.airport_code = 'DFW' AND ground_service.airport_code = airport.airport_code | show me ground transportation information for DFW
|
<table0>[providers] { <col0>[provider_id]:[INT] <col1>[provider_name]:[VARCHAR] <col2>[area_id]:[INT] } <table1>[provider_visits] { <col0>[visit_id]:[INT] <col1>[provider_id]:[INT] <col2>[patient_id]:[INT] <col3>[visit_date]:[DATE] } | SELECT COUNT( DISTINCT `<col2>` ) as num_patients FROM `<table1>` INNER JOIN providers ON `<table1>`.provider_id = providers.provider_id WHERE providers.area_id = ( SELECT area_id FROM areas WHERE area_name = 'rural area X' ) AND YEAR( `<col3>` ) = 2021; | How many patients were seen by healthcare providers from rural area X in 2021? |
<table0>[table_22514845_4] { <col0>[trophy_presentation]:[VARCHAR] <col1>[year]:[VARCHAR] } | SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` = 1987 | How many trophy presentations where in the year 1987? |
<table0>[Bookings] { <col0>[Booking_ID]:[INTEGER] <col1>[Customer_ID]:[INTEGER] <col2>[Workshop_Group_ID]:[VARCHAR] <col3>[100]:[Status_Code] <col4>[CHAR]:[Store_ID] <col5>[INTEGER]:[Order_Date] <col6>[DATETIME]:[Planned_Delivery_Date] <col7>[DATETIME]:[Actual_Delivery_Date] <col8>[DATETIME]:[Other_Order_Details] <col9... | SELECT Product_Name, AVG( `<col3>` ) FROM `<table1>` GROUP BY Product_Name ORDER BY AVG( `<col3>` ) | Show me a bar chart for what are the different product names? What is the average product price for each of them?, and sort by the total number from low to high.
|
<table0>[table_name_24] { <col0>[home_team]:[VARCHAR] } | SELECT `<col0>` AS score FROM `<table0>` WHERE `<col0>` = "richmond" | When Richmond was the home team, what was the home team score? |
<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]:[AFL] <col7>[CIO]:[Texas] } | SELECT ui.industry, AVG( ui.workers ) as avg_workers FROM `<table1>` ui JOIN unions u ON ui.union_id = u.id WHERE u.state = 'Texas' GROUP BY ui.industry; | What is the average number of workers in each union by industry in Texas? |
<table0>[treatments] { <col0>[treatment_id]:[INT] <col1>[treatment_type]:[VARCHAR] <col2>[patient_id]:[INT] } | SELECT COUNT( * ) FROM `<table0>` WHERE `<col1>` = 'medication'; | What is the total number of patients who received medication-based treatment? |
<table0>[defense_diplomacy] { <col0>[INT]:[region] <col1>[VARCHAR]:[budget] } | SELECT region, MAX( budget ) as max_budget FROM `<table0>` GROUP BY region ORDER BY max_budget DESC; | What is the maximum defense diplomacy event budget for each region in the 'defense_diplomacy' table, ordered by the maximum budget in descending order? |
<table0>[table_21550897_1] { <col0>[original_air_date]:[VARCHAR] <col1>[number]:[VARCHAR] } | SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE _number = 6 | How many times did episode 6 originally air? |
<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 procedures ON `<table4>`.hadm_id = procedures.hadm_id WHERE procedures.short_title = "Form cutan ileoureterost" | give me the number of patients who had formation of cutaneous uretero-ileostomy. |
<table0>[table_203_798] { <col0>[number]:[party] <col1>[text]:[votes] <col2>[text]:[number] <col3>[swing]:[number] <col4>[seats]:[number] <col5>[change]:[number] } | SELECT "party" FROM `<table0>` WHERE "%" < ( SELECT "%" FROM `<table0>` WHERE "party" = 'liberal and country league' ) ORDER BY "%" DESC LIMIT 1 | which party came in after the liberal and country league with the highest number of votes ? |
<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 `<table2>`.`<table2>`result FROM `<table2>` WHERE `<table2>`.`<table0>`unitstayid IN ( SELECT `<table0>`.`<table0>`unitstayid FROM `<table0>` WHERE `<table0>`.`<table0>`healthsystemstayid IN ( SELECT `<table0>`.`<table0>`healthsystemstayid FROM `<table0>` WHERE `<table0>`.uniquepid = '035-9193' ) ) AND `<table2>... | hey what was the last calcium of patient 035-9193 until 04/2101? |
<table0>[table_name_72] { <col0>[competition]:[VARCHAR] <col1>[date]:[VARCHAR] <col2>[venue]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "january 11, 1996" AND `<col2>` = "san diego , united states" | What is Competition, when Date is "January 11, 1996", when Venue is "San Diego , United States"? |
<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 `<table6>`.`<table6>`time FROM `<table6>` WHERE `<table6>`.`<table5>`unitstayid IN ( SELECT `<table5>`.`<table5>`unitstayid FROM `<table5>` WHERE `<table5>`.`<table5>`healthsystemstayid IN ( SELECT `<table5>`.`<table5>`healthsystemstayid FROM `<table5>` WHERE `<table5>`.uniquepid = '030-34260' ) ) AND `<table6>`... | when did patient 030-34260 the last time had voided amount output yesterday? |
<table0>[table_name_30] { <col0>[language_rebroadcast]:[VARCHAR] <col1>[branding]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "cbc radio one" | what is the language/rebroadcast for cbc radio one? |
<table0>[Financial_Transactions] { <col0>[transaction_id]:[INTEGER] <col1>[account_id]:[INTEGER] <col2>[invoice_number]:[INTEGER] <col3>[transaction_type]:[VARCHAR] <col4>[transaction_date]:[DATETIME] <col5>[transaction_amount]:[DECIMAL] <col6>[transaction_comment]:[VARCHAR] <col7>[255]:[other_transaction_details] <col... | SELECT transaction_type, SUM( `<col5>` ) FROM `<table0>` GROUP BY `<col3>` ORDER BY SUM( `<col5>` ) DESC | Show the transaction types and the total amount of transactions with a bar chart, rank by the y-axis in descending. |
<table0>[table_17417383_6] { <col0>[event]:[VARCHAR] <col1>[athlete]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "Redouane Bouchtouk" | Name the event for redouane bouchtouk |
<table0>[route] { <col0>[train_id]:[int] <col1>[station_id]:[int] } <table1>[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] } <table2>[train] { <col0>[int]:[train_number] <col1... | SELECT local_authority, COUNT( local_authority ) FROM `<table3>` GROUP BY local_authority ORDER BY local_authority | Bar chart of how many local authority from each local authority, and display in asc by the X-axis.
|
<table0>[table_17675675_2] { <col0>[points]:[VARCHAR] <col1>[won]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "9" | What is the total amount of points when the given won is 9? |
<table0>[music_streams] { <col0>[INT]:[user_id] <col1>[INT]:[song_id] <col2>[INT]:[genre] <col3>[VARCHAR]:[date] <col4>[DATE]:[INSERT] } | SELECT genre, SUM( previous_streams ) as total_previous_streams, RANK( ) OVER ( ORDER BY SUM( previous_streams ) DESC ) as genre_rank FROM ( SELECT user_id, genre, date, count( * ) over ( partition by user_id, genre order by date rows between unbounded preceding and 1 preceding ) as previous_streams FROM `<table0>` ) s... | What are the top 2 genres by total previous streams? |
<table0>[faculty] { <col0>[lname]:[VARCHAR] <col1>[rank]:[VARCHAR] } <table1>[Faculty] { <col0>[lname]:[VARCHAR] <col1>[facID]:[VARCHAR] } <table2>[activity] { <col0>[activity_name]:[VARCHAR] } <table3>[Faculty_participates_in] { <col0>[facID]:[VARCHAR] <col1>[actid]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = 'Professor' EXCEPT SELECT DISTINCT T1.lname FROM `<table0>` AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID = T2.facID JOIN activity AS T3 ON T2.actid = T2.actid WHERE T3.activity_name = 'Canoeing' OR T3.activity_name = 'Kayaking' | Find the first names of professors who are not playing Canoeing or Kayaking.
|
<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 DISTINCT flight.flight_id FROM `<table19>` AS AIRPORT_SERVICE_0, `<table19>` AS AIRPORT_SERVICE_1, `<table19>` AS AIRPORT_SERVICE_2, city AS CITY_0, city AS CITY_1, city AS CITY_2, flight, flight_stop WHERE ( CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'SAN FRANCISCO' AND CITY_2.city_co... | i'd like to go from BOSTON to SAN FRANCISCO with a stop in DALLAS |
<table0>[table_204_186] { <col0>[number]:[season] <col1>[text]:[tier] <col2>[number]:[division] <col3>[text]:[place] } | SELECT "place" FROM `<table0>` WHERE "season" < '2007/08' ORDER BY "season" DESC LIMIT 1 | what was the finishing place of the team before the 2007-2008 ? |
<table0>[fare] { <col0>[fare_id]:[int] <col1>[from_airport]:[varchar] <col2>[to_airport]:[varchar] <col3>[fare_basis_code]:[text] <col4>[fare_airline]:[text] <col5>[restriction_code]:[text] <col6>[one_direction_cost]:[int] <col7>[round_trip_cost]:[int] <col8>[round_trip_required]:[varchar] } <table1>[dual_carrier] { <... | SELECT DISTINCT flight.flight_id FROM `<table17>` AS AIRPORT_SERVICE_0, `<table17>` 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 = 'DALLAS' AND date_day.day_number = 22 AND date_day.month_number = 3 AND date_da... | i would like information for flights from BALTIMORE to DALLAS on early tuesday morning
|
<table0>[table_58658] { <col0>[Matches]:[real] <col1>[Wins]:[real] <col2>[Draw]:[real] <col3>[Losses]:[real] } | SELECT MAX( "Wins" ) FROM `<table0>` WHERE "Against" > '165' | How many wins has more than 165 against?
|
<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 `<table3>`.short_title FROM `<table3>` WHERE `<table3>`.subject_id = "3343" | what is diagnoses short title of subject id 3343?
|
<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 ( SELECT `<table8>`.sao2 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 = '002-39753' ) AND NOT `<table0>... | is the sao2 of patient 002-39753 last measured on the first icu visit less than first measured on the first icu visit? |
<table0>[Detention] { <col0>[detention_id]:[INTEGER] <col1>[detention_type_code]:[VARCHAR] <col2>[teacher_id]:[INTEGER] <col3>[datetime_detention_start]:[DATETIME] <col4>[datetime_detention_end]:[DATETIME] <col5>[detention_summary]:[VARCHAR] <col6>[255]:[other_details] <col7>[VARCHAR]:[255] } <table1>[Ref_Incident_Typ... | SELECT date_address_from, COUNT( `<col2>` ) FROM `<table7>` ORDER BY `<col4>` DESC | Visualize a bar chart about the distribution of date_address_from and the amount of date_address_from bin date_address_from by time. |
<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>[prescr... | SELECT COUNT( DISTINCT `<table3>`.subject_id ) FROM `<table3>` INNER JOIN diagnoses ON `<table3>`.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON `<table3>`.hadm_id = prescriptions.hadm_id WHERE diagnoses.short_title = "Hx TIA/stroke w/o resid" AND prescriptions.route = "IV BOLUS" | give me the number of patients whose diagnoses short title is hx tia/stroke w/o resid and drug route is iv bolus? |
<table0>[table_train_2] { <col0>[int]:[gender] <col1>[string]:[pregnancy_or_lactation] <col2>[bool]:[diabetic] <col3>[string]:[electro_systolic_process] <col4>[bool]:[degenerative_pathology] <col5>[bool]:[neurological_disease] <col6>[bool]:[cardiomyopathy] <col7>[bool]:[NOUSE] } | SELECT * FROM `<table0>` WHERE pregnancy_or_lactation = 1 AND gender = 'female' | pregnant or lactating female
|
<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, `<col1>` FROM `<table1>` GROUP BY All_Home, `<col6>` ORDER BY `<col6>` DESC | Return a bar chart about the distribution of ACC_Road and School_ID , and group by attribute All_Home, and rank by the x axis in desc please.
|
<table0>[table_203_502] { <col0>[number]:[team] <col1>[text]:[titles] <col2>[number]:[runner] <col3>[number]:[place] <col4>[number]:[fourth] <col5>[place]:[number] <col6>[years]:[participated] } | SELECT COUNT( "team" ) FROM `<table0>` WHERE "titles" > 1 | how many schools have more than one title ? |
<table0>[users] { <col0>[INT]:[name] } <table1>[workouts] { <col0>[INT]:[user_id] <col1>[INT]:[workout_time] <col2>[TIME]:[INSERT] <col3>[users]:[name] <col4>[VALUES]:[John] <col5>[Doe]:[Jane] <col6>[Smith]:[INSERT] } | SELECT COUNT( DISTINCT `<table0>`.id ) FROM `<table0>` JOIN workouts ON `<table0>`.id = workouts.user_id WHERE workouts.workout_time BETWEEN '07:00:00' AND '10:00:00'; | How many users have workout records between 7:00 AM and 10:00 AM? |
<table0>[table_name_92] { <col0>[wins]:[INTEGER] <col1>[loses]:[VARCHAR] <col2>[draws]:[VARCHAR] } | SELECT AVG( `<col0>` ) FROM `<table0>` WHERE `<col1>` = 2 AND `<col2>` < 0 | What average Wins has Losses 2, and Draws less than 0?
|
<table0>[table_14813] { <col0>[Office]:[text] <col1>[Representative]:[text] <col2>[Party]:[text] <col3>[Residence]:[text] <col4>[Elected]:[text] } | SELECT "Office" FROM `<table0>` WHERE "Party" = 'dem' AND "First Elected" = '1991†' | Which Office has a Party of dem, and a First Elected of 1991 ?
|
<table0>[procedures_icd] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icd9_code]:[text] <col4>[charttime]:[time] } <table1>[diagnoses_icd] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icd9_code]:[text] <col4>[charttime]:[time] } <table2... | SELECT `<table9>`.charttime FROM `<table9>` WHERE `<table9>`.icustay_id IN ( SELECT `<table13>`.icustay_id FROM `<table13>` WHERE `<table13>`.hadm_id IN ( SELECT `<table4>`.hadm_id FROM `<table4>` WHERE `<table4>`.subject_id = 22648 ) ) AND `<table9>`.itemid IN ( SELECT `<table8>`.itemid FROM `<table8>` WHERE `<table8>... | when did patient 22648 first take his/her d5w during a day before?
|
<table0>[university] { <col0>[School_ID]:[int] <col1>[School]:[text] <col2>[Location]:[text] <col3>[Founded]:[real] <col4>[Affiliation]:[text] <col5>[Enrollment]:[real] <col6>[Nickname]:[text] <col7>[Primary_conference]:[text] } <table1>[basketball_match] { <col0>[Team_ID]:[int] <col1>[School_ID]:[int] <col2>[Team_Nam... | SELECT ACC_Regular_Season, `<col0>` FROM `<table1>` | A pie chart shows the proportion of ACC_Regular_Season and Team_ID.
|
<table0>[table_5566] { <col0>[Series]:[text] <col1>[Episode]:[real] <col2>[Netflix]:[text] <col3>[Segment]:[text] <col4>[Segment]:[text] <col5>[Segment]:[text] <col6>[Segment]:[text] } | SELECT "Series Ep." FROM `<table0>` WHERE "Segment C" = 'luxury cars ( part 1 )' | Name the series ep for segment c of luxury cars (part 1)
|
<table0>[campus_job_id] { <col0>[int]:[student_id] <col1>[int]:[location] } <table1>[gsi] { <col0>[course_offering_id]:[int] <col1>[student_id]:[int] } <table2>[student] { <col0>[student_id]:[int] <col1>[lastname]:[varchar] <col2>[firstname]:[varchar] <col3>[program_id]:[int] <col4>[declare_major]:[varchar] <col5>[to... | SELECT DISTINCT course.department, course.name, course.number, `<table7>`.workload, `<table7>`.workload FROM course, `<table7>` WHERE `<table7>`.category LIKE '%ULCS%' AND `<table7>`.course_id = course.course_id AND `<table7>`.workload = ( SELECT MIN( PROGRAM_COURSEalias1.workload ) FROM `<table7>` AS PROGRAM_COURSEali... | What 's the easiest class to take to fulfill the ULCS requirement ?
|
<table0>[people] { <col0>[people_id]:[number] <col1>[name]:[text] <col2>[height]:[number] <col3>[weight]:[number] <col4>[date_of_birth]:[text] } <table1>[entrepreneur] { <col0>[entrepreneur_id]:[number] <col1>[people_id]:[number] <col2>[company]:[text] <col3>[money_requested]:[number] <col4>[investor]:[text] } | SELECT `<col4>` FROM `<table1>` WHERE `<col3>` > 140000 INTERSECT SELECT `<col4>` FROM `<table1>` WHERE `<col3>` < 120000 | What are the investors who have invested in both entrepreneurs who requested more than 140000 and entrepreneurs who requested less than 120000? |
<table0>[CREATE] { <col0>[SCHEMA]:[MarineSpecies] } <table1>[Species] { <col0>[species_id]:[INT] <col1>[species_name]:[VARCHAR] } | SELECT COUNT( * ) FROM MarineSpecies.Species; | How many marine species have been researched in the 'MarineSpecies' schema? |
<table0>[PostFeedback] { <col0>[number]:[PostId] <col1>[number]:[IsAnonymous] <col2>[boolean]:[VoteTypeId] <col3>[number]:[CreationDate] } <table1>[PostLinks] { <col0>[number]:[CreationDate] <col1>[time]:[PostId] <col2>[number]:[RelatedPostId] <col3>[number]:[LinkTypeId] } <table2>[SuggestedEdits] { <col0>[number]:[P... | SELECT num.TagName AS Tag, ROW_NUMBER( ) OVER ( ORDER BY rate.Rate DESC ) AS YearRank, ROW_NUMBER( ) OVER ( ORDER BY num.Num DESC ) AS TotalRank, rate.Rate AS QuestionsIn2013, num.Num AS QuestionsTotal FROM ( SELECT COUNT( PostId ) AS Rate, TagName FROM Tags, PostTags, Posts WHERE Tags.Id = PostTags.TagId AND Posts.I... | Stackoverflow tag popularity - Year 2013. |
<table0>[table_name_84] { <col0>[forfeits]:[VARCHAR] <col1>[wins]:[VARCHAR] <col2>[losses]:[VARCHAR] } | SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` < 8 AND `<col2>` > 16 | How many Forfeits have Wins smaller than 8, and Losses larger than 16?
|
<table0>[movie] { <col0>[director]:[VARCHAR] } | SELECT COUNT( DISTINCT `<col0>` ) FROM `<table0>` | How many movie directors are there? |
<table0>[table_name_40] { <col0>[award]:[VARCHAR] <col1>[producer_s]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE producer_s_ = "andrew ryder" | What award did Andrew Ryder win as producer? |
<table0>[table_name_45] { <col0>[assists]:[VARCHAR] <col1>[pen_min]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "54" | How many assists did the player with 54 penalty minutes have? |
<table0>[financial_capability] { <col0>[client_id]:[INT] <col1>[name]:[TEXT] <col2>[score]:[INT] } | WITH updated_financial_capability AS ( UPDATE financial_capability SET score = 70 WHERE name = 'Sally' ) SELECT SUM( score ) FROM financial_capability; | Show the total financial capability score for clients in the financial capability database before and after updating Sally's score to 70. |
<table0>[table_58680] { <col0>[County]:[text] <col1>[capita]:[income] <col2>[text]:[Median] <col3>[household]:[income] <col4>[text]:[Median] <col5>[family]:[income] <col6>[text]:[Population] <col7>[real]:[Number] <col8>[households]:[real] } | SELECT COUNT( "Number of households" ) FROM `<table0>` WHERE "Population" > '25,692' AND "Median `<col3>` income" = '$51,914' | What is the total number of households with a population larger than 25,692 and a median household income of $51,914?
|
<table0>[diagnoses_icd] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icd9_code]:[text] <col4>[charttime]:[time] } <table1>[admissions] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[admittime]:[time] <col4>[dischtime]:[time] <col5>[admissi... | SELECT 1 * ( STRFTIME( '%j', CURRENT_TIME( ) ) - STRFTIME( '%j', `<table3>`.charttime ) ) FROM `<table3>` WHERE `<table3>`.itemid IN ( SELECT `<table12>`.itemid FROM `<table12>` WHERE `<table12>`.label = 'ptt' ) AND `<table3>`.hadm_id IN ( SELECT `<table1>`.hadm_id FROM `<table1>` WHERE `<table1>`.subject_id = 92788 AN... | what number of days have elapsed since the first time patient 92788 received a ptt lab test on the current hospital encounter? |
<table0>[SuggestedEditVotes] { <col0>[number]:[SuggestedEditId] <col1>[number]:[UserId] <col2>[number]:[VoteTypeId] <col3>[number]:[CreationDate] <col4>[time]:[TargetUserId] <col5>[number]:[TargetRepChange] } <table1>[PostLinks] { <col0>[number]:[CreationDate] <col1>[time]:[PostId] <col2>[number]:[RelatedPostId] <col3... | SELECT TagName, COUNT( * ) AS TotalQuestions, SUM( CASE WHEN NOT AcceptedAnswerId IS NULL THEN 1 ELSE 0 END ) AS AnsweredQuestions, ROUND( 100 * CAST( SUM( CASE WHEN NOT AcceptedAnswerId IS NULL THEN 1 ELSE 0 END ) AS FLOAT ) / COUNT( * ), 2 ) AS PercentageAnswered FROM `<table9>` INNER JOIN Posts ON `<table9>`.PostId ... | Most answered things in Stack. |
<table0>[CustomerSizes] { <col0>[CustomerID]:[INT] <col1>[Size]:[TEXT] } | DELETE FROM `<table0>` WHERE `<col1>` NOT IN ( 'XS', 'S', 'M' ); | Delete size records for customers not fitting standard sizes |
<table0>[table_14603212_5] { <col0>[school_year]:[VARCHAR] <col1>[class_aAAA]:[VARCHAR] <col2>[Gregory]:[VARCHAR] <col3>[Portland]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = `<col2>` - `<col3>` | What are all the school years where class AAAA is in Gregory-Portland?
|
<table0>[table_1167698_1] { <col0>[champion]:[VARCHAR] <col1>[season]:[VARCHAR] } | SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "2009" | How many champions were there in 2009? |
<table0>[Staff] { <col0>[Staff_ID]:[INTEGER] <col1>[Staff_Details]:[VARCHAR] } <table1>[Customers] { <col0>[Customer_ID]:[INTEGER] <col1>[Customer_Details]:[VARCHAR] } <table2>[Claim_Headers] { <col0>[Claim_Header_ID]:[INTEGER] <col1>[Claim_Status_Code]:[CHAR] <col2>[Claim_Type_Code]:[CHAR] <col3>[Policy_ID]:[INTEGER... | SELECT Policy_Type_Code, COUNT( * ) FROM `<table6>` GROUP BY `<col2>` ORDER BY COUNT( * ) | Bar chart x axis policy type code y axis the total number, could you list the total number from low to high order please?
|
<table0>[table_14338] { <col0>[Club]:[text] <col1>[Visa]:[text] <col2>[Visa]:[text] <col3>[Visa]:[text] <col4>[Visa]:[text] <col5>[Visa]:[text] } | SELECT "Visa 5" FROM `<table0>` WHERE "Visa 1" = 'emile heskey' | Which Visa 5 has a Visa 1 of emile heskey?
|
<table0>[ReviewTaskResults] { <col0>[number]:[ReviewTaskId] <col1>[number]:[ReviewTaskResultTypeId] <col2>[number]:[CreationDate] <col3>[time]:[RejectionReasonId] <col4>[number]:[Comment] } <table1>[ReviewTaskTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table2>[Votes] { <col0>[number]:[PostId] <col1>[... | SELECT COUNT( `<table2>`.PostId ) AS "downvote_count", `<table2>`.PostId AS "post_link" FROM `<table2>` INNER JOIN Posts ON Posts.Id = `<table2>`.PostId WHERE PostTypeId = 1 AND Posts.Tags LIKE '%ruby%' AND VoteTypeId = 3 GROUP BY PostId ORDER BY 'downvote_count' DESC LIMIT 5 | Select by (one) Tags. |
<table0>[microlab] { <col0>[microlabid]:[number] <col1>[patientunitstayid]:[number] <col2>[culturesite]:[text] <col3>[organism]:[text] <col4>[culturetakentime]:[time] } <table1>[cost] { <col0>[costid]:[number] <col1>[uniquepid]:[text] <col2>[patienthealthsystemstayid]:[number] <col3>[eventtype]:[text] <col4>[eventid]:... | SELECT COUNT( DISTINCT `<table9>`.uniquepid ) FROM `<table9>` WHERE `<table9>`.`<table9>`unitstayid IN ( SELECT `<table0>`.`<table9>`unitstayid FROM `<table0>` WHERE `<table0>`.culturesite = 'blood, venipuncture' ) | count the number of patients who had received a blood, venipuncture microbiology test. |
<table0>[wastewater_facilities] { <col0>[INT]:[PRIMARY] <col1>[KEY]:[name] <col2>[VARCHAR]:[facility_type] <col3>[VARCHAR]:[region] <col4>[VARCHAR]:[capacity_bod] <col5>[INT]:[operational_status] } | INSERT INTO wastewater_facilities ( name, facility_type, region, capacity_bod, operational_status ) VALUES ( 'Facility D', 'Sludge Treatment Plant', 'Northwest', 400000, 'Operational' ); | Add a new wastewater facility 'Facility D' with type 'Sludge Treatment Plant' in the 'Northwest' region having a capacity of 400000 BOD |
<table0>[daily_mine_gold_production] { <col0>[mine_id]:[INT] <col1>[production_date]:[DATE] <col2>[gold_production]:[FLOAT] } | SELECT mine_id, production_date, gold_production, LAG( `<col2>` ) OVER ( PARTITION BY `<col0>` ORDER BY `<col1>` ) as prev_day_production, `<col2>` - LAG( `<col2>` ) OVER ( PARTITION BY `<col0>` ORDER BY `<col1>` ) as production_change FROM `<table0>` WHERE `<col2>` > 1.2 * LAG( `<col2>` ) OVER ( PARTITION BY `<col0>` ... | Identify mines with a significant increase in gold production compared to the previous day. |
<table0>[EsportsData] { <col0>[PlayerID]:[INT] <col1>[EventID]:[INT] } | SELECT COUNT( DISTINCT `<col0>` ) FROM `<table0>` | What is the total number of players who have participated in esports events? |
<table0>[Tags] { <col0>[number]:[TagName] <col1>[text]:[Count] <col2>[number]:[ExcerptPostId] <col3>[number]:[WikiPostId] } <table1>[Posts] { <col0>[number]:[PostTypeId] <col1>[number]:[AcceptedAnswerId] <col2>[number]:[ParentId] <col3>[number]:[CreationDate] <col4>[time]:[DeletionDate] <col5>[time]:[Score] <col6>[num... | SELECT u.Id AS "user_link", COUNT( p.Id ) AS Questions FROM `<table1>` AS p JOIN Users AS u ON u.Id = p.OwnerUserId WHERE p.PostTypeId = 1 AND p.ViewCount >= 2500 GROUP BY u.Id ORDER BY COUNT( p.Id ) DESC | Get All Notable Questions group by user.
|
<table0>[treatment] { <col0>[treatmentid]:[number] <col1>[patientunitstayid]:[number] <col2>[treatmentname]:[text] <col3>[treatmenttime]:[time] } <table1>[diagnosis] { <col0>[diagnosisid]:[number] <col1>[patientunitstayid]:[number] <col2>[diagnosisname]:[text] <col3>[diagnosistime]:[time] <col4>[icd9code]:[text] } <t... | SELECT DISTINCT `<table7>`.`<table7>` FROM `<table7>` WHERE `<table7>`.eventtype = '`<table1>`' AND `<table7>`.eventid IN ( SELECT `<table1>`.`<table1>`id FROM `<table1>` WHERE `<table1>`.`<table1>`name = 's/p maze procedure' ) | what is the diagnostic cost in s/p maze procedure? |
<table0>[table_dev_18] { <col0>[int]:[bleeding] <col1>[int]:[chronic_anticoagulant_therapy] <col2>[bool]:[renal_disease] <col3>[bool]:[hyperlipidemia] <col4>[bool]:[creatinine_clearance_cl] <col5>[float]:[chronic_hemostasis_disorders] <col6>[bool]:[significant_proteinuria] <col7>[bool]:[platelet_count] <col8>[float]:[t... | SELECT * FROM `<table0>` WHERE hyperlipidemia = 1 OR ( total_cholesterol > 260 OR ldl > 130 OR triglyceride_tg > 300 ) | hyperlipidemia ( total cholesterol > 260 mg / dl, ldl > 130 mg / dl, and / or triglycerides > 300 mg / dl ) despite appropriate treatment.
|
<table0>[table_name_19] { <col0>[INTEGER]:[wins] <col1>[VARCHAR]:[losses] } | SELECT SUM( against ) FROM `<table0>` WHERE wins > 8 AND losses > 6 | What is the sum of Against, when Wins is greater than 8, and when Losses is greater than 6? |
<table0>[table_204_428] { <col0>[number]:[season] <col1>[text]:[east] <col2>[superleague]:[text] <col3>[east]:[premier] <col4>[league]:[text] <col5>[east]:[region] <col6>[south]:[division] <col7>[text]:[east] <col8>[region]:[central] <col9>[division]:[text] <col10>[east]:[region] <col11>[north]:[division] } | SELECT "east `<col8>` `<col6>` division" FROM `<table0>` WHERE "east `<col8>` `<col6>` division" IN ( 'fauldhouse united', 'newtongrange star' ) GROUP BY "east `<col8>` `<col6>` division" ORDER BY COUNT( * ) DESC LIMIT 1 | which team has made the roll of honor more times in the east region south division : fauldhouse united or newtongrange star ?
|
<table0>[medication] { <col0>[medicationid]:[number] <col1>[patientunitstayid]:[number] <col2>[drugname]:[text] <col3>[dosage]:[text] <col4>[routeadmin]:[text] <col5>[drugstarttime]:[time] <col6>[drugstoptime]:[time] } <table1>[intakeoutput] { <col0>[intakeoutputid]:[number] <col1>[patientunitstayid]:[number] <col2>[c... | SELECT t3.drugname FROM ( SELECT t2.drugname, DENSE_RANK( ) OVER ( ORDER BY COUNT( * ) DESC ) AS c1 FROM ( SELECT patient.uniquepid, `<table7>`.`<table7>`time FROM `<table7>` JOIN patient ON `<table7>`.patientunitstayid = patient.patientunitstayid WHERE `<table7>`.`<table7>`name = 'fever' AND DATETIME( `<table7>`.`<tab... | what are the five most frequently prescribed medicines that patients are prescribed with within 2 months after being diagnosed with fever in this year? |
<table0>[table_142573_1] { <col0>[channels]:[VARCHAR] <col1>[designation]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "PC700" | Name the channels when designation is pc700 |
<table0>[table_17201869_3] { <col0>[replaced_by]:[VARCHAR] <col1>[outgoing_manager]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "José Ángel Ziganda" | Who replaced outgoing manager Jos ngel Ziganda?
|
<table0>[climate_finance] { <col0>[year]:[INT] <col1>[region]:[VARCHAR] <col2>[funding_type]:[VARCHAR] <col3>[INT]:[INSERT] } | SELECT SUM( amount ) FROM `<table0>` WHERE `<col1>` = 'Latin America' AND `<col2>` = 'climate adaptation'; | What is the total funding allocated for climate adaptation projects in Latin America and the Caribbean? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.