schema stringlengths 20 14.6k | query stringlengths 17 2.58k | question stringlengths 8 1.06k |
|---|---|---|
<table0>[lab] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[itemid]:[text] <col3>[charttime]:[text] <col4>[flag]:[text] <col5>[value_unit]:[text] <col6>[label]:[text] <col7>[fluid]:[text] } <table1>[demographic] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[name]:[text] <col3>[marital_status]:[... | SELECT COUNT( DISTINCT `<table1>`.subject_id ) FROM `<table1>` INNER JOIN prescriptions ON `<table1>`.hadm_id = prescriptions.hadm_id WHERE `<table1>`.ethnicity = "WHITE - RUSSIAN" AND prescriptions.drug_type = "ADDITIVE" | How many white russian patients have the drug type additive?
|
<table0>[table_name_88] { <col0>[artist]:[VARCHAR] <col1>[draw]:[INTEGER] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` < 2 | What is the artist with less than a 2 draw? |
<table0>[table_name_43] { <col0>[year_joined]:[INTEGER] <col1>[county]:[VARCHAR] } | SELECT AVG( `<col0>` ) FROM `<table0>` WHERE `<col1>` = 277 | What is the average year joined of the 277 county? |
<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 Name, COUNT( Name ) FROM `<table1>` WHERE `<col2>` <= 200 GROUP BY Name ORDER BY Name | What are the names of products with price at most 200, and count them by a bar chart, display by the Name in ascending. |
<table0>[Mediators] { <col0>[MediatorID]:[INT] <col1>[VARCHAR]:[Age] <col2>[INT]:[Experience] <col3>[INT]:[Ethnicity] } <table1>[Cases] { <col0>[CaseID]:[INT] <col1>[MediatorID]:[INT] <col2>[Date]:[DATE] <col3>[INSERT]:[Mediators] <col4>[MediatorID]:[Age] <col5>[Experience]:[Ethnicity] <col6>[VALUES]:[Juan] <col7>[Gar... | SELECT MediatorID, Name, RANK( ) OVER ( ORDER BY COUNT( * ) DESC, Age, Ethnicity ) as Rank FROM `<table0>` JOIN Cases ON `<table0>`.MediatorID = Cases.MediatorID GROUP BY MediatorID, Name; | What is the rank of each mediator based on the number of cases handled, with ties broken by age and ethnicity? |
<table0>[countries] { <col0>[COUNTRY_ID]:[varchar] <col1>[COUNTRY_NAME]:[varchar] <col2>[REGION_ID]:[decimal] } <table1>[job_history] { <col0>[EMPLOYEE_ID]:[decimal] <col1>[START_DATE]:[date] <col2>[END_DATE]:[date] <col3>[JOB_ID]:[varchar] <col4>[DEPARTMENT_ID]:[decimal] } <table2>[employees] { <col0>[EMPLOYEE_ID]:[... | SELECT HIRE_DATE, AVG( `<col7>` ) FROM `<table2>` WHERE `<col7>` BETWEEN 8000 AND 12000 AND `<col8>` <> "null" OR `<col10>` <> 40 ORDER BY AVG( `<col7>` ) DESC | For those employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40, find hire_date and the average of salary bin hire_date by time, and visualize them by a bar chart, order in desc by the y axis.
|
<table0>[d_icd_procedures] { <col0>[row_id]:[number] <col1>[icd9_code]:[text] <col2>[short_title]:[text] <col3>[long_title]:[text] } <table1>[admissions] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[admittime]:[time] <col4>[dischtime]:[time] <col5>[admission_type]:[text] <col6>... | SELECT `<table0>`.short_title FROM `<table0>` WHERE `<table0>`.icd9_code IN ( SELECT t1.icd9_code FROM ( SELECT `<table11>`.icd9_code, DENSE_RANK( ) OVER ( ORDER BY COUNT( * ) DESC ) AS c1 FROM `<table11>` WHERE DATETIME( `<table11>`.charttime, 'start of year' ) = DATETIME( CURRENT_TIME( ), 'start of year', '-1 year' )... | what are the procedures that are the top four most commonly received during the last year?
|
<table0>[inputevents_cv] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[charttime]:[time] <col5>[itemid]:[number] } <table1>[outputevents] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>... | SELECT COUNT( * ) > 0 FROM `<table14>` WHERE `<table14>`.hadm_id IN ( SELECT `<table8>`.hadm_id FROM `<table8>` WHERE `<table8>`.subject_id = 7241 ) AND `<table14>`.drug = 'entacapone' AND DATETIME( `<table14>`.startdate ) <= DATETIME( CURRENT_TIME( ), '-95 month' ) | have entacapone ever been prescribed to patient 7241 until 95 months ago? |
<table0>[farmers] { <col0>[farmer_id]:[INT] <col1>[farmer_name]:[VARCHAR] <col2>[crop_yield]:[INT] } | SELECT farmer_name, AVG( crop_yield ) OVER ( PARTITION BY farmer_id ORDER BY crop_yield DESC ) AS avg_yield FROM farmers; | What is the average yield of crops for each farmer, ordered by yield? |
<table0>[labevents] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[itemid]:[number] <col4>[charttime]:[time] <col5>[valuenum]:[number] <col6>[valueuom]:[text] } <table1>[inputevents_cv] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_... | SELECT `<table11>`.subject_id FROM `<table11>` WHERE `<table11>`.hadm_id IN ( SELECT `<table3>`.hadm_id FROM `<table3>` WHERE `<table3>`.icd9_code = ( SELECT `<table2>`.icd9_code FROM `<table2>` WHERE `<table2>`.short_title = 'abn react-urinary cath' ) AND DATETIME( `<table3>`.charttime, 'start of year' ) = DATETIME( C... | retrieve patient ids of patients who are diagnosed with abn react-urinary cath in this year. |
<table0>[table_name_48] { <col0>[height]:[VARCHAR] <col1>[club]:[VARCHAR] <col2>[name]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "sainte-foy" AND `<col2>` = "valérie dionne" | What is the height of valérie dionne at Club Sainte-Foy? |
<table0>[personfriend] { <col0>[name]:[text] <col1>[friend]:[text] <col2>[year]:[number] } <table1>[person] { <col0>[name]:[text] <col1>[age]:[number] <col2>[city]:[text] <col3>[gender]:[text] <col4>[job]:[text] } | SELECT T1.age FROM `<table1>` AS T1 JOIN `<table1>`friend AS T2 ON T1.name = T2.friend WHERE T2.name = 'Zach' AND T2.year = ( SELECT MAX( `<col2>` ) FROM `<table1>`friend WHERE `<col0>` = 'Zach' ) | What are the ages of all of Zach's friends who are in the longest relationship? |
<table0>[departments] { <col0>[DEPARTMENT_ID]:[decimal] <col1>[DEPARTMENT_NAME]:[varchar] <col2>[MANAGER_ID]:[decimal] <col3>[LOCATION_ID]:[decimal] } <table1>[regions] { <col0>[REGION_ID]:[decimal] <col1>[REGION_NAME]:[varchar] } <table2>[locations] { <col0>[LOCATION_ID]:[decimal] <col1>[STREET_ADDRESS]:[varchar] <c... | SELECT HIRE_DATE, AVG( `<col7>` ) FROM `<table3>` WHERE `<col5>` < '2002-06-21' ORDER BY AVG( `<col7>` ) | For those employees who was hired before 2002-06-21, return a bar chart about the distribution of hire_date and the average of salary bin hire_date by weekday, and list in ascending by the mean salary. |
<table0>[t_kc21_t_kc22] { <col0>[MED_CLINIC_ID]:[text] <col1>[MED_EXP_DET_ID]:[number] } <table1>[t_kc24] { <col0>[ACCOUNT_DASH_DATE]:[time] <col1>[ACCOUNT_DASH_FLG]:[number] <col2>[CASH_PAY]:[number] <col3>[CIVIL_SUBSIDY]:[number] <col4>[CKC102]:[number] <col5>[CLINIC_ID]:[text] <col6>[CLINIC_SLT_DATE]:[time] <col7>[... | SELECT `<table3>`.MED_CLINIC_ID FROM `<table3>` WHERE `<table3>`.PERSON_ID = '80740257' AND `<table3>`.MED_SER_ORG_NO = '2849878' AND NOT `<table3>`.IN_DIAG_DIS_NM LIKE '%合并%' | 在医院2849878入院诊断疾病名称不含有合并的患者80740257医疗就诊记录号码是什么?
|
<table0>[policyholder] { <col0>[policyholder_id]:[INT] <col1>[name]:[VARCHAR] <col2>[age]:[INT] <col3>[gender]:[VARCHAR] <col4>[zip_code]:[INT] <col5>[policy_number]:[INT] <col6>[policy_type]:[VARCHAR] } <table1>[policy] { <col0>[policy_id]:[INT] <col1>[policy_number]:[INT] <col2>[issue_date]:[DATE] <col3>[risk_score]... | SELECT `<table0>`.name, `<table0>`.age, `<table0>`.policy_type FROM `<table0>` JOIN policy ON `<table0>`.policy_number = policy.policy_number JOIN claim ON policy.policy_id = claim.policy_id WHERE claim_date >= DATEADD( WEEK, -1, GETDATE( ) ) AND policy.risk_score > 600; | What is the name, age, and policy type of policyholders who have filed a claim in the last week and have a risk score over 600? |
<table0>[table_name_59] { <col0>[visitor]:[VARCHAR] <col1>[date]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "march 16" | Who is the Visitor on march 16? |
<table0>[lab] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[itemid]:[text] <col3>[charttime]:[text] <col4>[flag]:[text] <col5>[value_unit]:[text] <col6>[label]:[text] <col7>[fluid]:[text] } <table1>[prescriptions] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icustay_id]:[text] <col3>[drug_type... | SELECT MIN( `<table3>`.age ) FROM `<table3>` WHERE `<table3>`.gender = "M" AND `<table3>`.diagnosis = "CHEST PAIN" | what is minimum age of patients whose gender is m and primary disease is chest pain? |
<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 MAX( `<table3>`.days_stay ) FROM `<table3>` WHERE `<table3>`.diagnosis = "OVERDOSE" | what is maximum days of hospital stay of patients whose primary disease is overdose?
|
<table0>[CREATE] { <col0>[SCHEMA]:[trans] <col1>[schemas]:[trans] } <table1>[bus_fares] { <col0>[bus_number]:[INT] <col1>[fare]:[FLOAT] <col2>[fare_date]:[DATE] } | SELECT SUM( `<col1>` ) FROM `<table1>` WHERE `<col0>` = 3001 AND `<col2>` BETWEEN '2021-05-25' AND '2021-05-31'; | What was the total fare collected for bus 3001 in the last week of May 2021? |
<table0>[exhibition] { <col0>[theme]:[VARCHAR] <col1>[YEAR]:[VARCHAR] <col2>[ticket_price]:[INTEGER] } | SELECT theme, `<col1>` FROM `<table0>` WHERE `<col2>` < 15 | Show theme and year for all exhibitions with ticket prices lower than 15. |
<table0>[table_204_125] { <col0>[number]:[state] <col1>[text]:[type] <col2>[text]:[name] <col3>[text]:[title] <col4>[text]:[royal] <col5>[house]:[text] <col6>[text]:[text] } | SELECT "name" FROM `<table0>` WHERE "name" IN ( 'zhao', 'zhaoxiang' ) ORDER BY "from" - "to" DESC LIMIT 1 | who ruled longer , zhao or zhaoxiang ? |
<table0>[View_Unit_Status] { <col0>[apt_id]:[INTEGER] <col1>[apt_booking_id]:[INTEGER] <col2>[status_date]:[DATETIME] <col3>[available_yn]:[BIT] } <table1>[Apartments] { <col0>[apt_id]:[INTEGER] <col1>[building_id]:[INTEGER] <col2>[apt_type_code]:[CHAR] <col3>[apt_number]:[CHAR] <col4>[bathroom_count]:[INTEGER] <col5>... | SELECT apt_type_code, COUNT( * ) FROM `<table1>` GROUP BY `<col2>` ORDER BY COUNT( * ) | Return each apartment type code with the number of apartments having that apartment type, in ascending order of the number of apartments. Plot them as bar chart.
|
<table0>[semester] { <col0>[semester_id]:[int] } <table1>[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>[thur... | SELECT DISTINCT COURSE_0.department, COURSE_0.name, COURSE_0.number FROM `<table11>` AS COURSE_0, `<table11>` AS COURSE_1, `<table11>`_prerequisite WHERE COURSE_0.`<table11>`_id = `<table11>`_prerequisite.pre_`<table11>`_id AND NOT COURSE_0.`<table11>`_id IN ( SELECT STUDENT_RECORDalias0.`<table11>`_id FROM `<table17>`... | Is there a prerequisite class before I can do HBEHED 627 ?
|
<table0>[Drama_Workshop_Groups] { <col0>[Workshop_Group_ID]:[INTEGER] <col1>[Address_ID]:[INTEGER] <col2>[Currency_Code]:[CHAR] <col3>[Marketing_Region_Code]:[CHAR] <col4>[Store_Name]:[VARCHAR] <col5>[255]:[Store_Phone] <col6>[VARCHAR]:[255] <col7>[Store_Email_Address]:[VARCHAR] <col8>[255]:[Other_Details] <col9>[VARCH... | SELECT Order_Date, COUNT( Order_Date ) FROM `<table8>` | List the order dates of all the bookings, and count them by a bar chart
|
<table0>[table_name_30] { <col0>[game]:[VARCHAR] <col1>[points]:[VARCHAR] <col2>[record]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` < 96 AND `<col2>` = "43–16–8" | Points smaller than 96, and a Record of 43–16–8 belongs to what game? |
<table0>[All_Documents] { <col0>[Document_ID]:[INTEGER] <col1>[Date_Stored]:[DATETIME] <col2>[Document_Type_Code]:[CHAR] <col3>[Document_Name]:[CHAR] <col4>[255]:[Document_Description] <col5>[CHAR]:[255] <col6>[Other_Details]:[VARCHAR] } <table1>[Roles] { <col0>[Role_Code]:[CHAR] <col1>[Role_Name]:[VARCHAR] <col2>[255... | SELECT Calendar_Date, COUNT( `<col0>` ) FROM `<table2>` | Bar chart x axis calendar date y axis the number of calendar date
|
<table0>[faculty] { <col0>[INT]:[name] <col1>[VARCHAR]:[255] <col2>[gender]:[VARCHAR] <col3>[papers]:[INT] } | SELECT COUNT( * ) FROM `<table0>` WHERE `<col2>` IN ( 'Female', 'Non-binary' ) HAVING `<col3>` > 5; | What is the total number of non-binary and female faculty members in the 'faculty' table, who have published more than 5 papers? |
<table0>[station] { <col0>[INTEGER]:[name] <col1>[TEXT]:[lat] <col2>[NUMERIC]:[long] <col3>[NUMERIC]:[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>... | SELECT name, id FROM `<table0>` AS T1 JOIN status AS T2 ON T1.id = T2.`<table0>`_id WHERE T2.bikes_available > 12 | What are the id and name of the stations that have ever had more than 12 bikes available? Plot them as a bar chart. |
<table0>[green_buildings] { <col0>[INT]:[name] <col1>[VARCHAR]:[energy_consumption] <col2>[INT]:[INSERT] } | SELECT * FROM `<table0>` ORDER BY energy_consumption DESC; | List all green building projects and their energy consumption in descending order |
<table0>[table_25800134_12] { <col0>[director]:[VARCHAR] <col1>[airdate]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "February 19, 1968" | Who directed the episode that aired on February 19, 1968? |
<table0>[table_15013825_8] { <col0>[team]:[VARCHAR] <col1>[copa_conmebol_1992]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "Round of 16" | Name the team for copa conmebol 1992 is round of 16
|
<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 COUNT( DISTINCT `<table3>`.subject_id ) FROM `<table3>` INNER JOIN diagnoses ON `<table3>`.hadm_id = diagnoses.hadm_id INNER JOIN lab ON `<table3>`.hadm_id = lab.hadm_id WHERE diagnoses.short_title = "Stomach ulcer NOS" AND lab."CATEGORY" = "Blood Gas" | what is the number of patients whose diagnoses short title is stomach ulcer nos and lab test category is blood gas? |
<table0>[climate_adaptation] { <col0>[project]:[VARCHAR] <col1>[region]:[VARCHAR] <col2>[co2_reduction]:[FLOAT] <col3>[start_year]:[INT] } | SELECT project, region, co2_reduction, `<col3>` FROM `<table0>` WHERE `<col1>` = 'South America' ORDER BY `<col2>` ASC; | Which climate adaptation projects in South America have the lowest CO2 emission reduction, and when were they initiated? |
<table0>[fare_basis] { <col0>[fare_basis_code]:[text] <col1>[booking_class]:[text] <col2>[class_type]:[text] <col3>[premium]:[text] <col4>[economy]:[text] <col5>[discounted]:[text] <col6>[night]:[text] <col7>[season]:[text] <col8>[basis_days]:[text] } <table1>[flight_leg] { <col0>[flight_id]:[int] <col1>[leg_number]:[... | SELECT DISTINCT FLIGHT_0.arrival_time, FLIGHT_0.departure_time FROM `<table5>` AS AIRPORT_SERVICE_0, `<table5>` AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, flight AS FLIGHT_0, flight AS FLIGHT_1, flight_leg WHERE ( CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BOSTON' ... | i would like a schedule of flights from SAN FRANCISCO to BOSTON on wednesday
|
<table0>[table_66527] { <col0>[Airing]:[date] <col1>[text]:[English] <col2>[title]:[Chinese] <col3>[title]:[text] <col4>[Number]:[episodes] <col5>[real]:[Theme] <col6>[song]:[Sub] <col7>[theme]:[song] <col8>[text]:[Genre] } | SELECT "Airing date" FROM `<table0>` WHERE "Number of episodes" > '20' AND "Genre" = 'modern drama' | Which Airing date has a Number of episodes larger than 20, and a Genre of modern drama?
|
<table0>[table_203_742] { <col0>[number]:[rnd] <col1>[number]:[date] <col2>[text]:[race] <col3>[name]:[text] <col4>[circuit]:[text] <col5>[city]:[location] <col6>[text]:[pole] <col7>[position]:[text] <col8>[fastest]:[lap] <col9>[text]:[winning] <col10>[driver]:[text] <col11>[winning]:[team] <col12>[text]:[report] } | SELECT "city/location" FROM `<table0>` ORDER BY "date" LIMIT 1 | in what city was the first race ?
|
<table0>[table_6964] { <col0>[Date]:[text] <col1>[Time]:[text] <col2>[Home]:[text] <col3>[Away]:[text] <col4>[Score]:[text] <col5>[Ground]:[text] } | SELECT "Time" FROM `<table0>` WHERE "Score" = '46-82' | What is the Time with a Score that is 46-82?
|
<table0>[table_2560677_1] { <col0>[fan_title]:[VARCHAR] <col1>[end_date]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "1967-11-12" | What is the fan title with an end date of 1967-11-12? |
<table0>[recycling_program] { <col0>[INT]:[PRIMARY] <col1>[KEY]:[facility] <col2>[VARCHAR]:[255] <col3>[region]:[VARCHAR] <col4>[255]:[participation_rate] <col5>[INT]:[INSERT] } | UPDATE recycling_program SET participation_rate = 60 WHERE region = 'North America'; | Update the recycling_program table to set participation_rate to 60 for all records with region as 'North America' |
<table0>[production] { <col0>[INT]:[well_name] <col1>[VARCHAR]:[year] <col2>[INT]:[production_volume] <col3>[INT]:[INSERT] } | SELECT `<table0>`_volume FROM `<table0>` WHERE well_name = 'Well X' AND year = 2019; | Identify the production figures for Well X in 2019 |
<table0>[CBSA] { } <table1>[state] { <col0>[abbreviation]:[text] <col1>[name]:[text] } <table2>[congress] { <col0>[cognress_rep_id]:[text] <col1>[first_name]:[text] <col2>[last_name]:[text] <col3>[CID]:[text] <col4>[party]:[text] <col5>[state]:[text] <col6>[abbreviation]:[text] <col7>[House]:[text] <col8>[District]:[... | SELECT T2.county FROM `<table1>` AS T1 INNER JOIN country AS T2 ON T1.abbreviation = T2.`<table1>` INNER JOIN zip_data AS T3 ON T2.zip_code = T3.zip_code WHERE T3.city = 'Dalton' GROUP BY T2.county | What is the country and state of the city named Dalton? |
<table0>[table_881] { <col0>[Position]:[real] <col1>[Artist]:[text] <col2>[Song]:[title] <col3>[text]:[Highest] <col4>[position]:[real] <col5>[Points]:[real] } | SELECT COUNT( "Artist" ) FROM `<table0>` WHERE "Song title" = ' Save the Last Dance for Me ' | how many artbeingt with song title being ' save the last dance for me
|
<table0>[table_26368963_2] { <col0>[under_11]:[VARCHAR] <col1>[under_17]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "Salma Nassar" | What is every value for Under-11 when value of under-17 is Salma Nassar?
|
<table0>[table_9854] { <col0>[Date]:[text] <col1>[Tournament]:[text] <col2>[Surface]:[text] <col3>[Opponent]:[final] <col4>[text]:[Score] } | SELECT "Date" FROM `<table0>` WHERE "Tournament" = 'prijedor' | When was the Prijedor tournament?
|
<table0>[VisitorsAndSites] { <col0>[INT]:[site_name] <col1>[VARCHAR]:[255] <col2>[continent]:[VARCHAR] <col3>[255]:[visitors] <col4>[INT]:[INSERT] } | SELECT continent, COUNT( * ), SUM( visitors ) FROM `<table0>` GROUP BY continent; | What is the total number of visitors and the number of heritage sites in each continent? |
<table0>[Warehouse] { <col0>[INT]:[location] <col1>[VARCHAR]:[255] <col2>[capacity]:[INT] } <table1>[Shipment] { <col0>[INT]:[warehouse_id] <col1>[INT]:[delivery_time] <col2>[INT]:[INSERT] } | SELECT warehouse_id, COUNT( * ) as num_shipments, AVG( delivery_time ) as avg_delivery_time, RANK( ) OVER ( ORDER BY AVG( delivery_time ) DESC ) as rank FROM `<table1>` GROUP BY warehouse_id HAVING rank <= 2; | Find the number of shipments and total delivery time for each warehouse, ordered by the average delivery time? |
<table0>[offices] { <col0>[officeCode]:[text] <col1>[city]:[text] <col2>[phone]:[text] <col3>[addressLine1]:[text] <col4>[addressLine2]:[text] <col5>[state]:[text] <col6>[country]:[text] <col7>[postalCode]:[text] <col8>[territory]:[text] } <table1>[employees] { <col0>[employeeNumber]:[integer] <col1>[lastName]:[text] ... | SELECT DISTINCT T2.country, T2.addressLine1, T2.addressLine2 FROM `<table4>` AS T1 INNER JOIN customers AS T2 ON T1.customerNumber = T2.customerNumber ORDER BY T1.amount DESC LIMIT 5 | Which countries do the top 5 highest paying customers in a single payment come from? Indicate their entire address. |
<table0>[Timed_Status_of_Things] { <col0>[thing_id]:[INTEGER] <col1>[Date_and_Date]:[DATETIME] <col2>[Status_of_Thing_Code]:[CHAR] } <table1>[Residents] { <col0>[resident_id]:[INTEGER] <col1>[property_id]:[INTEGER] <col2>[date_moved_in]:[DATETIME] <col3>[date_moved_out]:[DATETIME] <col4>[other_details]:[VARCHAR] } <t... | SELECT date_moved_in, COUNT( `<col2>` ) FROM `<table1>` | A bar chart for what are the number of the distinct move in dates of the residents? |
<table0>[athletes] { <col0>[athlete_id]:[INT] <col1>[name]:[VARCHAR] <col2>[team]:[VARCHAR] } <table1>[wellbeing_programs] { <col0>[program_id]:[INT] <col1>[athlete_id]:[INT] <col2>[program_name]:[VARCHAR] } | SELECT `<table0>`.name, wellbeing_programs.program_name FROM `<table0>` INNER JOIN wellbeing_programs ON `<table0>`.athlete_id = wellbeing_programs.athlete_id; | List all athletes in the soccer team who participated in wellbeing programs and their corresponding program names. |
<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>[PostFeedback] { <col0>[number... | SELECT Id, Body, Title, Tags, AnswerCount, Score, ViewCount, CommentCount FROM `<table11>` WHERE CreationDate >= '2019-01-01' AND PostTypeId = 1 LIMIT 20000 | All questions after January 1, 2019.
|
<table0>[Lots] { <col0>[lot_id]:[INTEGER] <col1>[investor_id]:[INTEGER] <col2>[lot_details]:[VARCHAR] } <table1>[Transactions_Lots] { <col0>[transaction_id]:[INTEGER] <col1>[lot_id]:[INTEGER] } <table2>[Purchases] { <col0>[purchase_transaction_id]:[INTEGER] <col1>[purchase_details]:[VARCHAR] } <table3>[Investors] { ... | SELECT purchase_details, COUNT( `<col1>` ) FROM `<table2>` AS T1 JOIN Transactions AS T2 ON T1.purchase_transaction_id = T2.transaction_id WHERE T2.amount_of_transaction > 10000 GROUP BY `<col1>` ORDER BY `<col1>` DESC | A bar chart for what are the number of the purchase details of transactions with amount bigger than 10000?, and I want to show by the X from high to low please. |
<table0>[ExplainableAI] { <col0>[model_name]:[TEXT] <col1>[fairness_score]:[FLOAT] } | SELECT model_name, RANK( ) OVER ( ORDER BY fairness_score DESC ) rank FROM ExplainableAI; | What is the rank of explainable AI models by fairness score? |
<table0>[sales] { <col0>[sale_id]:[INT] <col1>[product_id]:[INT] <col2>[supplier_id]:[INT] <col3>[sale_amount]:[DECIMAL] } <table1>[suppliers] { <col0>[supplier_id]:[INT] <col1>[supplier_name]:[VARCHAR] <col2>[country]:[VARCHAR] <col3>[INSERT]:[sales] <col4>[sale_id]:[product_id] <col5>[supplier_id]:[sale_amount] <col... | SELECT SUM( `<col3>` ) FROM `<table0>` INNER JOIN suppliers ON `<table0>`.supplier_id = suppliers.supplier_id WHERE suppliers.country = 'India'; | What is the total revenue of suppliers from a specific country? |
<table0>[sales] { <col0>[drug_name]:[VARCHAR] <col1>[sale_year]:[INT] <col2>[region]:[VARCHAR] <col3>[revenue]:[FLOAT] } | SELECT SUM( `<col3>` ) as total_`<table0>`, `<col2>` FROM `<table0>` WHERE `<col0>` = 'DrugX' AND `<col1>` = 2020 GROUP BY region; | What were the total sales of a specific drug, 'DrugX', in the year 2020 across different regions? |
<table0>[table_name_29] { <col0>[bronze]:[INTEGER] <col1>[total]:[INTEGER] } | SELECT AVG( `<col0>` ) FROM `<table0>` WHERE `<col1>` < 1 | What average bronze has a total less than 1?
|
<table0>[table_12139] { <col0>[Club]:[text] <col1>[Played]:[text] <col2>[Drawn]:[text] <col3>[Lost]:[text] <col4>[Points]:[text] <col5>[Points]:[text] <col6>[Tries]:[text] <col7>[Tries]:[text] <col8>[Try]:[Bonus] <col9>[text]:[Losing] <col10>[Bonus]:[text] <col11>[Points]:[text] } | SELECT "Tries For" FROM `<table0>` WHERE "Points" = '48' | How many tries for were there 48 points?
|
<table0>[procedures_icd] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icd9_code]:[text] <col4>[charttime]:[time] } <table1>[outputevents] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[charttime]:[time] <col5>[i... | SELECT `<table4>`.charttime FROM `<table4>` WHERE `<table4>`.icd9_code = ( SELECT `<table5>`.icd9_code FROM `<table5>` WHERE `<table5>`.short_title = 'hemopericardium' ) AND `<table4>`.hadm_id IN ( SELECT `<table13>`.hadm_id FROM `<table13>` WHERE `<table13>`.subject_id = 70950 ) AND STRFTIME( '%y', `<table4>`.charttim... | when was the last time patient 70950 was diagnosed with hemopericardium until 2104?
|
<table0>[table_26176081_29] { } | SELECT MIN( gp ) FROM `<table0>` | What is the lowest gp?
|
<table0>[customers] { <col0>[INT]:[name] <col1>[VARCHAR]:[city] <col2>[VARCHAR]:[country] <col3>[VARCHAR]:[assets] <col4>[DECIMAL]:[INSERT] } | SELECT city, SUM( assets ) FROM `<table0>` WHERE country = 'Saudi Arabia' GROUP BY city; | Find the total assets of all customers from Saudi Arabia, grouped by their city. |
<table0>[table_203_308] { <col0>[number]:[athlete] <col1>[text]:[nation] <col2>[text]:[olympics] <col3>[text]:[gold] <col4>[number]:[silver] <col5>[number]:[bronze] <col6>[number]:[total] } | SELECT "athlete" FROM `<table0>` ORDER BY "total" DESC LIMIT 1 | who has won the most total snowboarding medals ?
|
<table0>[union_retail] { <col0>[union_id]:[INT] <col1>[union_name]:[TEXT] <col2>[industry]:[TEXT] <col3>[members]:[INT] } | SELECT industry, MIN( `<col3>` ), MAX( `<col3>` ), COUNT( * ) FROM `<table0>` WHERE `<col2>` = 'Retail' GROUP BY industry; | What is the minimum and maximum number of members in unions in the retail industry, and how many unions are there in this industry? |
<table0>[table_41420] { <col0>[Player]:[text] <col1>[Club]:[text] <col2>[League]:[real] <col3>[Play]:[offs] <col4>[real]:[Cup] <col5>[real]:[Trophy] <col6>[real]:[Total] } | SELECT AVG( "Play-offs" ) FROM `<table0>` WHERE "FA Cup" > '3' | What are the average play-offs that have an FA Cup greater than 3?
|
<table0>[Players] { <col0>[PlayerID]:[INT] <col1>[Age]:[INT] <col2>[GameType]:[VARCHAR] } | SELECT MAX( `<col1>` ) FROM `<table0>` WHERE `<col2>` = 'RPG'; | What is the maximum age of players who play RPG games? |
<table0>[monorails] { <col0>[INT]:[name] <col1>[TEXT]:[location] <col2>[TEXT]:[length] <col3>[INT]:[type] <col4>[TEXT]:[year] <col5>[INT]:[INSERT] } | SELECT name, location, length FROM `<table0>` WHERE year > 1995 AND location NOT LIKE '%Japan%'; | What are the names, locations, and lengths of monorails constructed after 1995, excluding those in Japan? |
<table0>[Products] { <col0>[Code]:[INTEGER] <col1>[VARCHAR]:[255] <col2>[Price]:[DECIMAL] <col3>[Manufacturer]:[INTEGER] } <table1>[Manufacturers] { <col0>[Code]:[INTEGER] <col1>[VARCHAR]:[255] <col2>[Headquarter]:[VARCHAR] <col3>[255]:[Founder] <col4>[VARCHAR]:[255] <col5>[Revenue]:[REAL] } | SELECT T2.Name, T2.Revenue FROM `<table0>` 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, draw a bar chart about the distribution of name and the sum of revenue , and group by attribute name. |
<table0>[diagnosis] { <col0>[diagnosisid]:[number] <col1>[patientunitstayid]:[number] <col2>[diagnosisname]:[text] <col3>[diagnosistime]:[time] <col4>[icd9code]:[text] } <table1>[lab] { <col0>[labid]:[number] <col1>[patientunitstayid]:[number] <col2>[labname]:[text] <col3>[labresult]:[number] <col4>[labresulttime]:[ti... | SELECT `<table8>`.drugstarttime FROM `<table8>` WHERE `<table8>`.`<table5>`unitstayid IN ( SELECT `<table5>`.`<table5>`unitstayid FROM `<table5>` WHERE `<table5>`.`<table5>`healthsystemstayid IN ( SELECT `<table5>`.`<table5>`healthsystemstayid FROM `<table5>` WHERE `<table5>`.uniquepid = '002-70965' ) ) AND `<table8>`.... | when was the last time that patient 002-70965 was prescribed a medication via intranasal route?
|
<table0>[Feedback] { <col0>[Timestamp]:[DATETIME] <col1>[Region]:[VARCHAR] <col2>[FeedbackType]:[VARCHAR] <col3>[ResponseTime]:[INT] } | INSERT INTO Feedback( Timestamp, Region, FeedbackType, ResponseTime ) VALUES ( '2023-04-20 10:00:00', 'South East', 'Housing', 35 ); | Insert a new record of citizen feedback for 'Housing' in the 'South East' region with a response time of 35 minutes on April 20, 2023. |
<table0>[table_1965650_9] { <col0>[player]:[VARCHAR] <col1>[college_junior_club_team]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "Kitchener Rangers ( OHA )" | When kitchener rangers (oha) is the college, junior, or club team team who is the player? |
<table0>[table_55148] { <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 "Home team" FROM `<table0>` WHERE "Away `<col2>` score" = '18.14 ( 122 )' | Which team has an away score of 18.14 (122)? |
<table0>[table_name_13] { <col0>[date]:[VARCHAR] <col1>[race_title]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "grand prix de monaco" | When did the Grand Prix de Monaco race? |
<table0>[table_name_10] { } | SELECT 2004 FROM `<table0>` WHERE 2011 = "q1" | What is the 2004 tournament that has a Q1 of 2011? |
<table0>[gsi] { <col0>[course_offering_id]:[int] <col1>[student_id]:[int] } <table1>[requirement] { <col0>[requirement_id]:[int] } <table2>[offering_instructor] { <col0>[offering_instructor_id]:[int] <col1>[offering_id]:[int] <col2>[instructor_id]:[int] } <table3>[instructor] { <col0>[instructor_id]:[int] <col1>[nam... | SELECT DISTINCT course.department, course.name, course.number FROM course, program_course WHERE program_course.category LIKE '%ULCS%' AND program_course.course_id = course.course_id | For CS , are there any upper elective courses offered ?
|
<table0>[financial_wellbeing] { <col0>[INT]:[individual_id] <col1>[INT]:[financial_wellbeing_score] <col2>[INT]:[country] } | SELECT MIN( `<table0>`_score ) FROM `<table0>` WHERE country LIKE 'Oceania%'; | What is the minimum financial wellbeing score in Oceania? |
<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, T2.Revenue FROM `<table1>` AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name ORDER BY T2.Revenue DESC | For those records from the products and each product's manufacturer, a bar chart shows the distribution of name and the sum of revenue , and group by attribute name, and show by the total number from high to low. |
<table0>[ConstructionLaborStatistics] { <col0>[INT]:[name] <col1>[VARCHAR]:[job] <col2>[VARCHAR]:[salary] <col3>[INT]:[INSERT] } <table1>[GreenBuildings] { <col0>[INT]:[worker_id] <col1>[INT]:[building_type] <col2>[VARCHAR]:[INSERT] } | SELECT AVG( cls.salary ) FROM `<table0>` cls JOIN GreenBuildings gb ON cls.id = gb.worker_id WHERE gb.building_type IN ( 'Eco-friendly', 'Solar' ); | What is the average salary of construction workers in 'GreenBuildings' table? |
<table0>[table_name_59] { <col0>[language]:[VARCHAR] <col1>[content]:[VARCHAR] <col2>[television_service]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "televendita" AND `<col2>` = "telemarket for you" | What language is telemarket for you with a content of televendita? |
<table0>[table_20010140_10] { <col0>[high_points]:[VARCHAR] <col1>[date]:[VARCHAR] } | SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "February 19" | how many high points where date is february 19 |
<table0>[table_204_87] { <col0>[number]:[courthouse] <col1>[text]:[city] <col2>[text]:[street] <col3>[address]:[text] <col4>[jurisdiction]:[text] <col5>[dates]:[use] <col6>[text]:[named] } | SELECT COUNT( "courthouse" ) FROM `<table0>` WHERE "jurisdiction" = 'n.d. miss' | how many courthouses were in the n.d. miss jurisdiction ?
|
<table0>[table_train_262] { <col0>[int]:[gender] <col1>[string]:[hemoglobin_a1c_hba1c] <col2>[float]:[obesity] <col3>[bool]:[diabetic] <col4>[string]:[hba1c] <col5>[float]:[body_mass_index_bmi] <col6>[float]:[age] <col7>[float]:[NOUSE] } | SELECT * FROM `<table0>` WHERE hba1c >= 8 | hemoglobin a1c > or equal to 8 % |
<table0>[Tags] { <col0>[number]:[TagName] <col1>[text]:[Count] <col2>[number]:[ExcerptPostId] <col3>[number]:[WikiPostId] } <table1>[PostHistory] { <col0>[number]:[PostHistoryTypeId] <col1>[number]:[PostId] <col2>[number]:[RevisionGUID] <col3>[CreationDate]:[time] <col4>[UserId]:[number] <col5>[UserDisplayName]:[text]... | SELECT Date, UserId, UserId AS "user_link", Name, `<col3>` FROM `<table26>` WHERE `<col4>` = 'true' AND ( Name LIKE '%vba%' OR Name LIKE '%excel%' ) ORDER BY UserId, `<col2>` | VBA & Excel tag badges. This one may be better: https://data.stackexchange.com/stackoverflow/query/869444/how-would-removing-tagexcel-vba-affect-excel-and-vba-tag-badges |
<table0>[infrastructure] { <col0>[bridges]:[bridge_id] <col1>[INT]:[name] <col2>[VARCHAR]:[255] <col3>[length]:[FLOAT] } | SELECT MAX( length ) FROM infrastructure.bridges; | What is the maximum bridge length in the 'infrastructure' schema? |
<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 `<table8>`.drugstarttime FROM `<table8>` WHERE `<table8>`.`<table2>`unitstayid IN ( SELECT `<table2>`.`<table2>`unitstayid FROM `<table2>` WHERE `<table2>`.`<table2>`healthsystemstayid IN ( SELECT `<table2>`.`<table2>`healthsystemstayid FROM `<table2>` WHERE `<table2>`.uniquepid = '035-4312' ) ) AND `<table8>`.d... | what is the last time that patient 035-4312 was prescribed lactated ringers injection 1,000 ml since 180 months ago? |
<table0>[table_23186738_9] { <col0>[game]:[INTEGER] <col1>[score]:[VARCHAR] } | SELECT MIN( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "L 93–109 ( OT )" | Name the least game for score of l 93 109 (ot) |
<table0>[table_30843] { <col0>[taluka]:[text] <col1>[Population]:[2001] <col2>[census]:[real] <col3>[District]:[Population] <col4>[text]:[Male] <col5>[real]:[Male] <col6>[text]:[Female] <col7>[real]:[Female] <col8>[text]:[Sex] <col9>[Ratio]:[real] <col10>[Literacy]:[real] <col11>[Literacy]:[text] <col12>[Literate]:[Mal... | SELECT "Literate Female( % )" FROM `<table0>` WHERE "Male( % )" = '51.66' | How many literate females(%) are there where the male(%) is 51.66
|
<table0>[table_name_38] { <col0>[name]:[VARCHAR] <col1>[college]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "cincinnati" | Who is from the College of Cincinnati? |
<table0>[PostNotices] { <col0>[number]:[PostId] <col1>[number]:[PostNoticeTypeId] <col2>[number]:[CreationDate] <col3>[time]:[DeletionDate] <col4>[time]:[ExpiryDate] <col5>[time]:[Body] <col6>[text]:[OwnerUserId] <col7>[number]:[DeletionUserId] } <table1>[Comments] { <col0>[number]:[PostId] <col1>[number]:[Score] <col... | SELECT * FROM `<table9>` WHERE `<table9>`.PostTypeId = 5 AND 'Tag Name' LIKE '%sql%' | Find tag wikis with an image inside them.. |
<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>[time_zone] { <col... | SELECT DISTINCT flight.flight_id FROM `<table4>` AS AIRPORT_SERVICE_0, `<table4>` 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 = 'DENVER' AND date_day.day_number = 7 AND date_day.month_number = 7 AND date_day... | can you tell me the latest evening flight from ATLANTA to DENVER on 7 7 |
<table0>[course] { <col0>[title]:[VARCHAR] <col1>[credits]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` ORDER BY title, `<col1>` | List the names of all courses ordered by their titles and credits. |
<table0>[claims] { <col0>[claim_id]:[INT] <col1>[policyholder_id]:[INT] <col2>[claim_amount]:[DECIMAL] <col3>[claim_date]:[DATE] } | SELECT policyholder_id, COUNT( * ) as total_`<table0>` FROM `<table0>` WHERE state = 'California' GROUP BY `<col1>` ORDER BY total_`<table0>` DESC LIMIT 1; | Identify the policyholder with the most claims in California. |
<table0>[table_name_87] { <col0>[money_requested]:[INTEGER] <col1>[first_aired]:[VARCHAR] } | SELECT SUM( money_requested__ ) AS £_ FROM `<table0>` WHERE `<col1>` = "4 september 2011" | how much money was requested on the show which aired on 4 september 2011? |
<table0>[Product] { <col0>[product_id]:[INTEGER] <col1>[product_name]:[VARCHAR] <col2>[product_details]:[VARCHAR] } <table1>[Problem_Status_Codes] { <col0>[problem_status_code]:[VARCHAR] <col1>[problem_status_description]:[VARCHAR] } <table2>[Problem_Log] { <col0>[problem_log_id]:[INTEGER] <col1>[assigned_to_staff_id... | SELECT log_entry_date, COUNT( `<col5>` ) FROM `<table2>` WHERE `<col2>` = 10 ORDER BY COUNT( `<col5>` ) | For the problem whose id is 10, bin the log_entry_date into the weekday interval and count the date, and return a bar chart, and I want to list by the Y-axis in ascending. |
<table0>[table_25983027_1] { <col0>[rainfall_by_depth__mm_year]:[VARCHAR] <col1>[land_area__km_2]:[VARCHAR] } | SELECT rainfall_by_depth__mm_year_ FROM `<table0>` WHERE land_area__km_2__ = "8,543.2" | In the Central region, where the land area (km 2) is 8,543.2, what was the rainfall by depth (mm/year)? |
<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 prescriptions ON `<table3>`.hadm_id = prescriptions.hadm_id WHERE `<table3>`.days_stay > "7" AND prescriptions.drug = "Oseltamivir" | find the number of patients who were given the drug oseltamivir had stayed in the hospital for more than 7 days. |
<table0>[company_production] { <col0>[company]:[VARCHAR] <col1>[255]:[oil_production] <col2>[FLOAT]:[gas_production] } | SELECT company, SUM( oil_production ) AS total_oil_production, SUM( gas_production ) AS total_gas_production FROM `<table0>` WHERE region = 'Marcellus Shale' GROUP BY company; | Determine the total oil and gas production for each company in the Marcellus Shale. |
<table0>[WasteProduction] { <col0>[WasteID]:[INT] <col1>[Plant]:[VARCHAR] <col2>[255]:[WasteQuantity] <col3>[DECIMAL]:[Timestamp] } | SELECT SUM( WasteQuantity ) FROM `<table0>` WHERE `<col1>` = 'Chemical `<col1>` A' AND Timestamp BETWEEN DATE_SUB( CURRENT_DATE( ), INTERVAL 3 MONTH ) AND CURRENT_DATE( ); | What is the total waste produced by the Chemical Plant A in the last quarter? |
<table0>[employees] { <col0>[EMPLOYEE_ID]:[decimal] <col1>[FIRST_NAME]:[varchar] <col2>[LAST_NAME]:[varchar] <col3>[EMAIL]:[varchar] <col4>[PHONE_NUMBER]:[varchar] <col5>[HIRE_DATE]:[date] <col6>[JOB_ID]:[varchar] <col7>[SALARY]:[decimal] <col8>[COMMISSION_PCT]:[decimal] <col9>[MANAGER_ID]:[decimal] <col10>[DEPARTMENT_... | SELECT JOB_ID, `<col0>` FROM `<table0>` WHERE NOT `<col10>` IN ( SELECT `<col10>` FROM `<table3>` WHERE `<col9>` BETWEEN 100 AND 200 ) ORDER BY `<col0>` | For those employees who do not work in departments with managers that have ids between 100 and 200, find job_id and employee_id , and visualize them by a bar chart, and display Y-axis in asc order. |
<table0>[employee_details] { <col0>[INT]:[name] <col1>[VARCHAR]:[department] <col2>[VARCHAR]:[safety_training_status] } | UPDATE employee_details SET safety_training_status = 'completed' WHERE department = 'mining'; | Update the 'employee_details' table and set the 'safety_training_status' to 'completed' for all employees in the 'mining' department |
<table0>[cost] { <col0>[costid]:[number] <col1>[uniquepid]:[text] <col2>[patienthealthsystemstayid]:[number] <col3>[eventtype]:[text] <col4>[eventid]:[number] <col5>[chargetime]:[time] } <table1>[medication] { <col0>[medicationid]:[number] <col1>[patientunitstayid]:[number] <col2>[drugname]:[text] <col3>[dosage]:[text... | SELECT 1 * ( STRFTIME( '%j', CURRENT_TIME( ) ) - STRFTIME( '%j', `<table2>`.`<table2>`time ) ) FROM `<table2>` WHERE `<table2>`.`<table5>`unitstayid IN ( SELECT `<table5>`.`<table5>`unitstayid FROM `<table5>` WHERE `<table5>`.`<table5>`healthsystemstayid IN ( SELECT `<table5>`.`<table5>`healthsystemstayid FROM `<table5... | how many days has it been since patient 006-14121 was first diagnosed with s/p exploratory laparotomy in the in the current hospital encounter?
|
<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>[transfers] { <col0>... | SELECT ( SELECT `<table13>`.valuenum FROM `<table13>` WHERE `<table13>`.icustay_id IN ( SELECT `<table0>`.icustay_id FROM `<table0>` WHERE `<table0>`.hadm_id IN ( SELECT `<table5>`.hadm_id FROM `<table5>` WHERE `<table5>`.subject_id = 32153 ) AND `<table0>`.outtime IS NULL ) AND `<table13>`.itemid IN ( SELECT `<table8>... | is the heart rate of patient 32153 less second measured on the current icu visit than it was first measured on the current icu visit? |
<table0>[institution] { <col0>[TYPE]:[VARCHAR] } | SELECT DISTINCT `<col0>` FROM `<table0>` | Show all the distinct institution types. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.