schema stringlengths 20 14.6k | query stringlengths 17 2.58k | question stringlengths 8 1.06k |
|---|---|---|
<table0>[Orders] { <col0>[INT]:[product_id] <col1>[INT]:[quantity] <col2>[INT]:[order_date] <col3>[DATE]:[INSERT] } | SELECT product_id, MAX( quantity ) FROM `<table0>` GROUP BY product_id; | What is the maximum quantity of a single product sold in a day? |
<table0>[locations] { <col0>[LOCATION_ID]:[decimal] <col1>[STREET_ADDRESS]:[varchar] <col2>[POSTAL_CODE]:[varchar] <col3>[CITY]:[varchar] <col4>[STATE_PROVINCE]:[varchar] <col5>[COUNTRY_ID]:[varchar] } <table1>[employees] { <col0>[EMPLOYEE_ID]:[decimal] <col1>[FIRST_NAME]:[varchar] <col2>[LAST_NAME]:[varchar] <col3>[E... | SELECT JOB_ID, `<col10>` FROM `<table1>` WHERE NOT `<col10>` IN ( SELECT `<col10>` FROM `<table2>` WHERE `<col9>` BETWEEN 100 AND 200 ) ORDER BY `<col10>` | For those employees who do not work in departments with managers that have ids between 100 and 200, show me about the distribution of job_id and department_id in a bar chart, list in ascending by the DEPARTMENT_ID please.
|
<table0>[prescriptions] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icustay_id]:[text] <col3>[drug_type]:[text] <col4>[drug]:[text] <col5>[formulary_drug_cd]:[text] <col6>[route]:[text] <col7>[drug_dose]:[text] } <table1>[procedures] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[t... | SELECT COUNT( DISTINCT `<table3>`.subject_id ) FROM `<table3>` INNER JOIN lab ON `<table3>`.hadm_id = lab.hadm_id WHERE `<table3>`.diagnosis = "AORTIC VALVE INSUFFIENCY\AORTIC VALVE REPLACEMENT /SDA" AND lab.fluid = "Blood" | count the number of patients whose primary disease is aortic valve insuffiency\aortic valve replacement /sda and lab test fluid is blood? |
<table0>[diagnoses] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table1>[prescriptions] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icustay_id]:[text] <col3>[drug_type]:[text] <col4>[drug]:[text] <col5>[formulary_drug_... | SELECT COUNT( DISTINCT `<table3>`.subject_id ) FROM `<table3>` WHERE `<table3>`.marital_status = "SINGLE" AND `<table3>`.admityear < "2177" | provide the number of patients whose marital status is single and admission year is less than 2177? |
<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 COUNT( * ) FROM ( SELECT jybgb.KSBM FROM `<table5>` JOIN jybgb JOIN `<table5>`_jybgb ON `<table5>`.YLJGDM = `<table5>`_jybgb.YLJGDM_MZJZJLB AND `<table5>`.JZLSH = jybgb.JZLSH_MZJZJLB AND `<table5>`_jybgb.YLJGDM = jybgb.YLJGDM AND `<table5>`_jybgb.BGDH = jybgb.BGDH AND `<table5>`_jybgb.YLJGDM = jybgb.YLJGDM AND `... | 医院5070509有多少科室在门诊就诊中开出不少于26张检验报告单在2012年3月19日到2015年7月19日期间内?
|
<table0>[water_usage] { <col0>[INT]:[PRIMARY] <col1>[KEY]:[year] <col2>[INT]:[location] <col3>[VARCHAR]:[usage] <col4>[FLOAT]:[INSERT] } | SELECT AVG( usage ) FROM `<table0>` WHERE year = 2019 AND location IN ( 'Chicago', 'Miami' ); | Determine the average water usage in cubic meters for the locations 'Chicago' and 'Miami' for the year 2019 |
<table0>[table_name_33] { <col0>[place]:[VARCHAR] <col1>[score]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = 66 | What is the Place for the 66 Score? |
<table0>[Disaster_Type] { <col0>[INT]:[PRIMARY] <col1>[KEY]:[name] <col2>[VARCHAR]:[INSERT] } <table1>[Aid_Distribution] { <col0>[INT]:[PRIMARY] <col1>[KEY]:[disaster_id] <col2>[INT]:[aid_amount] <col3>[FLOAT]:[FOREIGN] <col4>[KEY]:[disaster_id] <col5>[REFERENCES]:[Disaster] } | SELECT dt.name, SUM( ad.aid_amount ) as total_aid FROM `<table0>` dt JOIN Disaster d ON dt.id = d.type_id JOIN Aid_Distribution ad ON d.id = ad.disaster_id GROUP BY dt.name; | What is the total aid amount distributed for each disaster type? |
<table0>[Customers] { <col0>[Customer_ID]:[INTEGER] <col1>[Customer_Details]:[VARCHAR] } <table1>[Payments] { <col0>[Payment_ID]:[INTEGER] <col1>[Settlement_ID]:[INTEGER] <col2>[Payment_Method_Code]:[VARCHAR] <col3>[255]:[Date_Payment_Made] <col4>[DATE]:[Amount_Payment] } <table2>[Customer_Policies] { <col0>[Policy_I... | SELECT Date_Claim_Made, COUNT( `<col2>` ) FROM `<table3>` ORDER BY COUNT( `<col2>` ) DESC | Bin the claim date into the Year interval and count them for visualizing a bar chart, and show in desc by the y-axis. |
<table0>[Bills] { <col0>[BillID]:[INT] <col1>[Department]:[VARCHAR] } <table1>[BillStatus] { <col0>[BillID]:[INT] <col1>[Status]:[VARCHAR] <col2>[INSERT]:[Bills] <col3>[VALUES]:[Education] <col4>[2000000]:[Health] <col5>[1500000]:[Transportation] <col6>[500000]:[INSERT] } | SELECT `<table0>`.BillID, `<table0>`.Department, `<table0>`.Amount, BillStatus.Status FROM `<table0>` INNER JOIN BillStatus ON `<table0>`.BillID = BillStatus.BillID WHERE `<table0>`.Amount > 1000000; | List all the bills with a budget over 1 million dollars, along with their corresponding departments and statuses. |
<table0>[table_204_321] { <col0>[number]:[community] <col1>[text]:[currency] <col2>[text]:[region] <col3>[text]:[target] <col4>[date]:[number] <col5>[notes]:[text] } | SELECT "community" FROM `<table0>` WHERE "region" = 'south asia' | what is the only proposed community in the south asia region ?
|
<table0>[table_23308178_6] { <col0>[date]:[VARCHAR] <col1>[location]:[VARCHAR] } | SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "Wachovia Center" | How many dates were played at the wachovia center?
|
<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 `<table3>`.subject_id ) FROM `<table3>` INNER JOIN diagnoses ON `<table3>`.hadm_id = diagnoses.hadm_id WHERE `<table3>`.expire_flag = "0" AND diagnoses.long_title = "Atrial fibrillation" | what is the number of patients whose death status is 0 and diagnoses long title is atrial fibrillation?
|
<table0>[production_stats] { <col0>[INT]:[mine_id] <col1>[INT]:[date] <col2>[DATE]:[ore_production] } | SELECT a.mine_id, a.ore_production - LAG( a.ore_production ) OVER ( PARTITION BY a.mine_id ORDER BY a.date ) as change_in_ore_production FROM `<table0>` a WHERE a.date >= DATEADD( month, -1, CURRENT_DATE ) ORDER BY a.mine_id, a.date; | Determine the change in ore production by mine over the past month. |
<table0>[marine_protected_areas_location] { <col0>[INT]:[marine_protected_area_id] <col1>[INT]:[location] <col2>[TEXT]:[PRIMARY] <col3>[KEY]:[marine_protected_area_id] <col4>[FOREIGN]:[KEY] <col5>[marine_protected_area_id]:[REFERENCES] <col6>[marine_protected_areas]:[INSERT] } | SELECT marine_protected_areas.name FROM marine_protected_areas INNER JOIN marine_protected_areas_location ON marine_protected_areas.id = marine_protected_areas_location.marine_protected_area_id WHERE marine_protected_areas_location.location = 'Atlantic Ocean'; | List all marine protected areas located in the Atlantic Ocean. |
<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 T1.Name, T1.Price FROM `<table1>` AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T1.Name ORDER BY T1.Price | For those records from the products and each product's manufacturer, give me the comparison about the average of price over the name , and group by attribute name by a bar chart, list by the mean price in ascending please. |
<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>` WHERE `<table4>`.religion = "GREEK ORTHODOX" AND `<table4>`.admityear < "2203" | what is the number of patients whose religion is greek orthodox and admission year is less than 2203? |
<table0>[table_name_83] { <col0>[duration]:[VARCHAR] <col1>[start_date_time]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "8 july 12:38" | The EVA that started on 8 July 12:38 went for how long?
|
<table0>[record] { <col0>[int]:[Result] <col1>[text]:[Swimmer_ID] <col2>[int]:[Event_ID] } <table1>[stadium] { <col0>[int]:[name] <col1>[text]:[Capacity] <col2>[int]:[City] <col3>[text]:[Country] <col4>[text]:[Opening_year] } <table2>[swimmer] { <col0>[int]:[name] <col1>[text]:[Nationality] <col2>[text]:[meter_100] <... | SELECT meter_700, ID FROM `<table2>` ORDER BY meter_700 | Give me the comparison about ID over the meter_700 by a bar chart, and could you display in asc by the X?
|
<table0>[PersonFriend] { <col0>[name]:[varchar] <col1>[friend]:[varchar] <col2>[year]:[INTEGER] } <table1>[Person] { <col0>[name]:[varchar] <col1>[age]:[INTEGER] <col2>[city]:[TEXT] <col3>[gender]:[TEXT] <col4>[job]:[TEXT] } | SELECT job, AVG( `<col1>` ) FROM `<table1>` WHERE `<col3>` = 'male' GROUP BY `<col4>` ORDER BY AVG( `<col1>` ) | what is the average age for a male in each job?, list by the mean age in asc. |
<table0>[table_name_7] { <col0>[model]:[VARCHAR] <col1>[digital]:[VARCHAR] <col2>[tuner]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "dvb-t ( cx22702 )" AND `<col2>` = "thomson dtt75105" | I want the model for digital of dvb-t (cx22702) and tuner of thomson dtt75105
|
<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_Name, `<col0>` FROM `<table0>` ORDER BY `<col0>` | Give me the comparison about Team_ID over the Team_Name by a bar chart, and I want to sort from low to high by the y-axis please.
|
<table0>[table_name_74] { <col0>[catalog]:[VARCHAR] <col1>[label]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "alfa records" | What is the catalog number of Alfa records? |
<table0>[FlagTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table1>[ReviewTaskTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table2>[PostTypes] { <col0>[number]:[text] } <table3>[PostHistoryTypes] { <col0>[number]:[text] } <table4>[PostLinks] { <col0>[number]:[CreationDate] <col1>[time]:... | SELECT TagName, COUNT( * ) AS c FROM `<table12>` INNER JOIN Posts ON `<table12>`.PostId = Posts.Id INNER JOIN PostTags ON Posts.Id = PostTags.PostId INNER JOIN Tags ON PostTags.TagId = Tags.Id WHERE `<table12>`.UserId = @UserId GROUP BY TagName ORDER BY c DESC | What tags I vote on the most?. What tags you like to vote on.
|
<table0>[Policies] { <col0>[PolicyID]:[INT] <col1>[PolicyholderID]:[INT] <col2>[Provider]:[VARCHAR] <col3>[StartDate]:[DATE] <col4>[EndDate]:[DATE] } <table1>[Policyholders] { <col0>[PolicyholderID]:[INT] <col1>[PolicyholderName]:[VARCHAR] <col2>[State]:[VARCHAR] } | SELECT PolicyholderName FROM `<table0>` JOIN Policyholders ON `<table0>`.PolicyholderID = Policyholders.PolicyholderID WHERE Policyholders.State = 'Michigan' AND `<col4>` >= DATEADD( month, -6, CURRENT_DATE ); | Find policyholders in Michigan who have switched insurance providers in the last 6 months. |
<table0>[tip] { <col0>[tip_id]:[int] <col1>[business_id]:[varchar] <col2>[text]:[longtext] <col3>[user_id]:[varchar] <col4>[likes]:[int] <col5>[year]:[int] <col6>[month]:[varchar] } <table1>[review] { <col0>[rid]:[int] <col1>[business_id]:[varchar] <col2>[user_id]:[varchar] <col3>[rating]:[float] <col4>[text]:[longtex... | SELECT review.text FROM business, category, review WHERE business.rating < 1.5 AND category.business_id = business.business_id AND category.category_name = 'Bistros' AND review.business_id = business.business_id | List all reviews for Bistros with rating less than 1.5
|
<table0>[ports] { <col0>[port_id]:[port_name] <col1>[country]:[region] } | INSERT INTO ports ( port_id, port_name, country, region, location ) VALUES ( 5002, 'Hong Kong Port', 'Hong Kong', 'East Asia', 'Victoria Harbour' ); | Add a new port to the system |
<table0>[Inventory] { <col0>[INT]:[product_name] <col1>[VARCHAR]:[255] <col2>[brand]:[VARCHAR] <col3>[255]:[is_ethical] <col4>[BOOLEAN]:[INSERT] } | SELECT COUNT( DISTINCT `<col2>` ) FROM `<table0>` WHERE is_ethical = true; | Identify the number of unique ethical clothing brands in the inventory. |
<table0>[table_name_99] { <col0>[length]:[VARCHAR] <col1>[junctions]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "ur 1472 sh 255" | What's the length of the route with junctions of ur 1472 sh 255? |
<table0>[PlayerGames] { <col0>[PlayerID]:[int] <col1>[Age]:[int] <col2>[GameGenre]:[varchar] <col3>[GameRating]:[int] } | SELECT COUNT( * ) FROM `<table0>` WHERE `<col2>` = 'Action' AND `<col3>` >= 8; | What is the total number of players who have played a game with the genre 'Action' and a rating of 8 or higher? |
<table0>[table_45885] { <col0>[Team]:[text] <col1>[Agg]:[text] <col2>[Team]:[text] <col3>[1st]:[leg] <col4>[text]:[2nd] <col5>[leg]:[text] } | SELECT "Team 1" FROM `<table0>` WHERE "2nd leg" = '2-1' | What is the team 1 with a 2-1 2nd leg? |
<table0>[CREATE] { <col0>[VIEW]:[africa_hotels] <col1>[SELECT]:[hotels] <col2>[continent]:[Africa] } | SELECT l.name, LAG( o.bookings ) OVER ( PARTITION BY l.id ORDER BY o.month ) as previous_month_bookings, o.bookings as current_month_bookings FROM africa_hotels l JOIN online_travel_agency_bookings o ON l.id = o.hotel_id ORDER BY o.month; | What is the change in online travel agency bookings per month for hotels in the 'africa_hotels' view? |
<table0>[patients] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[gender]:[text] <col3>[dob]:[time] <col4>[dod]:[time] } <table1>[d_icd_procedures] { <col0>[row_id]:[number] <col1>[icd9_code]:[text] <col2>[short_title]:[text] <col3>[long_title]:[text] } <table2>[labevents] { <col0>[row_id]:[number] <col... | SELECT DISTINCT `<table3>`.`<table3>` FROM `<table3>` WHERE `<table3>`.event_type = '`<table6>`' AND `<table3>`.event_id IN ( SELECT `<table6>`.row_id FROM `<table6>` WHERE `<table6>`.drug = 'nitrofurantoin monohyd ( macrobid )' ) | how much is nitrofurantoin monohyd (macrobid) costing? |
<table0>[artist] { <col0>[artist_name]:[varchar2] <col1>[country]:[varchar2] <col2>[gender]:[varchar2] <col3>[preferred_genre]:[varchar2] } <table1>[song] { <col0>[song_name]:[varchar2] <col1>[artist_name]:[varchar2] <col2>[country]:[varchar2] <col3>[f_id]:[number] <col4>[genre_is]:[varchar2] <col5>[rating]:[number] <... | SELECT languages, AVG( `<col5>` ) FROM `<table1>` GROUP BY `<col6>` ORDER BY `<col6>` | Show me a bar chart for what is the average song rating for each language?, list by the names from low to high please.
|
<table0>[table_name_38] { <col0>[attendance]:[VARCHAR] <col1>[date]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "november 18, 1990" | What are the Attendance numbers for november 18, 1990?
|
<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>` GROUP BY Name ORDER BY COUNT( Name ) DESC | Bar chart x axis name y axis the number of name, show in descending by the Y-axis please. |
<table0>[table_22355_5] { <col0>[rank]:[INTEGER] } | SELECT MIN( `<col0>` ) FROM `<table0>` | What's the minimal rank of a athlete shown in the chart?
|
<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 ACC_Home, `<col6>` | Visualize a bar chart about the distribution of ACC_Road and School_ID , and group by attribute ACC_Home.
|
<table0>[table_51274] { <col0>[Date]:[text] <col1>[Opponent]:[text] <col2>[Score]:[text] <col3>[Loss]:[text] <col4>[Attendance]:[real] <col5>[Series]:[text] <col6>[Arena]:[text] } | SELECT "Series" FROM `<table0>` WHERE "Attendance" > '17,181' AND "Loss" = 'giguere ( 0–1 )' | What was the record of the series at the game attended by 17,181 and a loss of Giguere (0 1)? |
<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_type = "EMERGENCY" AND prescriptions.route = "BOTH EYES" | how many patients are admitted under emergency and suggested with drug route via both eyes?
|
<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 `<table2>`.subject_id ) FROM `<table2>` INNER JOIN diagnoses ON `<table2>`.hadm_id = diagnoses.hadm_id WHERE `<table2>`.discharge_location = "HOME" AND diagnoses.short_title = "Diabetic retinopathy NOS" | count the number of patients whose discharge location is home and diagnoses short title is diabetic retinopathy nos?
|
<table0>[equipment_sequence] { <col0>[aircraft_code_sequence]:[varchar] <col1>[aircraft_code]:[varchar] } <table1>[time_zone] { <col0>[time_zone_code]:[text] <col1>[time_zone_name]:[text] <col2>[hours_from_gmt]:[int] } <table2>[city] { <col0>[city_code]:[varchar] <col1>[city_name]:[varchar] <col2>[state_code]:[varcha... | SELECT DISTINCT flight.flight_id FROM `<table15>` AS AIRPORT_SERVICE_0, `<table15>` AS AIRPORT_SERVICE_1, `<table15>` AS AIRPORT_SERVICE_2, city AS CITY_0, city AS CITY_1, city AS CITY_2, date_day, days, flight, flight_stop WHERE ( ( CITY_2.city_code = AIRPORT_SERVICE_2.city_code AND CITY_2.city_name = 'ATLANTA' AND da... | i would like a flight that leaves on friday from PHILADELPHIA to DALLAS that makes a stop in ATLANTA
|
<table0>[d_items] { <col0>[row_id]:[number] <col1>[itemid]:[number] <col2>[label]:[text] <col3>[linksto]:[text] } <table1>[prescriptions] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[startdate]:[time] <col4>[enddate]:[time] <col5>[drug]:[text] <col6>[dose_val_rx]:[text] <col7>[... | SELECT COUNT( DISTINCT `<table4>`.subject_id ) FROM `<table4>` WHERE `<table4>`.hadm_id IN ( SELECT `<table6>`.hadm_id FROM `<table6>` WHERE `<table6>`.spec_type_desc = 'biopsy' AND STRFTIME( '%y', `<table6>`.charttime ) <= '2104' ) | count the number of patients who had received a microbiological test of the biopsy until 2104.
|
<table0>[Posts] { <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]:[LastEditor... | SELECT CreationDate, Score FROM `<table0>` WHERE CreationDate > '04.01.2017' AND Score > 9 ORDER BY CreationDate | Post Scores since May '17. |
<table0>[table_51739] { <col0>[Driver]:[text] <col1>[Constructor]:[text] <col2>[Laps]:[real] <col3>[Time]:[Retired] <col4>[text]:[Grid] } | SELECT "Time/Retired" FROM `<table0>` WHERE "Laps" = '75' | What's the Time/Retired of Laps of 75?
|
<table0>[Participates_in] { <col0>[stuid]:[INTEGER] <col1>[actid]:[INTEGER] } <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_Participat... | SELECT Rank, COUNT( `<col3>` ) FROM `<table1>` GROUP BY `<col3>` | What is the number of the faculty members for each rank? Visualize in bar chart.
|
<table0>[course_tags_count] { <col0>[course_id]:[int] <col1>[clear_grading]:[int] <col2>[pop_quiz]:[int] <col3>[group_projects]:[int] <col4>[inspirational]:[int] <col5>[long_lectures]:[int] <col6>[extra_credit]:[int] <col7>[few_tests]:[int] <col8>[good_feedback]:[int] <col9>[tough_tests]:[int] <col10>[heavy_papers]:[in... | SELECT DISTINCT `<table8>`.name FROM `<table8>` INNER JOIN offering_`<table8>` ON offering_`<table8>`.`<table8>`_id = `<table8>`.`<table8>`_id INNER JOIN course_offering ON offering_`<table8>`.offering_id = course_offering.offering_id INNER JOIN area ON course_offering.course_id = area.course_id WHERE area.area LIKE '%... | Do you have a list of teachers for the human computer interaction courses ?
|
<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>[d_labitems] { <col0>[row_id]:[number] <col1>[itemid]:[number] <col2>[label]:[text] } <table2>[prescriptions] ... | SELECT MIN( `<table0>`.valuenum ) FROM `<table0>` WHERE `<table0>`.hadm_id IN ( SELECT `<table12>`.hadm_id FROM `<table12>` WHERE `<table12>`.subject_id = 31854 ) AND `<table0>`.itemid IN ( SELECT `<table1>`.itemid FROM `<table1>` WHERE `<table1>`.label = 'pt' ) AND STRFTIME( '%y-%m', `<table0>`.charttime ) >= '2104-12... | since 12/2104, what was the daily minimum value of the pt of patient 31854?
|
<table0>[table_name_88] { <col0>[outcome]:[VARCHAR] <col1>[year]:[VARCHAR] <col2>[score]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` > 2003 AND `<col2>` = "6–0, 6–3" | What is the Outcome of the Match played after 2003 with a Score of 6–0, 6–3? |
<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>`.long_title, procedures.long_title FROM `<table3>` INNER JOIN procedures ON `<table3>`.hadm_id = procedures.hadm_id WHERE `<table3>`.subject_id = "92796" | tell me the long title of both diagnoses and procedure of patient with patient id 92796. |
<table0>[Lives_in] { <col0>[stuid]:[INTEGER] <col1>[dormid]:[INTEGER] <col2>[room_number]:[INTEGER] } <table1>[Has_amenity] { <col0>[dormid]:[INTEGER] <col1>[amenid]:[INTEGER] } <table2>[Student] { <col0>[StuID]:[INTEGER] <col1>[LName]:[VARCHAR] <col2>[Fname]:[VARCHAR] <col3>[Age]:[INTEGER] <col4>[Sex]:[VARCHAR] <col... | SELECT city_code, COUNT( * ) FROM `<table2>` WHERE `<col4>` = 'M' GROUP BY `<col7>` | Find the number of male students (with sex M) from each city in a bar chart. |
<table0>[table_11968] { <col0>[Player]:[text] <col1>[Position]:[text] <col2>[Date]:[Birth] <col3>[Age]:[text] <col4>[Caps]:[real] <col5>[Club]:[province] } | SELECT "Date of Birth ( `<col3>` )" FROM `<table0>` WHERE "Player" = 'brian lemay' | When was brian lemay born?
|
<table0>[table_name_51] { <col0>[overall]:[INTEGER] <col1>[round]:[VARCHAR] } | SELECT MAX( `<col0>` ) FROM `<table0>` WHERE `<col1>` = 16 | What is the highest overall number for someone from round 16?
|
<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 Price, `<col3>` FROM `<table1>` WHERE `<col2>` BETWEEN 60 AND 120 | For those products with a price between 60 and 120, show me about the correlation between price and manufacturer in a scatter chart.
|
<table0>[table_name_46] { <col0>[laps]:[INTEGER] <col1>[year]:[VARCHAR] } | SELECT SUM( `<col0>` ) FROM `<table0>` WHERE `<col1>` = 2010 | How many Laps were there in 2010? |
<table0>[table_16732659_2] { <col0>[race_name]:[VARCHAR] <col1>[rnd]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = 13 | PLEASE LIST ALL RACES WHERE THE RND IS 13. |
<table0>[table_20774360_2] { <col0>[regular_season_record__w_l]:[VARCHAR] <col1>[standing]:[VARCHAR] } | SELECT regular_season_record__w_l_ FROM `<table0>` WHERE `<col1>` = "11th" | Name the regular season record for standing 11th |
<table0>[fan_demographics] { <col0>[fan_id]:[INT] <col1>[fan_name]:[VARCHAR] <col2>[region]:[VARCHAR] } | SELECT region, COUNT( * ) as num_fans FROM `<table0>` GROUP BY region; | How many fans are from each region in the fan_demographics table? |
<table0>[RefugeeSupportProjects] { <col0>[ProjectID]:[int] <col1>[Status]:[varchar] <col2>[Year]:[int] } | UPDATE RefugeeSupportProjects SET Status = 'In Progress' WHERE Year = 2018 AND Status = 'Not Started'; | Update the status of incomplete refugee support projects to 'In Progress' |
<table0>[cargo_tracking] { <col0>[cargo_id]:[INT] <col1>[cargo_type]:[VARCHAR] <col2>[255]:[weight] } | SELECT cargo_type, SUM( weight ) FROM `<table0>` GROUP BY cargo_type; | List the total cargo weight for each cargo type in the 'cargo_tracking' table |
<table0>[table_37007] { <col0>[Player]:[text] <col1>[Sacks]:[real] <col2>[INT]:[real] <col3>[Yards]:[real] <col4>[Average]:[real] <col5>[Long]:[text] } | SELECT SUM( "INT'S" ) FROM `<table0>` WHERE "Yards" = '0' AND "Sacks" < '3' AND "Player" = 'mossy cade' | What is the sum of values for INT'S with Mossy Cade for 0 yards and less than 3 sacks?
|
<table0>[program_course] { <col0>[program_id]:[int] <col1>[course_id]:[int] <col2>[workload]:[int] <col3>[category]:[varchar] } <table1>[jobs] { <col0>[job_id]:[int] <col1>[job_title]:[varchar] <col2>[description]:[varchar] <col3>[requirement]:[varchar] <col4>[city]:[varchar] <col5>[state]:[varchar] <col6>[country]:[v... | SELECT DISTINCT `<table14>`.`<table14>`, `<table14>`.year FROM course, course_offering, `<table14>` WHERE course.course_id = course_offering.course_id AND course.department = 'EECS' AND course.number = 497 AND course_offering.`<table14>` = `<table14>`.`<table14>`_id AND `<table14>`.`<table14>`_id > ( SELECT SEMESTERali... | When is 497 offered ? |
<table0>[team_half] { <col0>[year]:[INTEGER] <col1>[league_id]:[TEXT] <col2>[team_id]:[TEXT] <col3>[half]:[INTEGER] <col4>[div_id]:[TEXT] <col5>[div_win]:[TEXT] <col6>[rank]:[INTEGER] <col7>[INTEGER]:[INTEGER] } <table1>[college] { <col0>[college_id]:[TEXT] <col1>[name_full]:[TEXT] <col2>[city]:[TEXT] <col3>[state]:[T... | SELECT year, AVG( `<col8>` ) FROM `<table8>` GROUP BY `<col0>` ORDER BY `<col0>` DESC | Return a line chart on what is the average number of attendance at home games for each year?, and show in desc by the x-axis.
|
<table0>[table_name_95] { <col0>[year_s__won]:[VARCHAR] <col1>[player]:[VARCHAR] <col2>[to_par]:[VARCHAR] } | SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "justin leonard" AND `<col2>` < 9 | What is the total number of years won by Justin Leonard with a to par under 9? |
<table0>[union_members] { <col0>[INT]:[sector] <col1>[VARCHAR]:[membership_duration] <col2>[INT]:[INSERT] } | SELECT COUNT( * ) FROM `<table0>` WHERE sector = 'Technology' AND membership_duration < 2; | How many union members are there in the 'technology' sector who have been members for less than 2 years? |
<table0>[allergy] { <col0>[allergyid]:[number] <col1>[patientunitstayid]:[number] <col2>[drugname]:[text] <col3>[allergyname]:[text] <col4>[allergytime]:[time] } <table1>[vitalperiodic] { <col0>[vitalperiodicid]:[number] <col1>[patientunitstayid]:[number] <col2>[temperature]:[number] <col3>[sao2]:[number] <col4>[heart... | SELECT COUNT( * ) > 0 FROM `<table2>` WHERE `<table2>`.`<table4>`unitstayid IN ( SELECT `<table4>`.`<table4>`unitstayid FROM `<table4>` WHERE `<table4>`.`<table4>`healthsystemstayid IN ( SELECT `<table4>`.`<table4>`healthsystemstayid FROM `<table4>` WHERE `<table4>`.uniquepid = '035-166' ) ) AND `<table2>`.cellpath LIK... | on 04/14/last year, patient 035-166 has had any p.o. intake?
|
<table0>[table_35952] { <col0>[Date]:[text] <col1>[Tournament]:[text] <col2>[Surface]:[text] <col3>[Opponent]:[text] <col4>[Score]:[text] } | SELECT "Tournament" FROM `<table0>` WHERE "Score" = 'w/o' AND "Date" = 'november 5, 2007' | What is the tournament with a w/o score on November 5, 2007?
|
<table0>[table_12722] { <col0>[Place]:[text] <col1>[Player]:[text] <col2>[Country]:[text] <col3>[Score]:[text] <col4>[par]:[text] } | SELECT "Country" FROM `<table0>` WHERE "To par" = '+2' AND "Score" = '69-73=142' AND "Player" = 'rocco mediate' | When Rocco Mediate has a To par of +2 and a 69-73=142 score, what is the country listed?
|
<table0>[table_204_794] { <col0>[number]:[iec] <col1>[nworld]:[plugs] <col2>[nType]:[text] <col3>[standard]:[text] <col4>[power]:[nrating] <col5>[text]:[earthed] <col6>[text]:[polarised] <col7>[text]:[fused] <col8>[text]:[insulated] <col9>[npins]:[text] <col10>[europlug]:[ncompatible] } | SELECT "iec\nworld plugs\nType", "standard" FROM `<table0>` WHERE id = 1 | what is the first type and standard on the chart
|
<table0>[table_204_168] { <col0>[number]:[date] <col1>[text]:[time] <col2>[text]:[opponent] <col3>[text]:[site] <col4>[text]:[text] <col5>[result]:[text] <col6>[attendance]:[number] <col7>[record]:[text] } | SELECT ( SELECT "attendance" FROM `<table0>` WHERE "date" = '11/25/2013' ) - ( SELECT "attendance" FROM `<table0>` WHERE "date" = '12/21/2013' ) | how much larger was the attendance on 11/25/2013 than 12/21/2013 ?
|
<table0>[department] { <col0>[Department_ID]:[int] <col1>[text]:[Creation] <col2>[text]:[Ranking] <col3>[int]:[Budget_in_Billions] <col4>[real]:[Num_Employees] } <table1>[head] { <col0>[head_ID]:[int] <col1>[name]:[text] <col2>[born_state]:[text] <col3>[age]:[real] } <table2>[management] { <col0>[department_ID]:[int]... | SELECT Creation, SUM( Budget_in_Billions ) FROM `<table0>` ORDER BY Creation | Show sum of budget in each year and bin creation time by year in a line chart, could you show from low to high by the x-axis? |
<table0>[zyjzjlb] { <col0>[CYBQDM]:[text] <col1>[CYBQMC]:[text] <col2>[CYCWH]:[text] <col3>[CYKSDM]:[text] <col4>[CYKSMC]:[text] <col5>[CYSJ]:[time] <col6>[CYZTDM]:[number] <col7>[HZXM]:[text] <col8>[JZKSDM]:[text] <col9>[JZKSMC]:[text] <col10>[JZLSH]:[text] <col11>[text]:[KLX] <col12>[number]:[MZBMLX] <col13>[number]:... | SELECT COUNT( * ) FROM `<table6>` WHERE `<table6>`.JZKSBM = '54818' AND `<table6>`.JZKSRQ BETWEEN '2012-03-10' AND '2017-03-23' UNION SELECT COUNT( * ) FROM `<table1>` WHERE `<table1>`.JZKSBM = '54818' AND `<table1>`.JZKSRQ BETWEEN '2012-03-10' AND '2017-03-23' | 在12年3月10日至17年3月23日这个期间科室54818的门诊量是多少?
|
<table0>[table_name_44] { <col0>[italian]:[VARCHAR] <col1>[common_english]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "glarus" | What is the italian word for Glarus?
|
<table0>[table_20466963_9] { <col0>[guest_3]:[VARCHAR] <col1>[guest_1]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "Jim White" | On episodes where guest 1 is Jim White, who was guest 3? |
<table0>[workplaces] { <col0>[INT]:[state] <col1>[VARCHAR]:[safety_issues] <col2>[INT]:[INSERT] } | SELECT state, MIN( safety_issues ) OVER ( PARTITION BY state ) AS min_safety_issues FROM workplaces; | What is the minimum number of safety issues in a workplace for each state? |
<table0>[Reviewer] { <col0>[rID]:[int] <col1>[name]:[text] } <table1>[Rating] { <col0>[rID]:[int] <col1>[mID]:[int] <col2>[stars]:[int] <col3>[ratingDate]:[date] } <table2>[Movie] { <col0>[mID]:[int] <col1>[title]:[text] <col2>[year]:[int] <col3>[director]:[text] } | SELECT year, COUNT( `<col2>` ) FROM `<table2>` AS T1 JOIN `<table2>` AS T2 ON T1.director = T2.director WHERE T1.title <> T2.title ORDER BY `<col2>` DESC | For directors who had more than one movie, bin the dates of release into Year interval and them compute the total number of movies in each year bucket Show me the result using a line chart, and rank by the year from high to low.
|
<table0>[table_name_17] { <col0>[opponent_in_the_final]:[VARCHAR] <col1>[date]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "november 14, 1994" | Who was played against in the final on November 14, 1994?
|
<table0>[table_54816] { <col0>[Marginal]:[Ordinary] <col1>[Income]:[Tax] <col2>[Rate]:[text] <col3>[Single]:[text] <col4>[Married]:[Filing] <col5>[Jointly]:[Qualified] <col6>[Widow]:[text] <col7>[Married]:[Filing] <col8>[Separately]:[text] <col9>[Head]:[Household] } | SELECT "Married Filing `<col5>` or Qualified Widow( er )" FROM `<table0>` WHERE "Head of Household" = '$117,451–$190,200' | Name the married filing jointly or qualified widow(er) with head of household being $117,451 $190,200
|
<table0>[table_13759592_2] { <col0>[institution]:[VARCHAR] <col1>[founded]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = 1923 | Which institution was founded in 1923? |
<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 diagnoses ON `<table3>`.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON `<table3>`.hadm_id = prescriptions.hadm_id WHERE diagnoses.long_title = "35-36 completed weeks of gestation" AND prescriptions.route = "PR" | count the number of patients whose diagnosis long title is 35-36 completed weeks of gestation and drug route is pr. |
<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 AVG( `<table3>`.age ) FROM `<table3>` WHERE `<table3>`.diagnosis = "T5 FRACTURE" AND `<table3>`.dob_year > "2134" | calculate the average age of patients born after 2134 with t5 fracture primary disease. |
<table0>[ground_service] { <col0>[city_code]:[text] <col1>[airport_code]:[text] <col2>[transport_type]:[text] <col3>[ground_fare]:[int] } <table1>[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]:[te... | SELECT DISTINCT airline.airline_code FROM airline, airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE ( ( CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'BOSTON' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.cit... | list the airlines that have nonstop afternoon flights from BOSTON to OAKLAND |
<table0>[table_name_32] { <col0>[location]:[VARCHAR] <col1>[annual_change]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "7.6%" | What location has an annual change of 7.6%
|
<table0>[military_personnel] { <col0>[INT]:[name] <col1>[TEXT]:[rank] <col2>[TEXT]:[region] <col3>[TEXT]:[INSERT] } | SELECT COUNT( * ) FROM `<table0>` WHERE region = 'Europe'; | Calculate the total number of military personnel in Europe |
<table0>[table_204_969] { <col0>[number]:[composer] <col1>[text]:[title] <col2>[text]:[genre] <col3>[text]:[date] <col4>[number]:[notes] } | SELECT ABS( ( SELECT "date" FROM `<table0>` WHERE "composer" = 'granville bantock' ) - ( SELECT "date" FROM `<table0>` WHERE "composer" = 'pete doherty' ) ) | what is the difference in years of granville bantock 's work compared to pete dohert ? |
<table0>[table_name_91] { <col0>[launched]:[VARCHAR] <col1>[laid_down]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "14 august 1942" | when was the destroyer launched when it was laid down on 14 august 1942?
|
<table0>[table_69384] { <col0>[text]:[League] <col1>[real]:[Cup] <col2>[real]:[League] <col3>[Cup]:[real] <col4>[real]:[Total] } | SELECT MAX( "Total" ) FROM `<table0>` WHERE "FA Cup" = '0' AND "Name" = 'robbie williams category:articles with hcards' AND "League Cup" < '0' | What is the greatest Total, when the FA Cup is 0, when the Name is Robbie Williams Category:Articles with hCards, and when the League Cup is less than 0?
|
<table0>[table_12962773_14] { <col0>[INTEGER]:[player] } | SELECT MAX( no ) FROM `<table0>` WHERE player = "Aleksandar Ćapin" | What number does aleksandar ćapin wear? |
<table0>[Users] { <col0>[number]:[Reputation] <col1>[number]:[CreationDate] <col2>[time]:[DisplayName] <col3>[text]:[LastAccessDate] <col4>[time]:[WebsiteUrl] <col5>[text]:[Location] <col6>[text]:[AboutMe] <col7>[text]:[Views] <col8>[number]:[UpVotes] <col9>[number]:[DownVotes] <col10>[number]:[ProfileImageUrl] <col11>... | SELECT DISTINCT P.OwnerUserId AS "user_link" FROM `<table13>` AS P WHERE P.ParentId = 303988 OR P.ParentId = 303045 ORDER BY 'user_link' DESC | Users with SOReadyToHelp Meta Posts. |
<table0>[table_203_183] { <col0>[number]:[season] <col1>[text]:[tier] <col2>[number]:[division] <col3>[number]:[place] } | SELECT "season" FROM `<table0>` ORDER BY "place" LIMIT 1 | when was their best finish ? |
<table0>[table_23183195_5] { <col0>[free_throws]:[INTEGER] <col1>[steals]:[VARCHAR] } | SELECT MAX( `<col0>` ) FROM `<table0>` WHERE `<col1>` = 4 | Name the most free throws for 4 steals |
<table0>[table_name_58] { <col0>[city]:[VARCHAR] <col1>[state]:[VARCHAR] <col2>[venue]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "texas" AND `<col2>` = "frank erwin center" | Which city in Texas hosts the Frank Erwin center? |
<table0>[weather] { <col0>[date]:[text] <col1>[max_temperature_f]:[number] <col2>[mean_temperature_f]:[number] <col3>[min_temperature_f]:[number] <col4>[max_dew_point_f]:[number] <col5>[mean_dew_point_f]:[number] <col6>[min_dew_point_f]:[number] <col7>[max_humidity]:[number] <col8>[mean_humidity]:[number] <col9>[min_hu... | SELECT `<col0>` FROM `<table0>` WHERE `<col11>` BETWEEN 30.3 AND 31 | What are the dates that have an average sea level pressure between 30.3 and 31?
|
<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 t3.`<table7>`name FROM ( SELECT t2.`<table7>`name, DENSE_RANK( ) OVER ( ORDER BY COUNT( * ) DESC ) AS c1 FROM ( SELECT patient.uniquepid, `<table2>`.`<table2>`time FROM `<table2>` JOIN patient ON `<table2>`.patientunitstayid = patient.patientunitstayid WHERE `<table2>`.`<table2>`name = 'cerebral subdural hematom... | what were the top five most common procedures that were followed within 2 months for patients who were diagnosed with cerebral subdural hematoma this year?
|
<table0>[events] { <col0>[INT]:[type] <col1>[VARCHAR]:[INSERT] } <table1>[attendees] { <col0>[INT]:[event_id] <col1>[INT]:[is_repeat] <col2>[BOOLEAN]:[INSERT] } | SELECT e.type, AVG( CASE WHEN a.is_repeat THEN 1.0 ELSE 0.0 END ) * 100.0 AS repeat_percentage FROM `<table0>` e JOIN attendees a ON e.id = a.event_id GROUP BY e.type; | What is the percentage of repeat attendees for each type of event? |
<table0>[prescriptions] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icustay_id]:[text] <col3>[drug_type]:[text] <col4>[drug]:[text] <col5>[formulary_drug_cd]:[text] <col6>[route]:[text] <col7>[drug_dose]:[text] } <table1>[demographic] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[name]:[text]... | SELECT COUNT( DISTINCT `<table1>`.subject_id ) FROM `<table1>` INNER JOIN prescriptions ON `<table1>`.hadm_id = prescriptions.hadm_id WHERE `<table1>`.dod_year <= "2122.0" AND prescriptions.formulary_drug_cd = "BETH5" | How many patients with drug code beth5 died in or before the year 2122?
|
<table0>[table_name_69] { <col0>[score]:[VARCHAR] <col1>[outcome]:[VARCHAR] <col2>[opponent]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "winner" AND `<col2>` = "angela haynes" | What is Score, when Outcome is Winner, and when Opponent is Angela Haynes? |
<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>[departments] { <col0>[DEPARTMENT_I... | SELECT SALARY, `<col9>` FROM `<table6>` WHERE `<col5>` < '2002-06-21' | For those employees who was hired before 2002-06-21, visualize a scatter chart about the correlation between salary and manager_id . |
<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>[inputevents_cv] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[had... | SELECT COUNT( * ) > 0 FROM `<table10>` WHERE `<table10>`.itemid IN ( SELECT `<table11>`.itemid FROM `<table11>` WHERE `<table11>`.label = 'nucleated red cells' ) AND `<table10>`.hadm_id IN ( SELECT `<table7>`.hadm_id FROM `<table7>` WHERE `<table7>`.subject_id = 32168 AND NOT `<table7>`.dischtime IS NULL ORDER BY `<tab... | has patient 32168 given a test on nucleated red cells during the last hospital visit? |
<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 T1.Name, T1.Code FROM `<table1>` AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder, T1.Name ORDER BY T1.Name DESC | For those records from the products and each product's manufacturer, return a bar chart about the distribution of name and code , and group by attribute founder, and rank by the bars in desc. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.