schema stringlengths 20 14.6k | query stringlengths 17 2.58k | question stringlengths 8 1.06k |
|---|---|---|
<table0>[table_19769687_3] { <col0>[percentage_of_popular_vote]:[VARCHAR] <col1>[number_of_seats_won]:[VARCHAR] } | SELECT COUNT( _percentage_of_popular_vote ) FROM `<table0>` WHERE _number_of_seats_won = 83 | Name the total number for % popular vote for # of seats won for 83 |
<table0>[table_15700367_6] { <col0>[runs_conceded]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE er = "4.96" | How many runs conceded when the earned runs was 4.96? |
<table0>[Mailshot_Customers] { <col0>[mailshot_id]:[INTEGER] <col1>[customer_id]:[INTEGER] <col2>[outcome_code]:[VARCHAR] <col3>[mailshot_customer_date]:[DATETIME] } <table1>[Customer_Orders] { <col0>[order_id]:[INTEGER] <col1>[customer_id]:[INTEGER] <col2>[order_status_code]:[VARCHAR] <col3>[shipping_method_code]:[VA... | SELECT product_category, COUNT( * ) FROM `<table2>` GROUP BY `<col1>` | Show all distinct product categories along with the number of mailshots in each category in a pie chart.
|
<table0>[table_name_1] { <col0>[week_12]:[VARCHAR] <col1>[week_1]:[VARCHAR] <col2>[week_2]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "maria maxine" AND `<col2>` = "henri satu" | What is the week 12 nomination that had a week 1 nomination of Maria Maxine and a week 2 nomination of Henri Satu? |
<table0>[Behavior_Incident] { <col0>[incident_id]:[INTEGER] <col1>[incident_type_code]:[VARCHAR] <col2>[student_id]:[INTEGER] <col3>[date_incident_start]:[DATETIME] <col4>[date_incident_end]:[DATETIME] <col5>[incident_summary]:[VARCHAR] <col6>[255]:[recommendations] <col7>[VARCHAR]:[255] <col8>[other_details]:[VARCHAR]... | SELECT date_address_to, COUNT( `<col3>` ) FROM `<table3>` GROUP BY `<col5>` ORDER BY `<col4>` DESC | A bar chart shows the distribution of date_address_to and the amount of date_address_to , and group by attribute other_details and bin date_address_to by time.
|
<table0>[attendees] { <col0>[INT]:[event_id] <col1>[INT]:[age_group] <col2>[VARCHAR]:[255] } <table1>[events] { <col0>[INT]:[name] <col1>[VARCHAR]:[255] <col2>[type]:[VARCHAR] <col3>[255]:[INSERT] } | SELECT COUNT( * ) FROM `<table0>` WHERE age_group = 'Children' AND event_id IN ( SELECT id FROM `<table1>` WHERE `<col2>` = 'Workshop' ); | How many visitors identified as 'Children' attended family workshops? |
<table0>[CLASS] { <col0>[prof_num]:[VARCHAR] } <table1>[employee] { <col0>[emp_fname]:[VARCHAR] <col1>[emp_num]:[VARCHAR] } | SELECT T1.emp_fname FROM `<table1>` AS T1 JOIN CLASS AS T2 ON T1.emp_num = T2.prof_num WHERE crs_code = 'CIS-220' INTERSECT SELECT T1.emp_fname FROM `<table1>` AS T1 JOIN CLASS AS T2 ON T1.emp_num = T2.prof_num WHERE crs_code = 'QM-261' | Find the first name of the professor who is teaching two courses with code CIS-220 and QM-261. |
<table0>[JobApplications] { <col0>[ApplicationID]:[INT] <col1>[ApplicationDate]:[DATE] <col2>[ApplicationSource]:[VARCHAR] } | SELECT ApplicationSource, COUNT( * ) FROM `<table0>` WHERE `<col1>` >= DATEADD( month, -3, GETDATE( ) ) GROUP BY ApplicationSource; | How many job applicants were there in the last 3 months, broken down by source? |
<table0>[table_name_55] { <col0>[school]:[VARCHAR] <col1>[enrollment]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = 908 | Which School has a Enrollment of 908? |
<table0>[table_name_44] { <col0>[total]:[INTEGER] <col1>[year_s__won]:[VARCHAR] } | SELECT AVG( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "1922, 1932" | What is the Total for the Player who won in 1922, 1932? |
<table0>[procedures] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table1>[demographic] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[name]:[text] <col3>[marital_status]:[text] <col4>[age]:[text] <col5>[dob]:[text] <col6>... | SELECT COUNT( DISTINCT `<table1>`.subject_id ) FROM `<table1>` INNER JOIN diagnoses ON `<table1>`.hadm_id = diagnoses.hadm_id WHERE `<table1>`.dob_year < "2156" AND diagnoses.short_title = "Chrnc hpt C wo hpat coma" | how many patients are born before the year 2156 and diagnosed with chrnc hpt c wo hpat coma? |
<table0>[intakeoutput] { <col0>[intakeoutputid]:[number] <col1>[patientunitstayid]:[number] <col2>[cellpath]:[text] <col3>[celllabel]:[text] <col4>[cellvaluenumeric]:[number] <col5>[intakeoutputtime]:[time] } <table1>[microlab] { <col0>[microlabid]:[number] <col1>[patientunitstayid]:[number] <col2>[culturesite]:[text]... | SELECT ( SELECT `<table5>`.`<table5>`result FROM `<table5>` WHERE `<table5>`.`<table6>`unitstayid IN ( SELECT `<table6>`.`<table6>`unitstayid FROM `<table6>` WHERE `<table6>`.`<table6>`healthsystemstayid IN ( SELECT `<table6>`.`<table6>`healthsystemstayid FROM `<table6>` WHERE `<table6>`.uniquepid = '006-100609' ) ) AN... | is patient 006-100609's paco2 measured at 2104-04-28 09:15:00 greater than the value measured at 2104-04-26 23:21:00?
|
<table0>[table_203_718] { <col0>[number]:[pos] <col1>[text]:[rider] <col2>[text]:[manufacturer] <col3>[text]:[time] <col4>[retired]:[text] <col5>[points]:[number] } | SELECT "rider" FROM `<table0>` ORDER BY "pos" DESC LIMIT 1 | who was the last person to complete the 250cc valencian community motorcycle grand prix ?
|
<table0>[allergy] { <col0>[allergyid]:[number] <col1>[patientunitstayid]:[number] <col2>[drugname]:[text] <col3>[allergyname]:[text] <col4>[allergytime]:[time] } <table1>[medication] { <col0>[medicationid]:[number] <col1>[patientunitstayid]:[number] <col2>[drugname]:[text] <col3>[dosage]:[text] <col4>[routeadmin]:[tex... | SELECT `<table8>`.`<table8>`name FROM `<table8>` WHERE `<table8>`.`<table9>`unitstayid IN ( SELECT `<table9>`.`<table9>`unitstayid FROM `<table9>` WHERE `<table9>`.`<table9>`healthsystemstayid IN ( SELECT `<table9>`.`<table9>`healthsystemstayid FROM `<table9>` WHERE `<table9>`.uniquepid = '027-8953' ) ) AND DATETIME( `... | tell me the procedure that patient 027-8953 last had during the last year? |
<table0>[Spacecraft] { <col0>[SpacecraftID]:[INT] <col1>[VARCHAR]:[Manufacturer] <col2>[VARCHAR]:[LaunchDate] <col3>[DATE]:[Status] <col4>[VARCHAR]:[INSERT] } | SELECT Name, Manufacturer FROM `<table0>` WHERE LaunchDate > '2000-01-01' | Retrieve the names and manufacturers of spacecraft launched after 2000. |
<table0>[european_region_table] { <col0>[INT]:[operation_name] <col1>[VARCHAR]:[100] <col2>[country]:[VARCHAR] <col3>[budget]:[INT] } <table1>[african_region_table] { <col0>[INT]:[operation_name] <col1>[VARCHAR]:[100] <col2>[country]:[VARCHAR] <col3>[budget]:[INT] } | SELECT COUNT( * ) FROM ( SELECT * FROM `<table0>` UNION SELECT * FROM `<table1>` ) AS region_table; | What is the total number of peacekeeping operations in 'european_region_table' and 'african_region_table'? |
<table0>[microlab] { <col0>[microlabid]:[number] <col1>[patientunitstayid]:[number] <col2>[culturesite]:[text] <col3>[organism]:[text] <col4>[culturetakentime]:[time] } <table1>[intakeoutput] { <col0>[intakeoutputid]:[number] <col1>[patientunitstayid]:[number] <col2>[cellpath]:[text] <col3>[celllabel]:[text] <col4>[ce... | SELECT t1.drugname FROM ( SELECT `<table2>`.drugname, COUNT( `<table2>`.drugstarttime ) AS c1 FROM `<table2>` WHERE `<table2>`.`<table6>`unitstayid IN ( SELECT `<table6>`.`<table6>`unitstayid FROM `<table6>` WHERE `<table6>`.`<table6>`healthsystemstayid IN ( SELECT `<table6>`.`<table6>`healthsystemstayid FROM `<table6>... | what is the name of the drug that has been prescribed two or more times in 12/2105 to patient 015-58787? |
<table0>[ReviewRejectionReasons] { <col0>[number]:[text] <col1>[Description]:[text] <col2>[PostTypeId]:[number] } <table1>[VoteTypes] { <col0>[number]:[text] } <table2>[PostTypes] { <col0>[number]:[text] } <table3>[TagSynonyms] { <col0>[number]:[SourceTagName] <col1>[text]:[TargetTagName] <col2>[text]:[CreationDate]... | SELECT t2.TagName, COUNT( p.Id ) FROM `<table10>` AS t INNER JOIN Post`<table10>` AS pt ON pt.TagId = t.Id AND t.TagName LIKE '%android%' INNER JOIN Posts AS p ON pt.PostId = p.Id AND DATEDIFF( d, GETDATE( ), CreationDate ) >= -45 INNER JOIN Post`<table10>` AS pt2 ON p.Id = pt2.PostId INNER JOIN `<table10>` AS t2 ON pt... | Recent Tags in Android posts by Popularity within last 45 days. All tags in posts tagged with android (or android-*), ordered by number of posts, by posts within last 7 days. |
<table0>[exists] { <col0>[rig_movement]:[rig_id] <col1>[INT]:[rig_name] <col2>[TEXT]:[location] <col3>[TEXT]:[movement_year] <col4>[INT]:[movement_type] <col5>[TEXT]:[INSERT] <col6>[rig_movement]:[rig_id] <col7>[rig_name]:[location] <col8>[movement_year]:[movement_type] <col9>[VALUES]:[Rig] <col10>[North]:[Sea] <col11>... | SELECT location, SUM( CASE WHEN movement_type = 'added' THEN 1 WHEN movement_type = 'removed' THEN -1 ELSE 0 END ) AS net_movement FROM rig_movement WHERE location = 'North Sea' AND movement_year = 2021 GROUP BY location; | Show the number of drilling rigs added or removed in the North Sea in 2021 |
<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>` INNER JOIN prescriptions ON `<table3>`.hadm_id = prescriptions.hadm_id WHERE `<table3>`.days_stay > "6" AND prescriptions.route = "IVPCA" | count the number of patients whose days of hospital stay is greater than 6 and drug route is ivpca?
|
<table0>[table_203_695] { <col0>[number]:[draw] <col1>[number]:[artist] <col2>[text]:[song] <col3>[text]:[points] <col4>[number]:[place] } | SELECT "artist" FROM `<table0>` WHERE "points" < 75 | in the irish national final for the eurovision song contest in 1990 , which artists did not receive at least 75 points ?
|
<table0>[table_name_5] { <col0>[away_captain]:[VARCHAR] <col1>[venue]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "adelaide oval" | What is the name of the away captain when the game was at Adelaide Oval?
|
<table0>[DEPARTMENT] { <col0>[DEPT_CODE]:[varchar] <col1>[DEPT_NAME]:[varchar] <col2>[SCHOOL_CODE]:[varchar] <col3>[EMP_NUM]:[int] <col4>[DEPT_ADDRESS]:[varchar] <col5>[DEPT_EXTENSION]:[varchar] } <table1>[EMPLOYEE] { <col0>[EMP_NUM]:[int] <col1>[EMP_LNAME]:[varchar] <col2>[EMP_FNAME]:[varchar] <col3>[EMP_INITIAL]:[va... | SELECT STU_FNAME, SUM( `<col7>` ) FROM `<table4>` WHERE `<col7>` < ( SELECT AVG( `<col7>` ) FROM `<table4>` ) GROUP BY `<col2>` | Find the first name and gpa of the students whose gpa is lower than the average gpa of all students. Visualize by pie chart.
|
<table0>[time_zone] { <col0>[time_zone_code]:[text] <col1>[time_zone_name]:[text] <col2>[hours_from_gmt]:[int] } <table1>[dual_carrier] { <col0>[main_airline]:[varchar] <col1>[low_flight_number]:[int] <col2>[high_flight_number]:[int] <col3>[dual_airline]:[varchar] <col4>[service_name]:[text] } <table2>[food_service] ... | SELECT DISTINCT flight.flight_id FROM `<table12>` AS AIRPORT_SERVICE_0, `<table12>` 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 = 'DENVER' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BOSTON' AND f... | show me the latest flight from DENVER to BOSTON |
<table0>[Appointment] { <col0>[AppointmentID]:[INTEGER] <col1>[Patient]:[INTEGER] <col2>[PrepNurse]:[INTEGER] <col3>[Physician]:[INTEGER] <col4>[Start]:[DATETIME] <col5>[End]:[DATETIME] <col6>[ExaminationRoom]:[TEXT] } <table1>[Block] { <col0>[BlockFloor]:[INTEGER] <col1>[BlockCode]:[INTEGER] } <table2>[On_Call] { <c... | SELECT T3.Name, COUNT( T3.Name ) FROM `<table4>` AS T1 JOIN Affiliated_With AS T2 ON T1.EmployeeID = T2.`<table4>` JOIN Department AS T3 ON T2.Department = T3.DepartmentID WHERE T2.PrimaryAffiliation = 1 GROUP BY T3.Name | Give me a bar chart showing how many physicians for each department name they primarily affiliated in. |
<table0>[student_tests_taken] { <col0>[registration_id]:[number] <col1>[date_test_taken]:[time] <col2>[test_result]:[text] } <table1>[course_authors_and_tutors] { <col0>[author_id]:[number] <col1>[author_tutor_atb]:[text] <col2>[login_name]:[text] <col3>[password]:[text] <col4>[personal_name]:[text] <col5>[middle_name... | SELECT date_of_enrolment, `<col4>` FROM `<table5>` | List all the dates of enrollment and completion of students.
|
<table0>[table_43743] { <col0>[Rider]:[text] <col1>[Manufacturer]:[text] <col2>[Laps]:[real] <col3>[Time]:[text] <col4>[Grid]:[real] } | SELECT "Time" FROM `<table0>` WHERE "Laps" = '22' AND "Grid" = '15' | What is Time, when Laps is 22, and when Grid is 15?
|
<table0>[departments] { <col0>[DEPARTMENT_ID]:[decimal] <col1>[DEPARTMENT_NAME]:[varchar] <col2>[MANAGER_ID]:[decimal] <col3>[LOCATION_ID]:[decimal] } <table1>[employees] { <col0>[EMPLOYEE_ID]:[decimal] <col1>[FIRST_NAME]:[varchar] <col2>[LAST_NAME]:[varchar] <col3>[EMAIL]:[varchar] <col4>[PHONE_NUMBER]:[varchar] <col... | SELECT HIRE_DATE, AVG( `<col7>` ) FROM `<table1>` WHERE NOT `<col0>` IN ( SELECT `<col0>` FROM `<table5>` ) | For those employees who did not have any job in the past, return a bar chart about the distribution of hire_date and the average of salary bin hire_date by time.
|
<table0>[attacks] { <col0>[attack_type]:[VARCHAR] <col1>[255]:[ip_address] <col2>[VARCHAR]:[255] } | SELECT attack_type, COUNT( DISTINCT ip_address ) as unique_ip_addresses FROM `<table0>` GROUP BY `<col0>` ORDER BY unique_ip_addresses DESC; | Find the number of unique IP addresses involved in each type of attack, ordered by the highest number of unique IP addresses? |
<table0>[table_name_54] { <col0>[crowd]:[VARCHAR] <col1>[venue]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "junction oval" | What is the listed crowd at junction oval? |
<table0>[table_name_47] { <col0>[school]:[VARCHAR] <col1>[hometown]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "dallas, tx" | What is the school of the player from Dallas, TX? |
<table0>[DefenseProjects] { <col0>[INT]:[PRIMARY] <col1>[KEY]:[project] <col2>[VARCHAR]:[start_date] <col3>[DATE]:[INSERT] } | SELECT project FROM `<table0>` WHERE start_date >= '2023-01-01'; | Which defense projects have a start date on or after January 1, 2023? |
<table0>[vessel_performance] { <col0>[INT]:[name] <col1>[TEXT]:[speed] <col2>[DECIMAL]:[arrived_date] <col3>[DATE]:[country] <col4>[TEXT]:[INSERT] } | SELECT MIN( speed ) FROM `<table0>` WHERE YEAR( arrived_date ) = 2022 AND MONTH( arrived_date ) = 8 AND country = 'South Korea'; | What is the minimum speed recorded for vessels arriving in South Korea in August 2022? |
<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 Title, Id, Score FROM `<table0>` WHERE Score < -100 | Low received posts (-100 score or less).
|
<table0>[table_12886178_4] { <col0>[points_for]:[VARCHAR] <col1>[tries_for]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "29" | What's the points for count for the club with tries for count of 29?
|
<table0>[table_name_26] { <col0>[format]:[VARCHAR] <col1>[catalogno]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "st 491" | Whati s the format for the catalogno of st 491? |
<table0>[university] { <col0>[School_ID]:[int] <col1>[School]:[text] <col2>[Location]:[text] <col3>[Founded]:[real] <col4>[Affiliation]:[text] <col5>[Enrollment]:[real] <col6>[Nickname]:[text] <col7>[Primary_conference]:[text] } <table1>[basketball_match] { <col0>[Team_ID]:[int] <col1>[School_ID]:[int] <col2>[Team_Nam... | SELECT ACC_Road, `<col1>` FROM `<table1>` GROUP BY All_Home, `<col6>` ORDER BY `<col1>` DESC | Give me the comparison about School_ID over the ACC_Road , and group by attribute All_Home, could you display from high to low by the Y-axis?
|
<table0>[aircraft] { <col0>[aircraft_code]:[varchar] <col1>[aircraft_description]:[varchar] <col2>[manufacturer]:[varchar] <col3>[basic_type]:[varchar] <col4>[engines]:[int] <col5>[propulsion]:[varchar] <col6>[wide_body]:[varchar] <col7>[wing_span]:[int] <col8>[length]:[int] <col9>[weight]:[int] <col10>[capacity]:[int]... | SELECT DISTINCT ground_service.transport_type FROM city, ground_service WHERE city.city_name = 'DENVER' AND ground_service.city_code = city.city_code | what types of ground transportation are available in DENVER |
<table0>[lab] { <col0>[labid]:[number] <col1>[patientunitstayid]:[number] <col2>[labname]:[text] <col3>[labresult]:[number] <col4>[labresulttime]:[time] } <table1>[intakeoutput] { <col0>[intakeoutputid]:[number] <col1>[patientunitstayid]:[number] <col2>[cellpath]:[text] <col3>[celllabel]:[text] <col4>[cellvaluenumeric... | SELECT `<table9>`.`<table9>`time FROM `<table9>` WHERE `<table9>`.`<table8>`unitstayid IN ( SELECT `<table8>`.`<table8>`unitstayid FROM `<table8>` WHERE `<table8>`.`<table8>`healthsystemstayid IN ( SELECT `<table8>`.`<table8>`healthsystemstayid FROM `<table8>` WHERE `<table8>`.uniquepid = '007-3999' ) ) AND `<table9>`.... | when was patient 007-3999's first diagnosis time since 2104 for hypertension - controlled? |
<table0>[Timed_Status_of_Things] { <col0>[thing_id]:[INTEGER] <col1>[Date_and_Date]:[DATETIME] <col2>[Status_of_Thing_Code]:[CHAR] } <table1>[Customer_Event_Notes] { <col0>[Customer_Event_Note_ID]:[INTEGER] <col1>[Customer_Event_ID]:[INTEGER] <col2>[service_type_code]:[CHAR] <col3>[resident_id]:[INTEGER] <col4>[proper... | SELECT T1.property_id, COUNT( * ) FROM `<table2>` AS T1 JOIN Residents AS T2 ON T1.property_id = T2.property_id GROUP BY T1.property_id | How many residents does each property have? List property id and resident count with a scatter chart. |
<table0>[airport_aircraft] { <col0>[int]:[Airport_ID] <col1>[int]:[Aircraft_ID] } <table1>[pilot] { <col0>[Pilot_Id]:[int] <col1>[varchar]:[Age] } <table2>[match] { <col0>[Round]:[real] <col1>[Location]:[text] <col2>[Country]:[text] <col3>[Date]:[text] <col4>[Fastest_Qualifying]:[text] <col5>[Winning_Pilot]:[text] <c... | SELECT Aircraft, COUNT( * ) FROM `<table4>` AS T1 JOIN match AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft ORDER BY COUNT( * ) DESC | List the names of aircrafts and the number of times it won matches Plot them as bar chart, list by the total number in descending. |
<table0>[Order_Items] { <col0>[order_id]:[INTEGER] <col1>[product_id]:[INTEGER] <col2>[order_quantity]:[VARCHAR] } <table1>[Customers] { <col0>[customer_id]:[INTEGER] <col1>[payment_method]:[VARCHAR] <col2>[customer_name]:[VARCHAR] <col3>[date_became_customer]:[DATETIME] <col4>[other_customer_details]:[VARCHAR] } <ta... | SELECT date_became_customer, COUNT( `<col3>` ) FROM `<table1>` WHERE `<col0>` BETWEEN 10 AND 20 ORDER BY COUNT( `<col3>` ) DESC | Find the 'date became customers' of the customers whose ID is between 10 and 20, and count them by a bar chart, I want to show by the y axis in descending. |
<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>[PostNoticeTypes] { <col0>[number]:[ClassId] <col1>[number]:[tex... | SELECT a.Id AS "post_link", a.Score, a.CreationDate FROM `<table12>` AS q INNER JOIN `<table12>` AS a ON q.AcceptedAnswerId = a.Id WHERE a.OwnerUserId = '##userid##' ORDER BY a.CreationDate DESC LIMIT 100 | Accepted answers by a given user. |
<table0>[equipment_sequence] { <col0>[aircraft_code_sequence]:[varchar] <col1>[aircraft_code]:[varchar] } <table1>[state] { <col0>[state_code]:[text] <col1>[state_name]:[text] <col2>[country_name]:[text] } <table2>[days] { <col0>[days_code]:[varchar] <col1>[day_name]:[varchar] } <table3>[city] { <col0>[city_code]:[v... | SELECT DISTINCT flight.flight_id FROM `<table5>` AS AIRPORT_SERVICE_0, `<table5>` 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 = 20 AND date_day.month_number = 9 AND date_day.year = 1991 AND days.day_name = da... | all right give me the flight times in the morning on 9 20 from PITTSBURGH to SAN FRANCISCO
|
<table0>[table_203_215] { <col0>[number]:[year] <col1>[number]:[competition] <col2>[text]:[venue] <col3>[text]:[position] <col4>[text]:[event] <col5>[text]:[notes] } | SELECT COUNT( * ) FROM `<table0>` WHERE "position" <= 2 | how many times did japan place in the top 2 ? |
<table0>[people] { <col0>[People_ID]:[int] <col1>[Sex]:[text] <col2>[text]:[Date_of_Birth] <col3>[text]:[Height] <col4>[real]:[Weight] } <table1>[candidate] { <col0>[Candidate_ID]:[int] <col1>[People_ID]:[int] <col2>[Poll_Source]:[text] <col3>[Date]:[text] <col4>[Support_rate]:[real] <col5>[Consider_rate]:[real] <col6... | SELECT Name, Height FROM `<table0>` ORDER BY Height | Draw a bar chart of name versus height, and rank by the y-axis in ascending. |
<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 `<table3>`.subject_id ) FROM `<table3>` INNER JOIN prescriptions ON `<table3>`.hadm_id = prescriptions.hadm_id WHERE `<table3>`.admission_type = "NEWBORN" AND prescriptions.route = "ID" | what is the number of patients whose admission type is newborn and drug route is id? |
<table0>[table_name_37] { <col0>[INTEGER]:[drawn] <col1>[VARCHAR]:[played] } | SELECT AVG( against ) FROM `<table0>` WHERE drawn = 2 AND played > 10 | what is the average Against has Drawn of 2, and a Played larger than 10?
|
<table0>[table_name_16] { <col0>[call_sign]:[VARCHAR] <col1>[frequency_mhz]:[VARCHAR] <col2>[erp_w]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` < 95.5 AND `<col2>` > 10 | What is the call sign when the frequency is less than 95.5 MHz, and a ERP W is higher than 10? |
<table0>[HOTELS] { <col0>[price_range]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` | What are the price ranges of hotels?
|
<table0>[infrastructure_projects] { <col0>[INT]:[district] <col1>[VARCHAR]:[project_name] <col2>[VARCHAR]:[100] <col3>[start_date]:[DATE] <col4>[end_date]:[DATE] } | SELECT district, COUNT( * ) FROM `<table0>` WHERE `<col4>` BETWEEN DATE_SUB( NOW( ), INTERVAL 3 YEAR ) AND NOW( ) GROUP BY district ORDER BY `<col4>` DESC; | List the number of rural infrastructure projects per district that were completed in the last 3 years, sorted by completion date in descending order? |
<table0>[Votes] { <col0>[number]:[PostId] <col1>[number]:[VoteTypeId] <col2>[number]:[UserId] <col3>[number]:[CreationDate] <col4>[time]:[BountyAmount] } <table1>[PostNoticeTypes] { <col0>[number]:[ClassId] <col1>[number]:[text] <col2>[Body]:[text] <col3>[IsHidden]:[boolean] <col4>[Predefined]:[boolean] <col5>[PostNot... | SELECT t.TagName, COUNT( DISTINCT p.OwnerUserId ) AS `<table8>` FROM `<table8>` AS u, Posts AS p, PostTags AS pt, Tags AS t WHERE p.OwnerUserId = u.Id AND p.PostTypeId = 2 AND p.Score > 0 AND pt.PostId = p.ParentId AND t.Id = pt.TagId AND ( t.TagName = 'c' OR t.TagName = 'java' OR t.TagName = 'mysql' OR t.TagName = 'c#... | Number of active experts per week in a TAG (SO), parameterized.
|
<table0>[table_75660] { <col0>[Rank]:[real] <col1>[Municipality]:[text] <col2>[Province]:[text] <col3>[Status]:[text] <col4>[Area]:[real] } | SELECT SUM( "Rank" ) FROM `<table0>` WHERE "Municipality" = 'winnipeg' AND "Area ( km 2 )" > '464.01' | What is the total Rank that has a Municipality of Winnipeg, an Area (KM 2) that's larger than 464.01?
|
<table0>[table_name_54] { <col0>[language]:[VARCHAR] <col1>[director]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "nagisa oshima" | Which Language Director of nagisa oshima use in his film? |
<table0>[plays_games] { <col0>[stuid]:[number] <col1>[gameid]:[number] <col2>[hours_played]:[number] } <table1>[student] { <col0>[stuid]:[number] <col1>[lname]:[text] <col2>[fname]:[text] <col3>[age]:[number] <col4>[sex]:[text] <col5>[major]:[number] <col6>[advisor]:[number] <col7>[city_code]:[text] } <table2>[sports... | SELECT gname FROM `<table0>` AS T1 JOIN video_games AS T2 ON T1.gameid = T2.gameid JOIN student AS T3 ON T3.stuid = T1.stuid WHERE T3.lname = "Smith" AND T3.fname = "Linda" | What are the names of all games played by Linda Smith? |
<table0>[diversity_metrics] { <col0>[INT]:[company_name] <col1>[VARCHAR]:[100] <col2>[region]:[VARCHAR] <col3>[employees_of_color]:[INT] <col4>[women_in_tech]:[INT] } | DELETE FROM `<table0>` WHERE company_name = 'Echo Ltd.'; | Delete records from the "diversity_metrics" table for the company 'Echo Ltd.' |
<table0>[table_name_9] { <col0>[period]:[VARCHAR] <col1>[player]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "stanislav chistov" | In which period did Stanislav Chistov get a penalty? |
<table0>[RecycledPolyesterCost] { <col0>[INT]:[garment_type] <col1>[VARCHAR]:[255] <col2>[cost]:[DECIMAL] } | SELECT MAX( `<col2>` ) FROM `<table0>` WHERE garment_type IN ( 'T-Shirt', 'Pants', 'Dress' ); | What is the maximum production cost for a garment made from recycled polyester? |
<table0>[table_name_71] { <col0>[round]:[VARCHAR] <col1>[college]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "indiana" | What round was a player from Indiana picked? |
<table0>[recycling_rates] { <col0>[city]:[VARCHAR] <col1>[year]:[INT] <col2>[material_type]:[VARCHAR] <col3>[recycling_rate]:[DECIMAL] } | SELECT material_type, AVG( `<col3>` ) AS avg_recycling_rate FROM `<table0>` WHERE `<col0>` = 'New York' AND `<col1>` = 2019 AND `<col2>` IN ( 'Plastic', 'Glass' ) GROUP BY material_type; | What is the recycling rate for plastic and glass in the city of New York in 2019?' |
<table0>[table_name_24] { <col0>[constructor]:[VARCHAR] <col1>[location]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "long beach" | Who was the Long Beach constructor?
|
<table0>[table_name_81] { <col0>[country]:[VARCHAR] <col1>[place]:[VARCHAR] <col2>[score]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "t3" AND `<col2>` = 70 - 68 = 138 | What country was the player from who placed t3 with a score of 70-68=138?
|
<table0>[date_day] { <col0>[month_number]:[int] <col1>[day_number]:[int] <col2>[year]:[int] <col3>[day_name]:[varchar] } <table1>[state] { <col0>[state_code]:[text] <col1>[state_name]:[text] <col2>[country_name]:[text] } <table2>[restriction] { <col0>[restriction_code]:[text] <col1>[advance_purchase]:[int] <col2>[sto... | SELECT DISTINCT flight.flight_id FROM `<table8>` AS AIRPORT_SERVICE_0, `<table8>` 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 = 'MILWAUKEE' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'TAMPA' AND fli... | what flights do you have from MILWAUKEE to TAMPA
|
<table0>[table_name_82] { <col0>[year]:[INTEGER] <col1>[co_drivers]:[VARCHAR] } | SELECT SUM( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "jérôme policand christopher campbell" | In what year Year has a Co-Drivers of jérôme policand christopher campbell? |
<table0>[table_name_57] { <col0>[number_of_electorates__2009]:[VARCHAR] <col1>[name]:[VARCHAR] } | SELECT COUNT( number_of_electorates__2009_ ) FROM `<table0>` WHERE `<col1>` = "katol" | What is the total number of electorates (2009) for Katol? |
<table0>[farm_location] { <col0>[farm_id]:[INT] <col1>[country]:[VARCHAR] <col2>[255]:[species] <col3>[VARCHAR]:[255] } | SELECT species FROM `<table0>` WHERE `<col1>` = 'Japan' INTERSECT SELECT species FROM `<table0>` WHERE `<col1>` = 'South Korea'; | Find the intersection of fish species in fish farms in Japan and South Korea. |
<table0>[table_name_67] { <col0>[points]:[INTEGER] <col1>[lost]:[VARCHAR] <col2>[position]:[VARCHAR] } | SELECT MIN( `<col0>` ) FROM `<table0>` WHERE `<col1>` = 2 AND `<col2>` < 1 | What is the smallest amount of points had a lost number of 2 when the position was less than 1? |
<table0>[admissions] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[admittime]:[time] <col4>[dischtime]:[time] <col5>[admission_type]:[text] <col6>[admission_location]:[text] <col7>[discharge_location]:[text] <col8>[insurance]:[text] <col9>[language]:[text] <col10>[marital_status]... | SELECT t2.drug FROM ( SELECT admissions.subject_id, `<table15>`.charttime FROM `<table15>` JOIN admissions ON `<table15>`.hadm_id = admissions.hadm_id WHERE admissions.subject_id = 89565 AND `<table15>`.icd9_code = ( SELECT `<table9>`.icd9_code FROM `<table9>` WHERE `<table9>`.short_title = 'pericardial disease nos' ) ... | what was the name of the medication that patient 89565 was prescribed for within 2 days after being diagnosed with pericardial disease nos in 05/2102?
|
<table0>[wine] { <col0>[INTEGER]:[Grape] <col1>[TEXT]:[Winery] <col2>[TEXT]:[Appelation] <col3>[TEXT]:[State] <col4>[TEXT]:[TEXT] <col5>[Year]:[INTEGER] <col6>[Price]:[INTEGER] <col7>[Score]:[INTEGER] <col8>[Cases]:[INTEGER] <col9>[Drink]:[TEXT] } <table1>[appellations] { <col0>[INTEGER]:[Appelation] <col1>[TEXT]:[Cou... | SELECT Year, AVG( MAX( `<col6>` ) ) FROM `<table0>` ORDER BY AVG( MAX( `<col6>` ) ) DESC | Compare the average of maximum price of wines each year, bin the year into the weekday interval and draw a bar chart, order by the total number in desc. |
<table0>[address_status] { <col0>[status_id]:[integer] } <table1>[author] { <col0>[author_id]:[integer] <col1>[author_name]:[text] } <table2>[book_language] { <col0>[language_id]:[integer] <col1>[language_code]:[text] <col2>[language_name]:[text] } <table3>[country] { <col0>[country_id]:[integer] <col1>[country_name... | SELECT COUNT( * ) FROM `<table5>` AS T1 INNER JOIN cust_order AS T2 ON T1.`<table5>`_id = T2.`<table5>`_id INNER JOIN shipping_method AS T3 ON T3.method_id = T2.shipping_method_id WHERE T1.first_name = 'Marcelia' AND T1.last_name = 'Goering' AND STRFTIME( '%Y', T2.order_date ) = '2021' AND T3.method_name = 'Priority' | How many orders did Marcelia Goering place in 2021 that uses the Priority Shipping method? |
<table0>[table_204_468] { <col0>[number]:[pos] <col1>[number]:[number] <col2>[driver]:[text] <col3>[team]:[text] <col4>[laps]:[number] <col5>[time]:[retired] <col6>[text]:[grid] <col7>[number]:[points] } | SELECT "no" FROM `<table0>` WHERE "pos" = 1 | alex zanardi came in first place , what is his number ?
|
<table0>[table_name_13] { <col0>[on_air_id]:[VARCHAR] <col1>[frequency]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "0 801" | What is the On-air ID of the broadcaster at frequency 0 801? |
<table0>[table_54233] { <col0>[Draw]:[real] <col1>[Artist]:[text] <col2>[Song]:[text] <col3>[Points]:[real] <col4>[Place]:[real] } | SELECT COUNT( "Place" ) FROM `<table0>` WHERE "Song" = 'jednom u životu' AND "Draw" > '18' | What place for 'jednom u ivotu' with a draw larger than 18?
|
<table0>[table_204_96] { <col0>[number]:[week] <col1>[number]:[date] <col2>[text]:[opponent] <col3>[text]:[result] <col4>[text]:[attendance] } | SELECT "week" FROM `<table0>` WHERE "week" IN ( 5, 9 ) ORDER BY "attendance" DESC LIMIT 1 | was attendance higher during week 5 or week 9 ? |
<table0>[table_name_54] { <col0>[games]:[INTEGER] <col1>[assist]:[INTEGER] } | SELECT SUM( `<col0>` ) FROM `<table0>` WHERE `<col1>` > 54 | How many games had an assist number greater than 54?
|
<table0>[schedule] { <col0>[Cinema_ID]:[int] <col1>[Film_ID]:[int] <col2>[Date]:[text] <col3>[Show_times_per_day]:[int] <col4>[Price]:[float] } <table1>[film] { <col0>[Film_ID]:[int] <col1>[Rank_in_series]:[int] <col2>[Number_in_season]:[int] <col3>[Title]:[text] <col4>[Directed_by]:[text] <col5>[Original_air_date]:[t... | SELECT Location, COUNT( * ) FROM `<table2>` GROUP BY Location ORDER BY Location | Show each location and the number of cinemas there Show bar chart, I want to display in ascending by the X-axis. |
<table0>[diagnoses] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table1>[demographic] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[name]:[text] <col3>[marital_status]:[text] <col4>[age]:[text] <col5>[dob]:[text] <col6>[... | SELECT COUNT( DISTINCT `<table1>`.subject_id ) FROM `<table1>` INNER JOIN prescriptions ON `<table1>`.hadm_id = prescriptions.hadm_id WHERE `<table1>`.age < "64" AND prescriptions.formulary_drug_cd = "WARF1" | count the number of patients whose age is less than 64 and drug code is warf1?
|
<table0>[donors] { <col0>[INT]:[donor_name] <col1>[TEXT]:[donation_date] <col2>[DATE]:[INSERT] } | SELECT EXTRACT( MONTH FROM donation_date ) as month, COUNT( DISTINCT donor_name ) as unique_`<table0>` FROM `<table0>` WHERE donation_date >= DATE_SUB( CURRENT_DATE, INTERVAL 1 YEAR ) GROUP BY month ORDER BY month; | How many unique donors have there been each month in the last year? |
<table0>[waste_generation] { <col0>[region]:[VARCHAR] <col1>[year]:[INT] <col2>[quantity]:[INT] } | SELECT region, SUM( `<col2>` ) FROM `<table0>` WHERE `<col1>` = 2021 GROUP BY region; | Total waste generation for each region in 2021? |
<table0>[procedures] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table1>[diagnoses] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table2>[demogr... | SELECT MIN( `<table2>`.age ) FROM `<table2>` WHERE `<table2>`.marital_status = "SINGLE" AND `<table2>`.diagnosis = "ACIDOSIS" | calculate the minimum age of unmarried patients who have acidosis primary disease.
|
<table0>[medication] { <col0>[medicationid]:[number] <col1>[patientunitstayid]:[number] <col2>[drugname]:[text] <col3>[dosage]:[text] <col4>[routeadmin]:[text] <col5>[drugstarttime]:[time] <col6>[drugstoptime]:[time] } <table1>[vitalperiodic] { <col0>[vitalperiodicid]:[number] <col1>[patientunitstayid]:[number] <col2>... | SELECT `<table7>`.celllabel FROM `<table7>` WHERE `<table7>`.`<table5>`unitstayid IN ( SELECT `<table5>`.`<table5>`unitstayid FROM `<table5>` WHERE `<table5>`.`<table5>`healthsystemstayid IN ( SELECT `<table5>`.`<table5>`healthsystemstayid FROM `<table5>` WHERE `<table5>`.uniquepid = '031-16123' ) ) AND `<table7>`.cell... | what was the last intake given to patient 031-16123. |
<table0>[table_19697] { <col0>[Year]:[text] <col1>[General]:[Election] <col2>[text]:[Seats] <col3>[Won]:[real] <col4>[Change]:[Seat] <col5>[real]:[votes] <col6>[text]:[votes] <col7>[swing]:[text] } | SELECT "General Election" FROM `<table0>` WHERE "votes swing" = '1.84' | Which general election had a vote swing of 1.84?
|
<table0>[investments] { <col0>[INT]:[sector] <col1>[VARCHAR]:[255] <col2>[sustainable]:[BOOLEAN] } | SELECT sector, COUNT( * ) * 100.0 / SUM( COUNT( * ) ) OVER ( ) FROM `<table0>` WHERE sector = 'Transportation' AND `<col2>` = TRUE GROUP BY sector; | What is the percentage of green investments in the Transportation sector? |
<table0>[table_35901] { <col0>[Year]:[real] <col1>[Album]:[text] <col2>[Oricon]:[position] <col3>[real]:[1st] <col4>[week]:[sales] <col5>[text]:[Copies] <col6>[sold]:[text] } | SELECT "Copies sold" FROM `<table0>` WHERE "Oricon position" > '1' AND "Year" = '1988' | How many copies were sold where the position is lager than 1 in 1988?
|
<table0>[table_name_75] { <col0>[game]:[VARCHAR] <col1>[january]:[VARCHAR] } | SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` = 20 | What was the total number of games on January 20? |
<table0>[Ingredient] { <col0>[ingredient_id]:[integer] <col1>[category]:[text] <col2>[name]:[text] <col3>[plural]:[text] } <table1>[Recipe] { <col0>[recipe_id]:[integer] <col1>[title]:[text] <col2>[subtitle]:[text] <col3>[servings]:[integer] <col4>[yield_unit]:[text] <col5>[prep_min]:[integer] <col6>[cook_min]:[intege... | SELECT T1.title FROM `<table1>` AS T1 INNER JOIN Nutrition AS T2 ON T1.recipe_id = T2.recipe_id WHERE T2.alcohol = 0 | List the names of alcohol free recipes. |
<table0>[players] { <col0>[player_id]:[INT] <col1>[name]:[VARCHAR] <col2>[100]:[position] <col3>[VARCHAR]:[team_id] } <table1>[teams] { <col0>[team_id]:[INT] <col1>[name]:[VARCHAR] <col2>[100]:[city] <col3>[VARCHAR]:[100] <col4>[INSERT]:[players] <col5>[player_id]:[name] <col6>[position]:[team_id] <col7>[VALUES]:[John... | INSERT INTO teams ( team_id, name, city ) VALUES ( 4, 'Toronto Maple Leafs', 'Toronto' ); | Insert records for a new team, 'Toronto Maple Leafs' |
<table0>[drought_impact] { <col0>[drought_impact_id]:[INT] } <table1>[conservation_initiatives] { <col0>[conservation_initiative_id]:[INT] <col1>[drought_impact_id]:[INT] } | SELECT COUNT( DISTINCT `<table0>`_id ) FROM `<table0>` INNER JOIN conservation_initiatives ON `<table0>`.`<table0>`_id = conservation_initiatives.`<table0>`_id; | Find the number of unique drought impact id values in the drought impact table that are also present in the conservation initiatives table. |
<table0>[class_of_service] { <col0>[booking_class]:[varchar] <col1>[rank]:[int] <col2>[class_description]:[text] } <table1>[time_interval] { <col0>[period]:[text] <col1>[begin_time]:[int] <col2>[end_time]:[int] } <table2>[city] { <col0>[city_code]:[varchar] <col1>[city_name]:[varchar] <col2>[state_code]:[varchar] <co... | SELECT DISTINCT flight.flight_id FROM `<table7>` AS AIRPORT_SERVICE_0, `<table7>` AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE ( ( ( flight.departure_time <= 1200 AND flight.departure_time >= 1800 ) AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'DALLAS' AND flight.to_ai... | what are the afternoon flights leaving from DALLAS to SAN FRANCISCO on AA |
<table0>[table_20424014_1] { <col0>[mccain__percentage]:[VARCHAR] <col1>[obama__percentage]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "19.3%" | what is the mccain % where obama got 19.3% |
<table0>[Comments] { <col0>[number]:[PostId] <col1>[number]:[Score] <col2>[number]:[Text] <col3>[text]:[CreationDate] <col4>[time]:[UserDisplayName] <col5>[text]:[UserId] <col6>[number]:[ContentLicense] } <table1>[CloseAsOffTopicReasonTypes] { <col0>[number]:[IsUniversal] <col1>[boolean]:[InputTitle] <col2>[text]:[Mar... | SELECT a.Id, a.Title, a.Score, a.ViewCount, a.Tags FROM `<table6>` AS a WHERE Id IN ( SELECT ParentId FROM `<table6>` WHERE OwnerUserId = 108797 ) ORDER BY ViewCount DESC | Unanswered questions with high views + high votes, by tag. A list of questions with a high score and low view count
|
<table0>[Inventory] { <col0>[product_id]:[INT] <col1>[product_name]:[VARCHAR] <col2>[price]:[DECIMAL] } | INSERT INTO Inventory ( product_id, product_name, price ) VALUES ( 4, 'Reusable Straws', 7.99 ); | Insert new eco-friendly product 'Reusable Straws' into the Inventory table |
<table0>[patient] { <col0>[uniquepid]:[text] <col1>[patienthealthsystemstayid]:[number] <col2>[patientunitstayid]:[number] <col3>[gender]:[text] <col4>[age]:[text] <col5>[ethnicity]:[text] <col6>[hospitalid]:[number] <col7>[wardid]:[number] <col8>[admissionheight]:[number] <col9>[admissionweight]:[number] <col10>[disch... | SELECT COUNT( * ) FROM `<table3>` WHERE `<table3>`.`<table0>`unitstayid IN ( SELECT `<table0>`.`<table0>`unitstayid FROM `<table0>` WHERE `<table0>`.`<table0>`healthsystemstayid IN ( SELECT `<table0>`.`<table0>`healthsystemstayid FROM `<table0>` WHERE `<table0>`.uniquepid = '005-46456' ) ) AND `<table3>`.cellpath LIKE ... | how many times did patient 005-46456 have a volume (ml)-levetiracetam (keppra) ivpb 500 mg intake during the last month?
|
<table0>[table_22871316_6] { <col0>[high_points]:[VARCHAR] <col1>[date]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "December 18" | Who did the high points in the game played on December 18?
|
<table0>[Student] { <col0>[StuID]:[INTEGER] <col1>[LName]:[VARCHAR] <col2>[Fname]:[VARCHAR] <col3>[Age]:[INTEGER] <col4>[Sex]:[VARCHAR] <col5>[Major]:[INTEGER] <col6>[Advisor]:[INTEGER] <col7>[city_code]:[VARCHAR] } <table1>[Allergy_Type] { <col0>[Allergy]:[VARCHAR] <col1>[AllergyType]:[VARCHAR] } <table2>[Has_Allerg... | SELECT Fname, COUNT( `<col2>` ) FROM `<table0>` WHERE `<col4>` = 'F' GROUP BY `<col2>` ORDER BY COUNT( `<col2>` ) DESC | A bar chart about the number of first name for all female students whose sex is F, and display y-axis in desc order.
|
<table0>[table_1342451_16] { <col0>[district]:[VARCHAR] <col1>[incumbent]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "James O'Connor" | What district did James O'Connor belong to? |
<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 diagnoses ON `<table1>`.hadm_id = diagnoses.hadm_id WHERE `<table1>`.admission_location = "PHYS REFERRAL/NORMAL DELI" AND diagnoses.short_title = "Subarachnoid hemorrhage" | find the number of patients whose admission location is phys referral/normal deli and were diagnosed with subarachnoid hemorrhage.
|
<table0>[table_25715] { <col0>[real]:[Importing] <col1>[Nation]:[text] <col2>[bbl]:[day] <col3>[2011]:[real] <col4>[day]:[2011] <col5>[real]:[bbl] <col6>[day]:[2009] <col7>[real]:[day] <col8>[2009]:[real] <col9>[bbl]:[day] <col10>[2006]:[real] <col11>[day]:[2006] } | SELECT MIN( "#" ) FROM `<table0>` WHERE "10 3 bbl/day ( `<col10>` )" = '5097' | At what # does 10 3 bbl/day (2006) equal 5097?
|
<table0>[Artists] { <col0>[ArtistID]:[INT] <col1>[ArtistName]:[VARCHAR] <col2>[100]:[Age] <col3>[INT]:[Genre] <col4>[VARCHAR]:[INSERT] } <table1>[Festivals] { <col0>[FestivalID]:[INT] <col1>[FestivalName]:[VARCHAR] <col2>[100]:[ArtistID] <col3>[INT]:[INSERT] } | SELECT AVG( A.Age ) FROM `<table0>` A INNER JOIN Festivals F ON A.ArtistID = F.ArtistID WHERE A.Genre = 'Rock'; | What is the average age of all rock artists who have performed at music festivals? |
<table0>[energy_storage] { <col0>[country]:[VARCHAR] <col1>[capacity]:[FLOAT] } | SELECT MAX( `<col1>` ) FROM `<table0>` WHERE `<col0>` = 'South Korea'; | What is the maximum energy storage capacity (in MWh) in South Korea? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.