schema stringlengths 20 14.6k | query stringlengths 17 2.58k | question stringlengths 8 1.06k |
|---|---|---|
<table0>[table_7755] { <col0>[Television]:[service] <col1>[text]:[Country] <col2>[text]:[Content] <col3>[text]:[HDTV] <col4>[text]:[Package] <col5>[Option]:[text] } | SELECT "Television service" FROM `<table0>` WHERE "Content" = 'general television' | Which Television service has a Content of general television?
|
<table0>[Categories] { <col0>[CategoryID]:[integer] <col1>[CategoryName]:[text] <col2>[Description]:[text] } <table1>[Customers] { <col0>[CustomerID]:[integer] <col1>[CustomerName]:[text] <col2>[ContactName]:[text] <col3>[Address]:[text] <col4>[City]:[text] <col5>[PostalCode]:[text] <col6>[Country]:[text] } <table2>[... | SELECT COUNT( T1.CustomerID ) FROM `<table1>` AS T1 INNER JOIN Orders AS T2 ON T1.CustomerID = T2.CustomerID WHERE STRFTIME( '%Y', T2.OrderDate ) = '1996' AND T1.Country = 'UK' | In 1996, how many orders were from customers in the UK? |
<table0>[status] { <col0>[station_id]:[number] <col1>[bikes_available]:[number] <col2>[docks_available]:[number] <col3>[time]:[text] } <table1>[station] { <col0>[number]:[name] <col1>[text]:[lat] <col2>[number]:[long] <col3>[number]:[dock_count] <col4>[number]:[city] <col5>[text]:[installation_date] } <table2>[trip] ... | SELECT start_station_name, start_station_id FROM `<table2>` WHERE start_date LIKE "8/%" GROUP BY start_station_name ORDER BY COUNT( * ) DESC LIMIT 1 | Which start station had the most trips starting from August? Give me the name and id of the station.
|
<table0>[table_72567] { <col0>[Rank]:[real] <col1>[Country]:[text] <col2>[Overall]:[text] <col3>[Justice]:[text] <col4>[Health]:[text] <col5>[Education]:[text] <col6>[Economics]:[text] <col7>[Politics]:[text] } | SELECT "Health" FROM `<table0>` WHERE "Justice" = '80.7' | what's the health score with justice being 80.7
|
<table0>[Rating] { <col0>[stars]:[VARCHAR] <col1>[ratingDate]:[VARCHAR] <col2>[mID]:[VARCHAR] <col3>[rID]:[VARCHAR] } <table1>[Reviewer] { <col0>[name]:[VARCHAR] <col1>[rID]:[VARCHAR] } <table2>[Movie] { <col0>[title]:[VARCHAR] <col1>[mID]:[VARCHAR] } | SELECT T3.name, T2.title, T1.stars, T1.ratingDate FROM `<table0>` AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID JOIN Reviewer AS T3 ON T1.rID = T3.rID ORDER BY T3.name, T2.title, T1.stars | Return reviewer name, movie title, stars, and ratingDate. And sort the data first by reviewer name, then by movie title, and lastly by number of stars. |
<table0>[marine_protected_areas] { <col0>[name]:[TEXT] <col1>[location]:[TEXT] <col2>[avg_depth]:[FLOAT] } | SELECT MAX( avg_depth ) FROM marine_protected_areas; | What is the maximum depth observed for any marine protected area? |
<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 All_Home, AVG( `<col0>` ) FROM `<table0>` GROUP BY `<col9>` ORDER BY `<col9>` | Give me a bar chart for mean team id of each all home, sort from low to high by the bars please. |
<table0>[course] { <col0>[course_id]:[int] <col1>[name]:[varchar] <col2>[department]:[varchar] <col3>[number]:[varchar] <col4>[credits]:[varchar] <col5>[advisory_requirement]:[varchar] <col6>[enforced_requirement]:[varchar] <col7>[description]:[varchar] <col8>[num_semesters]:[int] <col9>[num_enrolled]:[int] <col10>[has... | SELECT COUNT( * ) > 0 FROM course, course_offering, semester WHERE course_offering.start_time < '12:00:00' AND course_offering.start_time >= '08:00:00' AND course.course_id = course_offering.course_id AND course.department = 'MENAS' AND course.number = 334 AND semester.semester = 'WN' AND semester.semester_id = course_... | Are there any morning sessions for MENAS 334 ? |
<table0>[dapps] { <col0>[dapp_id]:[INT] <col1>[dapp_name]:[VARCHAR] <col2>[255]:[total_transactions] <col3>[INT]:[industry_category] <col4>[VARCHAR]:[255] } | SELECT industry_category, SUM( total_transactions ) as total_transactions FROM `<table0>` GROUP BY industry_category ORDER BY total_transactions DESC; | What is the total number of transactions for each industry category, sorted by the total transaction count in descending order? |
<table0>[table_name_5] { <col0>[casualties]:[INTEGER] <col1>[number]:[VARCHAR] } | SELECT AVG( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "u-844" | What is the average number of casualties for the convoy with a number of U-844?
|
<table0>[artist] { <col0>[Famous_Title]:[VARCHAR] <col1>[Age]:[VARCHAR] } | SELECT Famous_Title, `<col1>` FROM `<table0>` ORDER BY `<col1>` DESC | Please list the age and famous title of artists in descending order of age. |
<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>[Employees] { <col0>[Em... | SELECT Date_in_Locaton_To, COUNT( `<col3>` ) FROM `<table5>` GROUP BY `<col1>` | Show the number of documents in different ending date. Bin ending date by weekday and group by location code with a stacked bar chart. |
<table0>[allergy] { <col0>[allergyid]:[number] <col1>[patientunitstayid]:[number] <col2>[drugname]:[text] <col3>[allergyname]:[text] <col4>[allergytime]:[time] } <table1>[patient] { <col0>[uniquepid]:[text] <col1>[patienthealthsystemstayid]:[number] <col2>[patientunitstayid]:[number] <col3>[gender]:[text] <col4>[age]:... | SELECT `<table7>`.observationtime FROM `<table7>` WHERE `<table7>`.`<table1>`unitstayid IN ( SELECT `<table1>`.`<table1>`unitstayid FROM `<table1>` WHERE `<table1>`.`<table1>`healthsystemstayid IN ( SELECT `<table1>`.`<table1>`healthsystemstayid FROM `<table1>` WHERE `<table1>`.uniquepid = '015-12508' ) ) AND `<table7>... | when did patient 015-12508 have the first sao2 to be less than 93.0 until 931 days ago?
|
<table0>[lab] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[itemid]:[text] <col3>[charttime]:[text] <col4>[flag]:[text] <col5>[value_unit]:[text] <col6>[label]:[text] <col7>[fluid]:[text] } <table1>[diagnoses] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[... | SELECT COUNT( DISTINCT `<table3>`.subject_id ) FROM `<table3>` WHERE `<table3>`.discharge_location = "DISCH-TRAN TO PSYCH HOSP" AND `<table3>`.diagnosis = "RUQ PAIN" | How many patients discharge location is disch-tran to psych hosp and primary diagnosis is ruq pain? |
<table0>[d_icd_procedures] { <col0>[row_id]:[number] <col1>[icd9_code]:[text] <col2>[short_title]:[text] <col3>[long_title]:[text] } <table1>[outputevents] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[charttime]:[time] <col5>[itemid]:[number] <col6>[... | SELECT COUNT( DISTINCT t2.subject_id ) FROM ( SELECT t1.subject_id, t1.charttime FROM ( SELECT `<table12>`.subject_id, `<table7>`.charttime FROM `<table7>` JOIN `<table12>` ON `<table7>`.hadm_id = `<table12>`.hadm_id WHERE `<table7>`.icd9_code = ( SELECT `<table4>`.icd9_code FROM `<table4>` WHERE `<table4>`.short_title... | how many patients died within 2 months after being diagnosed until 4 years ago with alkalosis? |
<table0>[grants] { <col0>[INT]:[department] <col1>[VARCHAR]:[FLOAT] } | SELECT AVG( amount ) FROM `<table0>` WHERE department = 'Sciences'; | Calculate the average grant amount awarded to the 'Sciences' department |
<table0>[requirement] { <col0>[requirement_id]:[int] } <table1>[semester] { <col0>[semester_id]:[int] } <table2>[instructor] { <col0>[instructor_id]:[int] <col1>[name]:[varchar] <col2>[uniqname]:[varchar] } <table3>[jobs] { <col0>[job_id]:[int] <col1>[job_title]:[varchar] <col2>[description]:[varchar] <col3>[require... | SELECT COUNT( * ) > 0 FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND course.department = 'CHE' AND course.number = 995 AND semester.semester = 'Spring-Summer' AND semester.semester_id = course_offering.semester AND semester.year = 2003 | During the Spring-Summer 2003 will the CHE 995 class be available ?
|
<table0>[table_28138035_4] { <col0>[year_location]:[VARCHAR] <col1>[womens_singles]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "Haruna Fukuoka" | Name the year location for haruna fukuoka
|
<table0>[DistrictZCourses] { <col0>[courseID]:[INT] <col1>[instructorName]:[VARCHAR] <col2>[courseType]:[VARCHAR] } | SELECT COUNT( DISTINCT `<col1>` ) FROM `<table0>` WHERE `<col2>` = 'open pedagogy'; | Find the number of unique instructors who have taught open pedagogy courses in 'District Z'. |
<table0>[ev_id] { <col0>[INT]:[TEXT] <col1>[model]:[TEXT] <col2>[year]:[INT] <col3>[CO2_emissions]:[FLOAT] } | SELECT AVG( CO2_emissions ) FROM ev WHERE make IS NOT NULL AND model IS NOT NULL AND year IS NOT NULL AND state = 'California'; | Calculate the average CO2 emissions of electric vehicles in California. |
<table0>[driver] { <col0>[Driver_ID]:[int] <col1>[text]:[Party] <col2>[text]:[Home_city] <col3>[text]:[Age] } <table1>[school] { <col0>[School_ID]:[int] <col1>[Grade]:[text] <col2>[School]:[text] <col3>[Location]:[text] <col4>[Type]:[text] } <table2>[school_bus] { <col0>[School_ID]:[int] <col1>[Driver_ID]:[int] <col2... | SELECT Name, Age FROM `<table0>` ORDER BY Age | Show the name and age for all drivers with a bar chart, and display by the total number from low to high. |
<table0>[hz_info] { <col0>[text]:[KLX] <col1>[number]:[RYBH] <col2>[text]:[YLJGDM] } <table1>[zyjzjlb_jybgb] { <col0>[YLJGDM_ZYJZJLB]:[text] <col1>[BGDH]:[number] <col2>[YLJGDM]:[number] } <table2>[zyjzjlb] { <col0>[CYBQDM]:[text] <col1>[CYBQMC]:[text] <col2>[CYCWH]:[text] <col3>[CYKSDM]:[text] <col4>[CYKSMC]:[text] ... | SELECT `<table5>`.SHRGH, `<table5>`.SHRXM FROM `<table5>` WHERE `<table5>`.JZLSH = '71126102589' | 在医疗就诊71126102589中给赵立辉这个病人审核检验报告的人员和工号分别是什么
|
<table0>[table_name_73] { <col0>[total_points]:[INTEGER] <col1>[details]:[VARCHAR] } | SELECT MIN( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "2001 nrl grand final" | For the match that had detail of 2001 nrl grand final, what was the lowest total points? |
<table0>[table_name_69] { <col0>[to_par]:[VARCHAR] <col1>[country]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "south korea" | What is South Korea's to par value?
|
<table0>[comment_instructor] { <col0>[instructor_id]:[int] <col1>[student_id]:[int] <col2>[score]:[int] <col3>[comment_text]:[varchar] } <table1>[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... | SELECT DISTINCT `<table7>`.department, `<table7>`.name, `<table7>`.number FROM `<table7>` INNER JOIN program_`<table7>` ON program_`<table7>`.`<table7>`_id = `<table7>`.`<table7>`_id WHERE `<table7>`.credits = 17 AND program_`<table7>`.category LIKE 'ULCS' | What upper-level classes offer 17 credits ?
|
<table0>[table_name_77] { <col0>[date]:[VARCHAR] <col1>[winning_driver]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "pedro rodríguez" | When was pedro rodr guez the winning driver? |
<table0>[programs] { <col0>[INT]:[name] <col1>[VARCHAR]:[255] } <table1>[donations] { <col0>[INT]:[program_id] <col1>[INT]:[DECIMAL] } | SELECT program_id, SUM( amount ) OVER ( PARTITION BY program_id ) AS total_donations FROM donations; | What is the total number of donations received by each program? |
<table0>[diagnoses] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table1>[procedures] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table2>[demogr... | SELECT COUNT( DISTINCT `<table2>`.subject_id ) FROM `<table2>` INNER JOIN diagnoses ON `<table2>`.hadm_id = diagnoses.hadm_id WHERE `<table2>`.age < "30" AND diagnoses.long_title = "Pure hyperglyceridemia" | report the number of patients with the diagnoses of pure hyperglyceridemia who are younger than 30 years of age. |
<table0>[table_name_95] { <col0>[lost]:[INTEGER] <col1>[goals_scored]:[VARCHAR] <col2>[played]:[VARCHAR] } | SELECT AVG( `<col0>` ) FROM `<table0>` WHERE `<col1>` > 20 AND `<col2>` < 18 | What is the average value for Lost, when the value for Goals Scored is greater than 20, and when the value for Played is less than 18?
|
<table0>[table_name_66] { <col0>[date]:[VARCHAR] <col1>[home_team]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "south melbourne" | When did South Melbourne play as the home team?
|
<table0>[table_203_131] { <col0>[number]:[pos] <col1>[number]:[car] <col2>[number]:[driver] <col3>[text]:[text] <col4>[team]:[text] } | SELECT "driver" FROM `<table0>` WHERE "pos." = 1 | who placed first in the race ? |
<table0>[genre] { <col0>[integer]:[genre_name] } <table1>[game] { <col0>[integer]:[genre_id] <col1>[integer]:[game_name] } <table2>[platform] { <col0>[integer]:[platform_name] } <table3>[publisher] { <col0>[integer]:[publisher_name] } <table4>[game_publisher] { <col0>[integer]:[game_id] <col1>[integer]:[publisher_i... | SELECT COUNT( T.id ) FROM `<table5>` AS T WHERE T.release_year = 2001 | How many games were released in 2001? |
<table0>[diagnosis] { <col0>[diagnosisid]:[number] <col1>[patientunitstayid]:[number] <col2>[diagnosisname]:[text] <col3>[diagnosistime]:[time] <col4>[icd9code]:[text] } <table1>[treatment] { <col0>[treatmentid]:[number] <col1>[patientunitstayid]:[number] <col2>[treatmentname]:[text] <col3>[treatmenttime]:[time] } <t... | SELECT MIN( `<table3>`.`<table3>`result ) FROM `<table3>` WHERE `<table3>`.`<table5>`unitstayid IN ( SELECT `<table5>`.`<table5>`unitstayid FROM `<table5>` WHERE `<table5>`.`<table5>`healthsystemstayid IN ( SELECT `<table5>`.`<table5>`healthsystemstayid FROM `<table5>` WHERE `<table5>`.uniquepid = '021-95970' ) ) AND `... | oh what is the minimum value of tv on patient 021-95970 in 12/2105? |
<table0>[Assessment_Notes] { <col0>[notes_id]:[INTEGER] <col1>[student_id]:[INTEGER] <col2>[teacher_id]:[INTEGER] <col3>[date_of_notes]:[DATETIME] <col4>[text_of_notes]:[VARCHAR] <col5>[255]:[other_details] <col6>[VARCHAR]:[255] } <table1>[Behavior_Incident] { <col0>[incident_id]:[INTEGER] <col1>[incident_type_code]:[... | SELECT date_address_from, AVG( `<col4>` ) FROM `<table10>` GROUP BY `<col5>` ORDER BY `<col4>` DESC | Give me the comparison about the average of monthly_rental over the date_address_from , and group by attribute other_details and bin date_address_from by time by a bar chart.
|
<table0>[Accounts] { <col0>[customer_id]:[VARCHAR] } <table1>[Customers] { <col0>[customer_first_name]:[VARCHAR] <col1>[customer_last_name]:[VARCHAR] <col2>[customer_id]:[VARCHAR] } <table2>[Customers] { <col0>[customer_first_name]:[VARCHAR] <col1>[customer_last_name]:[VARCHAR] } | SELECT customer_first_name, `<col1>` FROM `<table1>` EXCEPT SELECT T1.customer_first_name, T1.customer_last_name FROM `<table1>` AS T1 JOIN Accounts AS T2 ON T1.customer_id = T2.customer_id | Show the first names and last names of customers without any account. |
<table0>[semester] { <col0>[semester_id]:[int] } <table1>[student] { <col0>[student_id]:[int] <col1>[lastname]:[varchar] <col2>[firstname]:[varchar] <col3>[program_id]:[int] <col4>[declare_major]:[varchar] <col5>[total_credit]:[int] <col6>[total_gpa]:[float] <col7>[entered_as]:[varchar] <col8>[admit_term]:[int] <col9>... | SELECT DISTINCT `<table14>`.department, `<table14>`.name, `<table14>`.number, semester.semester FROM `<table14>` INNER JOIN `<table14>`_offering ON `<table14>`.`<table14>`_id = `<table14>`_offering.`<table14>`_id INNER JOIN semester ON semester.semester_id = `<table14>`_offering.semester INNER JOIN program_`<table14>` ... | Which courses would fulfill the ULCS requirement in the Fall or Winter ?
|
<table0>[t_kc22] { <col0>[MED_EXP_DET_ID]:[text] <col1>[OVERALL_CD_ORG]:[text] <col2>[OVERALL_CD_PERSON]:[text] <col3>[MED_CLINIC_ID]:[text] <col4>[MED_EXP_BILL_ID]:[text] <col5>[SOC_SRT_DIRE_CD]:[text] <col6>[SOC_SRT_DIRE_NM]:[text] <col7>[DIRE_TYPE]:[number] <col8>[CHA_ITEM_LEV]:[number] <col9>[MED_INV_ITEM_TYPE]:[te... | SELECT `<col3>` FROM `<table1>` WHERE `<col7>` = '52604335' AND `<col5>` BETWEEN '2010-01-31' AND '2015-12-04' | 列出患者52604335就诊结算日期在10年1月31日到15年12月4日内的所有医疗就诊记录编号都分别是有哪些?
|
<table0>[course_prerequisite] { <col0>[pre_course_id]:[int] <col1>[course_id]:[int] } <table1>[area] { <col0>[course_id]:[int] } <table2>[offering_instructor] { <col0>[offering_instructor_id]:[int] <col1>[offering_id]:[int] <col2>[instructor_id]:[int] } <table3>[student] { <col0>[student_id]:[int] <col1>[lastname]:[... | SELECT DISTINCT `<col5>` FROM `<table14>` WHERE `<col2>` = 'MATSCIE' AND `<col3>` = 693 | Are there any courses I should take prior to taking MATSCIE 693 that would help me ?
|
<table0>[team_franchise] { <col0>[franchise_id]:[TEXT] <col1>[franchise_name]:[TEXT] <col2>[active]:[TEXT] <col3>[na_assoc]:[TEXT] } <table1>[player_award_vote] { <col0>[award_id]:[TEXT] <col1>[year]:[INTEGER] <col2>[league_id]:[TEXT] <col3>[player_id]:[TEXT] <col4>[points_won]:[NUMERIC] <col5>[points_max]:[INTEGER] <... | SELECT year, SUM( `<col8>` ) FROM `<table19>` ORDER BY `<col0>` DESC | Show the trend about the number of attendance at home games change over the years, bin year into year interval, I want to show in desc by the X.
|
<table0>[table_25851971_1] { <col0>[INTEGER]:[written_by] } | SELECT MAX( no ) FROM `<table0>` WHERE written_by = "Karin Gist" | What episode number was written by Karin Gist?
|
<table0>[lab] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[itemid]:[text] <col3>[charttime]:[text] <col4>[flag]:[text] <col5>[value_unit]:[text] <col6>[label]:[text] <col7>[fluid]:[text] } <table1>[diagnoses] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[... | SELECT COUNT( DISTINCT `<table2>`.subject_id ) FROM `<table2>` INNER JOIN lab ON `<table2>`.hadm_id = lab.hadm_id WHERE `<table2>`.dob_year < "2056" AND lab.fluid = "Ascites" | give me the number of patients whose year of birth is less than 2056 and lab test fluid is ascites?
|
<table0>[code_description] { <col0>[code]:[varchar] <col1>[description]:[text] } <table1>[flight_leg] { <col0>[flight_id]:[int] <col1>[leg_number]:[int] <col2>[leg_flight]:[int] } <table2>[aircraft] { <col0>[aircraft_code]:[varchar] <col1>[aircraft_description]:[varchar] <col2>[manufacturer]:[varchar] <col3>[basic_ty... | SELECT DISTINCT flight.flight_id FROM `<table22>` AS AIRPORT_SERVICE_0, `<table22>` AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, flight WHERE ( ( ( flight.departure_time BETWEEN 0 AND 1200 ) AND date_day.day_number = 21 AND date_day.month_number = 2 AND date_day.year = 1991 AND days.day_name = ... | show me flights from PITTSBURGH to ATLANTA on monday morning |
<table0>[VendorCategory] { <col0>[VendorID]:[INT] } <table1>[MenuItems] { <col0>[MenuItemID]:[INT] <col1>[VendorID]:[INT] <col2>[MenuItemName]:[VARCHAR] <col3>[MenuItemType]:[VARCHAR] } | SELECT COUNT( * ) FROM `<table1>` WHERE `<col1>` IN ( SELECT `<col1>` FROM `<table0>` WHERE `<table0>` = 'Organic' ) AND `<col3>` = 'Vegetarian'; | How many vegetarian dishes are offered by organic vendors? |
<table0>[users] { <col0>[userid]:[integer] <col1>[age]:[text] <col2>[u_gender]:[text] <col3>[occupation]:[text] } <table1>[directors] { <col0>[directorid]:[integer] <col1>[d_quality]:[integer] <col2>[avg_revenue]:[integer] } <table2>[actors] { <col0>[actorid]:[integer] <col1>[a_gender]:[text] <col2>[a_quality]:[integ... | SELECT T1.directorid FROM `<table1>` AS T1 INNER JOIN movies2`<table1>` AS T2 ON T1.directorid = T2.directorid WHERE T1.d_quality = 5 GROUP BY T1.directorid ORDER BY COUNT( T2.movieid ) DESC LIMIT 1 | Which directors with the best quality directed the most films? |
<table0>[table_19159] { <col0>[Year]:[real] <col1>[1st]:[District] <col2>[text]:[2nd] <col3>[District]:[text] <col4>[3rd]:[District] <col5>[text]:[4th] <col6>[District]:[text] <col7>[5th]:[District] } | SELECT "Year" FROM `<table0>` WHERE "2nd District" = 'David L. Baker' AND "1st District" = 'Cecil M. Featherly' | List all the years with Cecil M. Featherly in the 1st district and David L. Baker in the 2nd district?
|
<table0>[lab] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[itemid]:[text] <col3>[charttime]:[text] <col4>[flag]:[text] <col5>[value_unit]:[text] <col6>[label]:[text] <col7>[fluid]:[text] } <table1>[diagnoses] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[... | SELECT COUNT( DISTINCT `<table2>`.subject_id ) FROM `<table2>` INNER JOIN lab ON `<table2>`.hadm_id = lab.hadm_id WHERE `<table2>`.admityear < "2194" AND lab.flag = "abnormal" | how many patients are admitted in the year before 2194 and with results as abnormal status in the lab test?
|
<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>[VoteTypes] { <col0>[number]:[... | SELECT ReviewTasks.Id, ReviewTasks.CreationDate, ReviewTaskTypes.Name AS ReviewType, ReviewTaskResultTypes.Name AS ResultType FROM ReviewTasks, ReviewTaskResults, ReviewTaskResultTypes, ReviewTaskTypes WHERE ReviewTasks.CompletedByReviewTaskId = ReviewTaskResults.Id AND ReviewTaskResultTypes.Id = ReviewTaskResults.Revi... | Filterable history of Review Types and Results.
|
<table0>[table_name_62] { <col0>[nation]:[VARCHAR] <col1>[athlete]:[VARCHAR] <col2>[medal_count]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "paavo nurmi" AND `<col2>` < 12 | What nation has paavo nurmi as the athlete, with a medal count less than 12?
|
<table0>[table_34510] { <col0>[Rank]:[text] <col1>[Player]:[text] <col2>[Position]:[text] <col3>[Career]:[text] <col4>[Points]:[real] } | SELECT SUM( "Points" ) FROM `<table0>` WHERE "Rank" = '61t' | What is the sum of the points for the player who was a rank of 61t?
|
<table0>[table_name_94] { <col0>[place]:[VARCHAR] <col1>[comp]:[VARCHAR] <col2>[date]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "ech" AND `<col2>` = "1989" | What's the place of 1989 with a comp of ECH? |
<table0>[CountryRegion] { <col0>[CountryRegionCode]:[text] <col1>[text]:[ModifiedDate] } <table1>[Culture] { <col0>[CultureID]:[text] <col1>[text]:[ModifiedDate] } <table2>[Currency] { <col0>[CurrencyCode]:[text] <col1>[text]:[ModifiedDate] } <table3>[CountryRegionCurrency] { <col0>[CountryRegionCode]:[text] <col1>[... | SELECT T2.Name FROM `<table41>` AS T1 INNER JOIN Vendor AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T1.ProductID = 348 ORDER BY T1.AverageLeadTime ASC LIMIT 1 | Find the vendor with the least average lead time for Product ID 348. |
<table0>[gymnast] { <col0>[gymnast_id]:[number] <col1>[floor_exercise_points]:[number] <col2>[pommel_horse_points]:[number] <col3>[rings_points]:[number] <col4>[vault_points]:[number] <col5>[parallel_bars_points]:[number] <col6>[horizontal_bar_points]:[number] <col7>[total_points]:[number] } <table1>[people] { <col0>[... | SELECT T2.hometown FROM `<table0>` AS T1 JOIN people AS T2 ON T1.`<table0>`_id = T2.people_id GROUP BY T2.hometown ORDER BY COUNT( * ) DESC LIMIT 1 | Return the hometown that is most common among gymnasts.
|
<table0>[traditional_arts] { <col0>[INT]:[name] <col1>[TEXT]:[type] <col2>[TEXT]:[region] <col3>[TEXT]:[INSERT] } | SELECT COUNT( * ) FROM `<table0>` WHERE region = 'Europe'; | How many traditional arts are practiced in Europe? |
<table0>[ReviewTaskResults] { <col0>[number]:[ReviewTaskId] <col1>[number]:[ReviewTaskResultTypeId] <col2>[number]:[CreationDate] <col3>[time]:[RejectionReasonId] <col4>[number]:[Comment] } <table1>[Badges] { <col0>[number]:[UserId] <col1>[number]:[text] <col2>[Date]:[time] <col3>[Class]:[number] <col4>[TagBased]:[boo... | SELECT TIME_TO_STR( `<table13>`.CreationDate, '%h' ) AS Hour, COUNT( `<table13>`.Id ) AS Questions FROM `<table13>` WHERE PostTypeId = 1 GROUP BY TIME_TO_STR( `<table13>`.CreationDate, '%h' ) ORDER BY TIME_TO_STR( `<table13>`.CreationDate, '%h' ) | Questions by Time of Day. Designed to consider whether 'night' questions have more visibility than 'day' questions |
<table0>[table_name_72] { <col0>[points]:[VARCHAR] <col1>[constructor]:[VARCHAR] <col2>[wins]:[VARCHAR] } | SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "citroën total world rally team" AND `<col2>` < 7 | what is the total number of points when the constructor is citroën total world rally team and the wins is less than 7? |
<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 MIN( t1.c1 ) FROM ( SELECT SUM( `<table15>`.`<table15>` ) AS c1 FROM `<table15>` WHERE `<table15>`.hadm_id IN ( SELECT `<table12>`.hadm_id FROM `<table12>` WHERE `<table12>`.icd9_code = ( SELECT `<table11>`.icd9_code FROM `<table11>` WHERE `<table11>`.short_title = 'fiber-optic bronchoscopy' ) ) GROUP BY `<table... | what is the hospitals minimum cost that involves a procedure called a fiber-optic bronchoscopy? |
<table0>[table_53070] { <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 "Date" FROM `<table0>` WHERE "Home `<col2>` score" = '8.9 ( 57 )' | When was the game where the home team score was 8.9 (57)? |
<table0>[community_initiatives] { <col0>[INT]:[initiative_name] <col1>[VARCHAR]:[100] <col2>[location]:[VARCHAR] <col3>[start_date]:[DATE] <col4>[end_date]:[DATE] <col5>[budget]:[DECIMAL] <col6>[duration]:[INT] } | INSERT INTO community_initiatives ( id, initiative_name, location, start_date, end_date, budget, duration ) VALUES ( 3, 'Fair Trade Marketing Support', 'India', '2022-06-01', '2024-05-31', 150000.00, 24 ); | Insert a new community development initiative in India, 'Fair Trade Marketing Support', started on '2022-06-01' with a budget of 150000.00 and a duration of 24 months. |
<table0>[table_name_55] { <col0>[year]:[INTEGER] <col1>[mixed_doubles]:[VARCHAR] } | SELECT AVG( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "mika heinonen susanna dahlberg" | When did mika heinonen susanna dahlberg win mixed doubles?
|
<table0>[table_name_59] { <col0>[visitor]:[VARCHAR] <col1>[date]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "march 27" | Who was the visitor on March 27? |
<table0>[garment_sales] { <col0>[sales_id]:[INT] <col1>[PRIMARY]:[KEY] <col2>[garment_id]:[INT] <col3>[store_id]:[INT] <col4>[quantity]:[INT] <col5>[price]:[DECIMAL] <col6>[date]:[DATE] } <table1>[garments] { <col0>[garment_id]:[INT] <col1>[PRIMARY]:[KEY] <col2>[garment_name]:[TEXT] <col3>[garment_category]:[TEXT] <co... | SELECT g.garment_category, SUM( gs.quantity ) as total_quantity FROM `<table0>` gs JOIN garments g ON gs.garment_id = g.garment_id GROUP BY g.garment_category; | What is the total quantity of garments sold per garment category? |
<table0>[wrestler] { <col0>[Wrestler_ID]:[int] <col1>[text]:[Reign] <col2>[text]:[Days_held] <col3>[text]:[Location] <col4>[text]:[Event] } <table1>[Elimination] { <col0>[Elimination_ID]:[text] <col1>[Wrestler_ID]:[text] <col2>[Team]:[text] <col3>[Eliminated_By]:[text] <col4>[Elimination_Move]:[text] <col5>[Time]:[tex... | SELECT Team, COUNT( * ) FROM `<table1>` GROUP BY `<col2>` | Return a bar chart on how many eliminations did each team have?
|
<table0>[lists] { <col0>[user_id]:[integer] <col1>[list_id]:[integer] <col2>[list_title]:[text] <col3>[list_movie_number]:[integer] <col4>[list_update_timestamp_utc]:[text] <col5>[list_creation_timestamp_utc]:[text] <col6>[list_followers]:[integer] <col7>[list_url]:[text] <col8>[list_comments]:[integer] <col9>[list_des... | SELECT DISTINCT T2.movie_title, T2.movie_popularity FROM `<table4>` AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T1.rating_score = 5 | List all movies with the best rating score. State the movie title and number of Mubi user who loves the movie. |
<table0>[location] { <col0>[locationID]:[integer] <col1>[locationcity]:[text] <col2>[address]:[text] <col3>[state]:[text] <col4>[zipcode]:[integer] <col5>[officephone]:[text] } <table1>[position] { <col0>[positionID]:[integer] <col1>[positiontitle]:[text] <col2>[educationrequired]:[text] <col3>[minsalary]:[text] <col4... | SELECT T2.maxsalary, T2.minsalary, T2.positiontitle FROM `<table2>` AS T1 INNER JOIN position AS T2 ON T1.positionID = T2.positionID WHERE T1.firstname = 'Bill' AND T1.lastname = 'Marlin' | What are the maximum and minimum salary range and position title of Bill Marlin? |
<table0>[table_name_83] { <col0>[outcome]:[VARCHAR] <col1>[tournament]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "tokyo" | what is the outcome when the tournament is tokyo? |
<table0>[table_22905641_2] { <col0>[date]:[VARCHAR] <col1>[circuit]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "Symmons Plains Raceway" | What date was the race at the Symmons Plains Raceway?
|
<table0>[airport_service] { <col0>[city_code]:[varchar] <col1>[airport_code]:[varchar] <col2>[miles_distant]:[int] <col3>[direction]:[varchar] <col4>[minutes_distant]:[int] } <table1>[equipment_sequence] { <col0>[aircraft_code_sequence]:[varchar] <col1>[aircraft_code]:[varchar] } <table2>[flight_stop] { <col0>[flight... | SELECT DISTINCT flight.flight_id FROM `<table0>` AS AIRPORT_SERVICE_0, `<table0>` 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 = 'SAN FRANCISCO' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'PHILADELPH... | i need a flight from SAN FRANCISCO to PHILADELPHIA |
<table0>[prescriptions] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[startdate]:[time] <col4>[enddate]:[time] <col5>[drug]:[text] <col6>[dose_val_rx]:[text] <col7>[dose_unit_rx]:[text] <col8>[route]:[text] } <table1>[icustays] { <col0>[row_id]:[number] <col1>[subject_id]:[numbe... | SELECT DISTINCT `<table10>`.`<table10>` FROM `<table10>` WHERE `<table10>`.event_type = '`<table12>`' AND `<table10>`.event_id IN ( SELECT `<table12>`.row_id FROM `<table12>` WHERE `<table12>`.itemid IN ( SELECT `<table16>`.itemid FROM `<table16>` WHERE `<table16>`.label = 'cd3 %' ) ) | how much does it cost to have a cd3 % lab test.
|
<table0>[borders] { <col0>[Country1]:[text] <col1>[Country2]:[text] <col2>[Length]:[real] } <table1>[city] { <col0>[text]:[Country] <col1>[text]:[Province] <col2>[text]:[Population] <col3>[integer]:[Longitude] <col4>[real]:[Latitude] } <table2>[continent] { <col0>[text]:[Area] } <table3>[country] { <col0>[text]:[Cod... | SELECT Country, Name FROM `<table7>` AS T1 WHERE Percentage < 100 AND Percentage = ( SELECT MAX( Percentage ) FROM `<table7>` AS T2 WHERE T1.Country = T2.Country ) | In countries where there is more than one ethnic group, name the ethnic group with the greatest presence in each country and the country to which it corresponds. |
<table0>[portland_housing] { <col0>[INT]:[type] <col1>[VARCHAR]:[price] <col2>[INT]:[wheelchair_access] <col3>[BOOLEAN]:[INSERT] } | SELECT * FROM `<table0>` WHERE type = 'affordable' AND wheelchair_access = true; | Identify the wheelchair-accessible and affordable housing units in Portland. |
<table0>[lapTimes] { <col0>[raceId]:[INTEGER] <col1>[driverId]:[INTEGER] <col2>[lap]:[INTEGER] <col3>[position]:[INTEGER] <col4>[time]:[TEXT] <col5>[milliseconds]:[INTEGER] } <table1>[circuits] { <col0>[circuitId]:[INTEGER] <col1>[circuitRef]:[TEXT] <col2>[name]:[TEXT] <col3>[location]:[TEXT] <col4>[country]:[TEXT] <c... | SELECT name, COUNT( `<col4>` ) FROM `<table4>` WHERE `<col1>` BETWEEN 2009 AND 2011 GROUP BY `<col4>` ORDER BY COUNT( `<col4>` ) | A bar chart for what are the number of the names of all races held between 2009 and 2011?, could you sort by the Y-axis in ascending?
|
<table0>[table_name_59] { <col0>[VARCHAR]:[lead] } | SELECT third FROM `<table0>` WHERE lead = "holger höhne" | When did holger höhne come in third? |
<table0>[table_26556] { <col0>[series]:[real] <col1>[season]:[real] <col2>[Title]:[text] <col3>[Directed]:[text] <col4>[Written]:[text] <col5>[Original]:[air] <col6>[date]:[text] <col7>[Production]:[code] } | SELECT COUNT( "Directed by" ) FROM `<table0>` WHERE "Title" = 'Odd Man In' | How many people directed 'odd man in'?
|
<table0>[Funding] { <col0>[program_name]:[VARCHAR] <col1>[255]:[funding_source] <col2>[VARCHAR]:[255] <col3>[amount_received]:[DECIMAL] } | SELECT SUM( `<col3>` ) FROM `<table0>` WHERE `<col0>` = 'Music for the Community' AND funding_source = 'Private Donor'; | What is the total funding received by 'Music for the Community' from private sources? |
<table0>[ingredients] { <col0>[INT]:[dish] <col1>[TEXT]:[ingredient] <col2>[TEXT]:[cost] <col3>[FLOAT]:[INSERT] } | SELECT SUM( cost ) FROM ingredients; | What is the total cost of ingredients for all dishes in the ingredients table? |
<table0>[table_name_2] { <col0>[date]:[VARCHAR] <col1>[tie_no]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "5" | What was the date of tie number 5? |
<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>` WHERE `<table0>`.diagnosis = "SYNCOPE;TELEMETRY" AND `<table0>`.dod_year <= "2179.0" | how many patients whose primary disease was syncope;telemetry died in or before year 2179? |
<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 `<table4>`.`<table4>`name FROM `<table4>` WHERE `<table4>`.`<table3>`unitstayid IN ( SELECT `<table3>`.`<table3>`unitstayid FROM `<table3>` WHERE `<table3>`.`<table3>`healthsystemstayid IN ( SELECT `<table3>`.`<table3>`healthsystemstayid FROM `<table3>` WHERE `<table3>`.uniquepid = '005-46456' ) ) AND DATETIME( ... | what was the last diagnosis for patient 005-46456 in the last year. |
<table0>[table_name_66] { <col0>[week]:[VARCHAR] <col1>[opponent]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "detroit lions" | On what Week was the Detroit Lions the Opponent? |
<table0>[table_name_20] { <col0>[episodes]:[VARCHAR] <col1>[title]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "jewboy" | what episode is called jewboy
|
<table0>[disaster_response] { <col0>[hospitals]:[INT] <col1>[name]:[VARCHAR] <col2>[capacity]:[INT] <col3>[location]:[VARCHAR] } | SELECT COUNT( * ) FROM disaster_response.hospitals; | How many hospitals are present in the 'disaster_response' schema? |
<table0>[table_name_21] { <col0>[mission]:[VARCHAR] <col1>[date]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "2003 apr 1" | Which Mission is on 2003 apr 1?
|
<table0>[table_383] { <col0>[District]:[real] <col1>[County]:[Represented] <col2>[text]:[Member] <col3>[Senator]:[text] <col4>[Party]:[text] <col5>[Elected]:[real] <col6>[Committee]:[text] } | SELECT "Member Senator" FROM `<table0>` WHERE "District" = '24' | Who is the senator for district 24?
|
<table0>[flu_vaccine_distribution] { <col0>[INT]:[PRIMARY] <col1>[KEY]:[hospital_id] <col2>[INT]:[month] <col3>[VARCHAR]:[255] <col4>[quantity_distributed]:[INT] } | INSERT INTO flu_vaccine_distribution ( id, hospital_id, month, quantity_distributed ) VALUES ( 1, 1, 'January', 500 ), ( 2, 1, 'February', 600 ), ( 3, 2, 'January', 700 ); | Create a table for storing monthly flu vaccine distribution |
<table0>[diagnoses] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table1>[procedures] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table2>[demogr... | SELECT COUNT( DISTINCT `<table2>`.subject_id ) FROM `<table2>` INNER JOIN diagnoses ON `<table2>`.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON `<table2>`.hadm_id = prescriptions.hadm_id WHERE diagnoses.short_title = "Alzheimer's disease" AND prescriptions.route = "PO/NG" | how many patients whose diagnoses short title is alzheimer's disease and drug route is po/ng? |
<table0>[table_204_429] { <col0>[number]:[battle] <col1>[text]:[location] <col2>[text]:[date] <col3>[text]:[engagement] <col4>[remarks]:[text] <col5>[victor]:[text] } | SELECT "victor" FROM `<table0>` GROUP BY "victor" HAVING COUNT( * ) >= 6 | which victor held at least six victories ?
|
<table0>[table_dev_15] { <col0>[int]:[hemoglobin_a1c_hba1c] <col1>[float]:[hepatic_enzymes] <col2>[bool]:[platelet_count] <col3>[float]:[liver_disease] <col4>[bool]:[hba1c] <col5>[float]:[triglyceride_tg] <col6>[float]:[NOUSE] } | SELECT * FROM `<table0>` WHERE liver_disease = 1 OR hepatic_enzymes = 1 | diagnosis of liver disease or hepatic enzymes
|
<table0>[Catalog_Contents_Additional_Attributes] { <col0>[catalog_entry_id]:[INTEGER] <col1>[catalog_level_number]:[INTEGER] <col2>[attribute_id]:[INTEGER] <col3>[attribute_value]:[VARCHAR] } <table1>[Catalog_Contents] { <col0>[catalog_entry_id]:[INTEGER] <col1>[catalog_level_number]:[INTEGER] <col2>[parent_entry_id]:... | SELECT attribute_name, COUNT( `<col1>` ) FROM `<table4>` AS t1 JOIN Catalog_Contents_Additional_Attributes AS t2 ON t1.attribute_id = t2.attribute_id WHERE t2.attribute_value = 0 GROUP BY `<col1>` ORDER BY `<col1>` | Compute how many attributes in each name of the attribute definitions with attribute value 0 Show the result with a bar chart, sort in ascending by the x axis. |
<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 HIRE_DATE, AVG( `<col7>` ) FROM `<table1>` WHERE NOT `<col10>` IN ( SELECT `<col10>` FROM `<table4>` WHERE `<col9>` BETWEEN 100 AND 200 ) ORDER BY AVG( `<col7>` ) | For those employees who do not work in departments with managers that have ids between 100 and 200, find hire_date and the average of salary bin hire_date by time, and visualize them by a bar chart, and order by the Y-axis in ascending. |
<table0>[sales] { <col0>[sale_id]:[INT] <col1>[sale_date]:[DATE] <col2>[dish_id]:[INT] <col3>[quantity]:[INT] <col4>[price]:[DECIMAL] } | SELECT SUM( `<col3>` * `<col4>` ) as daily_revenue FROM `<table0>` WHERE `<col1>` BETWEEN DATE_SUB( CURRENT_DATE, INTERVAL 7 DAY ) AND CURRENT_DATE GROUP BY sale_date; | Determine the daily revenue for the past week |
<table0>[table_name_55] { <col0>[nationality]:[VARCHAR] <col1>[nhl_team]:[VARCHAR] <col2>[pick__number]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "montreal canadiens" AND `<col2>` = "25" | Which nationality do the Montreal Canadiens belong to with a pick# of 25?
|
<table0>[table_203_366] { <col0>[number]:[pos] <col1>[number]:[class] <col2>[text]:[number] <col3>[team]:[text] <col4>[drivers]:[text] <col5>[chassis]:[text] <col6>[engine]:[text] <col7>[laps]:[number] } | SELECT "drivers" FROM `<table0>` WHERE "drivers" IN ( 'phil hill', 'richard attwood' ) ORDER BY "laps" DESC LIMIT 1 | who completed more laps , phil hill or richard attwood ? |
<table0>[table_name_52] { <col0>[crowd]:[VARCHAR] <col1>[home_team]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "st kilda" | In the game where the home team was St Kilda, what was the attendance?
|
<table0>[table_204_596] { <col0>[number]:[year] <col1>[number]:[winners] <col2>[text]:[score] <col3>[text]:[runners] <col4>[text]:[notes] } | SELECT MAX( "year" ) FROM `<table0>` WHERE "winners" = 'chasetown' | what was the last year chasetown won ?
|
<table0>[table_1974443_1] { <col0>[enrollment]:[INTEGER] <col1>[founded]:[VARCHAR] } | SELECT MIN( `<col0>` ) FROM `<table0>` WHERE `<col1>` = 1880 | What is the smallest enrollment for institutions founded in exactly 1880?
|
<table0>[table_1342393_17] { <col0>[incumbent]:[VARCHAR] <col1>[first_elected]:[VARCHAR] } | SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` = 1924 | how many incumbent with first elected being 1924 |
<table0>[table_203_6] { <col0>[number]:[number] <col1>[date]:[text] <col2>[venue]:[text] <col3>[opponent]:[text] <col4>[score]:[text] <col5>[result]:[text] <col6>[competition]:[text] } | SELECT COUNT( * ) FROM `<table0>` WHERE "opponent" = 'san marino' | what were the number of times san marino was an opponent ? |
<table0>[treatment] { <col0>[treatmentid]:[number] <col1>[patientunitstayid]:[number] <col2>[treatmentname]:[text] <col3>[treatmenttime]:[time] } <table1>[allergy] { <col0>[allergyid]:[number] <col1>[patientunitstayid]:[number] <col2>[drugname]:[text] <col3>[allergyname]:[text] <col4>[allergytime]:[time] } <table2>[i... | SELECT t1.`<table6>`name FROM ( SELECT `<table6>`.`<table6>`name, DENSE_RANK( ) OVER ( ORDER BY COUNT( * ) DESC ) AS c1 FROM `<table6>` WHERE `<table6>`.`<table5>`unitstayid IN ( SELECT `<table5>`.`<table5>`unitstayid FROM `<table5>` WHERE `<table5>`.age BETWEEN 20 AND 29 ) AND DATETIME( `<table6>`.`<table6>`resulttime... | what were the five most frequently taken lab tests since 2 years ago in patients of age 20s?
|
<table0>[table_16150] { <col0>[Country]:[text] <col1>[Membership]:[2010] <col2>[real]:[member] <col3>[organization]:[text] <col4>[Year]:[current] <col5>[Scouting]:[organization] <col6>[joined]:[WOSM] <col7>[text]:[Year] <col8>[member]:[organization] <col9>[founded]:[text] <col10>[Admits]:[boys] <col11>[girls]:[text] }... | SELECT "Country" FROM `<table0>` WHERE "Year current `<col5>` `<col3>` `<col6>` WOSM" = '1930' AND "Year `<col8>` `<col3>` was founded" = '1926' | Which countries have a scouting organization that was founded in 1926, and joined WOSM in 1930?
|
<table0>[diagnoses] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table1>[procedures] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table2>[demogr... | SELECT COUNT( DISTINCT `<table2>`.subject_id ) FROM `<table2>` INNER JOIN diagnoses ON `<table2>`.hadm_id = diagnoses.hadm_id WHERE `<table2>`.admityear < "2195" AND diagnoses.short_title = "Other postop infection" | give me the number of patients whose admission year is less than 2195 and diagnoses short title is other postop infection?
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.