schema stringlengths 20 14.6k | query stringlengths 17 2.58k | question stringlengths 8 1.06k |
|---|---|---|
<table0>[album] { <col0>[albumid]:[number] <col1>[title]:[text] <col2>[artistid]:[number] } <table1>[genre] { <col0>[genreid]:[number] <col1>[name]:[text] } <table2>[track] { <col0>[trackid]:[number] <col1>[name]:[text] <col2>[albumid]:[number] <col3>[mediatypeid]:[number] <col4>[genreid]:[number] <col5>[composer]:[t... | SELECT `<col5>` FROM `<table7>` WHERE `<col8>` = "Edmonton" | Find the birth dates corresponding to employees who live in the city of Edmonton. |
<table0>[table_21138] { <col0>[Cat]:[text] <col1>[Artist]:[text] <col2>[Title]:[text] <col3>[Release]:[date] <col4>[text]:[Format] <col5>[text]:[information] } | SELECT "Release date" FROM `<table0>` WHERE "Title" = 'Tell You When' | When was 'Tell You When' released?
|
<table0>[table_name_90] { <col0>[season]:[VARCHAR] <col1>[date]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "may 11, 2002" | During which Season did the may 11, 2002 event take place? |
<table0>[table_20221] { <col0>[Date]:[text] <col1>[Cover]:[model] <col2>[text]:[Centerfold] <col3>[model]:[text] <col4>[Interview]:[subject] <col5>[text]:[Questions] <col6>[text]:[Pictorials] } | SELECT "Centerfold model" FROM `<table0>` WHERE "20 Questions" = 'Oscar de la Hoya' | WHO WAS THE CENTERFOLD MODEL IN THE ISSUE WHERE OSCAR DE LA HOYA ANSWERED THE 20 QUESTIONS?
|
<table0>[microbiologyevents] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[charttime]:[time] <col4>[spec_type_desc]:[text] <col5>[org_name]:[text] } <table1>[d_icd_procedures] { <col0>[row_id]:[number] <col1>[icd9_code]:[text] <col2>[short_title]:[text] <col3>[long_title]:[text]... | SELECT ( SELECT `<table4>`.valuenum FROM `<table4>` WHERE `<table4>`.hadm_id IN ( SELECT `<table7>`.hadm_id FROM `<table7>` WHERE `<table7>`.subject_id = 594 ) AND `<table4>`.itemid IN ( SELECT `<table2>`.itemid FROM `<table2>` WHERE `<table2>`.label = 'po2' ) AND `<table4>`.charttime = '2105-05-20 04:34:00' ) - ( SELE... | tell me the difference of patient 594's amount of po2 measured at 2105-05-20 04:34:00 compared to the value measured at 2105-05-15 19:03:00?
|
<table0>[table_203_734] { <col0>[number]:[year] <col1>[number]:[competition] <col2>[text]:[venue] <col3>[text]:[position] <col4>[text]:[event] <col5>[text]:[notes] } | SELECT MAX( "year" ) FROM `<table0>` | in what year was lorenzo 's latest competition ? |
<table0>[volunteers] { <col0>[INT]:[name] <col1>[VARCHAR]:[100] <col2>[organization_id]:[INT] <col3>[cause]:[VARCHAR] <col4>[hours]:[DECIMAL] } <table1>[organizations] { <col0>[INT]:[name] <col1>[VARCHAR]:[100] <col2>[mission_area]:[VARCHAR] <col3>[state]:[VARCHAR] <col4>[INSERT]:[volunteers] <col5>[VALUES]:[James] <c... | SELECT v.name, o.name as organization_name, v.cause, SUM( v.hours ) as total_hours FROM `<table0>` v INNER JOIN organizations o ON v.organization_id = o.id WHERE o.mission_area IN ( 'Art and Culture', 'Environment' ) GROUP BY v.name, v.organization_id, v.cause HAVING SUM( v.hours ) > 20; | List all volunteers who have contributed more than 20 hours in total, along with their corresponding organization names and the causes they supported, for mission areas Art and Culture and Environment. |
<table0>[Employees] { <col0>[EmployeeID]:[INT] <col1>[VARCHAR]:[Department] <col2>[VARCHAR]:[Gender] <col3>[VARCHAR]:[Community] <col4>[VARCHAR]:[INSERT] } | SELECT ( COUNT( * ) * 100.0 / ( SELECT COUNT( * ) FROM `<table0>` WHERE Department = 'Mining' ) ) AS Percentage FROM `<table0>` WHERE Department = 'Mining' AND Community = 'Indigenous'; | What is the percentage of Indigenous employees in the Mining department? |
<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 MAX( `<table4>`.age ) FROM `<table4>` WHERE `<table4>`.expire_flag = "0" AND `<table4>`.diagnosis = "CORONARY ARTERY DISEASE\CORONARY ARTERY BYPASS GRAFT WITH MVR; ? MAZE" | what is maximum age of patients whose death status is 0 and primary disease is coronary artery disease\coronary artery bypass graft with mvr; ? maze? |
<table0>[table_name_16] { <col0>[name]:[VARCHAR] <col1>[left_office]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "cabinet secretary for culture and external affairs" | What is the Left Office of cabinet secretary for culture and external affairs named? |
<table0>[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>[predicted_graduation_semester]:[int] <col10>[degr... | SELECT DISTINCT `<col12>` FROM `<table6>` WHERE `<col2>` = 'EECS' AND `<col3>` = 522 | For 522 , is there a project ?
|
<table0>[table_6427] { <col0>[Make]:[Model] <col1>[text]:[length] <col2>[text]:[Year] <col3>[real]:[Numbers] <col4>[Quantity]:[Ordered] <col5>[text]:[Fuel] <col6>[Propulsion]:[text] } | SELECT "Fuel Propulsion" FROM `<table0>` WHERE "Numbers ( `<col4>` Ordered )" = '7124-7156 ( 33 buses )' | Which Fuel Propulsion has Numbers (Quantity Ordered) of 7124-7156 (33 buses)?
|
<table0>[table_43640] { <col0>[Year]:[real] <col1>[Rank]:[real] <col2>[Total]:[Ton] <col3>[real]:[Domestic] <col4>[Ton]:[real] <col5>[Foreign]:[Total] <col6>[Ton]:[real] <col7>[Foreign]:[Imports] <col8>[Ton]:[real] <col9>[Foreign]:[Exports] <col10>[Ton]:[real] } | SELECT AVG( "Domestic s Ton" ) FROM `<table0>` WHERE "Foreign Imports s Ton" < '225,281' AND "Year" > '2003' | what is the average domestic s tone when the foreign imports s tone is less than 225,281 and the year is later than 2003?
|
<table0>[marine_species_arctic_ocean] { <col0>[species_name]:[VARCHAR] <col1>[255]:[habitat] <col2>[VARCHAR]:[255] } <table1>[climate_change_impacts_arctic_ocean] { <col0>[species_name]:[VARCHAR] <col1>[255]:[impacts] <col2>[TEXT]:[INSERT] } | SELECT m.species_name, c.impacts FROM `<table0>` m FULL OUTER JOIN climate_change_impacts_arctic_ocean c ON m.species_name = c.species_name WHERE m.habitat = 'Arctic Ocean' OR c.species_name IS NOT NULL; | What are the climate change impacts on marine species in the Arctic Ocean, grouped by species? |
<table0>[cost] { <col0>[costid]:[number] <col1>[uniquepid]:[text] <col2>[patienthealthsystemstayid]:[number] <col3>[eventtype]:[text] <col4>[eventid]:[number] <col5>[chargetime]:[time] } <table1>[medication] { <col0>[medicationid]:[number] <col1>[patientunitstayid]:[number] <col2>[drugname]:[text] <col3>[dosage]:[text... | SELECT MAX( `<table9>`.heartrate ) FROM `<table9>` WHERE `<table9>`.`<table5>`unitstayid IN ( SELECT `<table5>`.`<table5>`unitstayid FROM `<table5>` WHERE `<table5>`.`<table5>`healthsystemstayid IN ( SELECT `<table5>`.`<table5>`healthsystemstayid FROM `<table5>` WHERE `<table5>`.uniquepid = '025-66662' ) ) AND NOT `<ta... | in 12/last year, list the daily maximum heartrate of patient 025-66662. |
<table0>[gsi] { <col0>[course_offering_id]:[int] <col1>[student_id]:[int] } <table1>[program_requirement] { <col0>[program_id]:[int] <col1>[category]:[varchar] <col2>[min_credit]:[int] <col3>[additional_req]:[varchar] } <table2>[campus_job_id] { <col0>[int]:[student_id] <col1>[int]:[location] } <table3>[offering_ins... | SELECT DISTINCT course.department, course.name, course.number, instructor.name FROM course, course_offering, instructor, offering_instructor WHERE course.course_id = course_offering.course_id AND course.name LIKE '%Leading Non-Profit Organizations%' AND NOT instructor.name LIKE '%Etzion%' AND offering_instructor.instru... | Is there another person besides Prof. Etzion that teaches Leading Non-Profit Organizations ?
|
<table0>[table_32028] { <col0>[Week]:[real] <col1>[Date]:[text] <col2>[Opponent]:[text] <col3>[Result]:[text] <col4>[Attendance]:[real] } | SELECT "Result" FROM `<table0>` WHERE "Week" < '2' | What was the outcome of the game that had a week number of less than 2?
|
<table0>[building] { <col0>[INT]:[green_certified] <col1>[BOOLEAN]:[owner_id] } <table1>[person] { <col0>[INT]:[name] } | SELECT `<table0>`.id, person.name FROM `<table0>` INNER JOIN person ON `<table0>`.owner_id = person.id WHERE green_certified = TRUE AND neighborhood = 'downtown'; | List all green-certified buildings in the 'downtown' area with their co-owners. |
<table0>[table_name_19] { <col0>[party]:[VARCHAR] <col1>[first_elected]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "1898" | Which party was first elected in 1898?
|
<table0>[employees] { <col0>[EMPLOYEE_ID]:[decimal] <col1>[FIRST_NAME]:[varchar] <col2>[LAST_NAME]:[varchar] <col3>[EMAIL]:[varchar] <col4>[PHONE_NUMBER]:[varchar] <col5>[HIRE_DATE]:[date] <col6>[JOB_ID]:[varchar] <col7>[SALARY]:[decimal] <col8>[COMMISSION_PCT]:[decimal] <col9>[MANAGER_ID]:[decimal] <col10>[DEPARTMENT_... | SELECT HIRE_DATE, SUM( `<col7>` ) FROM `<table0>` WHERE `<col7>` BETWEEN 8000 AND 12000 AND `<col8>` <> "null" OR `<col10>` <> 40 ORDER BY SUM( `<col7>` ) | For those employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40, draw a bar chart about the distribution of hire_date and the sum of salary bin hire_date by weekday, and order y-axis in asc order.
|
<table0>[table_name_87] { <col0>[ordered]:[VARCHAR] <col1>[name]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "helena" | What ordered has helena as the name?
|
<table0>[athletes] { <col0>[INT]:[name] <col1>[VARCHAR]:[age] <col2>[INT]:[team] <col3>[VARCHAR]:[INSERT] } | SELECT team, AVG( age ) as avg_age FROM `<table0>` GROUP BY team; | What is the average age of athletes in each team? |
<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>[prescr... | SELECT COUNT( DISTINCT `<table4>`.subject_id ) FROM `<table4>` INNER JOIN lab ON `<table4>`.hadm_id = lab.hadm_id WHERE `<table4>`.age < "59" AND lab.label = "Chloride, Whole Blood" | how many patients whose age is less than 59 and lab test name is chloride, whole blood?
|
<table0>[teachers] { <col0>[LastName]:[TEXT] <col1>[FirstName]:[TEXT] <col2>[Classroom]:[INTEGER] } <table1>[list] { <col0>[LastName]:[TEXT] <col1>[FirstName]:[TEXT] <col2>[Grade]:[INTEGER] <col3>[Classroom]:[INTEGER] } | SELECT Grade, COUNT( * ) FROM `<table1>` GROUP BY `<col2>` | Scatter plot to show grade on x axis and the total number on y axis. |
<table0>[film_text] { <col0>[film_id]:[integer] <col1>[title]:[text] <col2>[description]:[text] } <table1>[actor] { <col0>[actor_id]:[integer] <col1>[first_name]:[text] <col2>[last_name]:[text] <col3>[last_update]:[datetime] } <table2>[address] { <col0>[address_id]:[integer] } <table3>[category] { <col0>[category_id... | SELECT T3.name FROM `<table7>` AS T1 INNER JOIN `<table7>`_category AS T2 ON T1.`<table7>`_id = T2.`<table7>`_id INNER JOIN category AS T3 ON T2.category_id = T3.category_id WHERE T1.title = 'AGENT TRUMAN' | What is the category of the film Agent Truman? |
<table0>[current] { <col0>[ballotpedia_id]:[text] <col1>[bioguide_id]:[text] <col2>[birthday_bio]:[date] <col3>[cspan_id]:[real] <col4>[fec_id]:[text] <col5>[first_name]:[text] <col6>[gender_bio]:[text] <col7>[google_entity_id_id]:[text] <col8>[govtrack_id]:[integer] <col9>[house_history_id]:[real] <col10>[icpsr_id]:[r... | SELECT first_name, `<col13>` FROM `<table1>` WHERE `<col7>` = 'F' AND `<col8>` IS NULL AND `<col5>` IS NULL | What are the full names of the non-google female entity legislators that have not been registered in Federal Election Commission data? |
<table0>[campus_job_id] { <col0>[int]:[student_id] <col1>[int]:[location] } <table1>[gsi] { <col0>[course_offering_id]:[int] <col1>[student_id]:[int] } <table2>[student] { <col0>[student_id]:[int] <col1>[lastname]:[varchar] <col2>[firstname]:[varchar] <col3>[program_id]:[int] <col4>[declare_major]:[varchar] <col5>[to... | SELECT DISTINCT course.department, course.name, course.number, `<table7>`.workload, `<table7>`.workload FROM course, `<table7>` WHERE `<table7>`.category LIKE '%ULCS%' AND `<table7>`.course_id = course.course_id AND `<table7>`.workload = ( SELECT MIN( PROGRAM_COURSEalias1.workload ) FROM `<table7>` AS PROGRAM_COURSEali... | What 's the easiest class to take to fulfill the ULCS requirement ? |
<table0>[table_22648285_1] { <col0>[year]:[VARCHAR] <col1>[laps]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "301*" | What year had a race with 301* laps? |
<table0>[departments] { <col0>[DEPARTMENT_ID]:[decimal] <col1>[DEPARTMENT_NAME]:[varchar] <col2>[MANAGER_ID]:[decimal] <col3>[LOCATION_ID]:[decimal] } <table1>[countries] { <col0>[COUNTRY_ID]:[varchar] <col1>[COUNTRY_NAME]:[varchar] <col2>[REGION_ID]:[decimal] } <table2>[employees] { <col0>[EMPLOYEE_ID]:[decimal] <co... | SELECT HIRE_DATE, SUM( `<col10>` ) FROM `<table2>` WHERE `<col7>` BETWEEN 8000 AND 12000 AND `<col8>` <> "null" OR `<col10>` <> 40 | For those employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40, visualize a bar chart about the distribution of hire_date and the sum of department_id bin hire_date by weekday. |
<table0>[table_name_49] { <col0>[score]:[VARCHAR] <col1>[game]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = 4 | what is the score for game 4?
|
<table0>[cinema] { <col0>[LOCATION]:[VARCHAR] <col1>[capacity]:[INTEGER] } | SELECT `<col0>` FROM `<table0>` EXCEPT SELECT `<col0>` FROM `<table0>` WHERE `<col1>` > 800 | Show all the locations where no cinema has capacity over 800. |
<table0>[flight_leg] { <col0>[flight_id]:[int] <col1>[leg_number]:[int] <col2>[leg_flight]:[int] } <table1>[food_service] { <col0>[meal_code]:[text] <col1>[meal_number]:[int] <col2>[compartment]:[text] <col3>[meal_description]:[varchar] } <table2>[flight] { <col0>[aircraft_code_sequence]:[text] <col1>[airline_code]:[... | SELECT DISTINCT flight.flight_id FROM `<table23>` AS AIRPORT_SERVICE_0, `<table23>` AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, fare, fare_basis, flight, flight_fare WHERE ( ( fare_basis.class_type = 'COACH' AND fare.fare_basis_code = fare_basis.fare_basis_code ) AND CITY_1.city_code = AIRPORT_SERVICE_1.city_... | all round trip flights between NEW YORK and MIAMI COACH fare
|
<table0>[PostsWithDeleted] { <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]:... | SELECT AVG( CAST( Score AS FLOAT ) ) AS VOTE FROM `<table5>` WHERE `<table5>`.OwnerUserId = @UserId AND `<table5>`.PostTypeId = 1 | Average Question Score by User. Enter the UserId from the chosen site and find the average question score of that user.
|
<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 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 ( ( flight.airline_code = 'DL' ) AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'SAN FRANCISCO' AND flight.to_airport = A... | does DL fly from ATLANTA to SAN FRANCISCO |
<table0>[diversity_training] { <col0>[employee_name]:[VARCHAR] <col1>[255]:[training_topic] <col2>[VARCHAR]:[255] <col3>[training_hours]:[INT] <col4>[training_completion_date]:[DATE] } | CREATE TABLE diversity_training ( employee_name VARCHAR( 255 ), training_topic VARCHAR( 255 ), training_hours INT, training_completion_date DATE ); | Create a table named 'diversity_training' with columns for employee_name, training_topic, training_hours, and training_completion_date |
<table0>[table_name_19] { <col0>[engine_s]:[VARCHAR] <col1>[year]:[VARCHAR] } | SELECT engine_s_ FROM `<table0>` WHERE `<col1>` = 1983 | What are the engines for 1983? |
<table0>[SalesByWeek] { <col0>[SaleID]:[INT] <col1>[ProductCategory]:[VARCHAR] <col2>[255]:[SaleDate] } <table1>[QuantitySold] { <col0>[QuantitySoldID]:[INT] <col1>[SaleID]:[INT] <col2>[Quantity]:[INT] <col3>[INSERT]:[SalesByWeek] <col4>[SaleID]:[ProductCategory] <col5>[SaleDate]:[VALUES] <col6>[Flower]:[2022] <col7>[... | SELECT ProductCategory, SUM( Quantity ) AS TotalQuantitySold FROM `<table0>` JOIN QuantitySold ON `<table0>`.SaleID = QuantitySold.SaleID WHERE SaleDate >= DATEADD( WEEK, -1, GETDATE( ) ) GROUP BY ProductCategory; | What is the total quantity of each product category sold in the last week? |
<table0>[PostTypes] { <col0>[number]:[text] } <table1>[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]:[DownV... | SELECT Id AS "post_link", Title FROM `<table12>` WHERE Title LIKE '%:%' AND LEFT( Title, STR_POSITION( Title, ':' ) - 1 ) IN ( SELECT Tags.TagName FROM `<table2>` INNER JOIN Tags ON `<table2>`.TagId = Tags.Id WHERE `<table2>`.PostId = `<table12>`.Id ) ORDER BY CreationDate DESC | Posts whose titles are prefixed with one of its tags. Posts whose titles are of the form 'Tag: Blah blah blah', where 'Tag' is already one of the tags on that post. |
<table0>[Users] { <col0>[user_id]:[INT] <col1>[has_heart_rate_monitor]:[BOOLEAN] <col2>[state]:[VARCHAR] } | SELECT COUNT( * ) FROM `<table0>` WHERE `<col1>` = true AND `<col2>` = 'TX'; | How many users have a heart rate monitor and live in Texas? |
<table0>[rd_annual] { <col0>[country]:[varchar] <col1>[year]:[int] <col2>[expenditure]:[int] } | SELECT country, AVG( `<col2>` ) FROM `<table0>` GROUP BY `<col0>` ORDER BY AVG( `<col2>` ) DESC LIMIT 2 | What were the top 2 countries with the highest average R&D expenditure per year? |
<table0>[bank] { <col0>[no_of_customers]:[INTEGER] <col1>[state]:[VARCHAR] } | SELECT AVG( `<col0>` ) FROM `<table0>` WHERE `<col1>` = 'Utah' | Find the average number of customers in all banks of Utah state. |
<table0>[table_name_12] { <col0>[silver]:[VARCHAR] <col1>[republic]:[VARCHAR] <col2>[total]:[VARCHAR] } | SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "latvian ssr" AND `<col2>` > 6 | Can you tell me total number of Silver that has the Republic of latvian ssr, and the Total larger than 6? |
<table0>[geographic] { <col0>[city]:[text] <col1>[county]:[text] <col2>[region]:[text] } <table1>[generalinfo] { <col0>[id_restaurant]:[integer] <col1>[label]:[text] <col2>[food_type]:[text] <col3>[city]:[text] <col4>[review]:[real] } <table2>[location] { <col0>[id_restaurant]:[integer] <col1>[street_num]:[integer] <... | SELECT T2.label FROM `<table0>` AS T1 INNER JOIN generalinfo AS T2 ON T1.city = T2.city WHERE T1.region = 'lake tahoe' AND T1.county = 'el dorado county' | What is the name of the restaurant that is located in El Dorado County, Lake Tahoe region? |
<table0>[table_name_29] { <col0>[year]:[VARCHAR] <col1>[report]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "not held" | When was a report not held? |
<table0>[procedures] { <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 `<table4>`.subject_id ) FROM `<table4>` INNER JOIN procedures ON `<table4>`.hadm_id = procedures.hadm_id WHERE `<table4>`.ethnicity = "AMERICAN INDIAN/ALASKA NATIVE" AND procedures.short_title = "Chordae tendineae ops" | what is the number of patients whose ethnicity is american indian/alaska native and procedure short title is chordae tendineae ops? |
<table0>[AutonomousDrivingResearch] { <col0>[INT]:[Project] <col1>[VARCHAR]:[Country] <col2>[VARCHAR]:[StartDate] <col3>[DATE]:[INSERT] } | SELECT Country, COUNT( * ) FROM `<table0>` WHERE StartDate >= DATEADD( year, -5, GETDATE( ) ) GROUP BY Country; | What is the total number of autonomous driving research projects for each country in the last 5 years? |
<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 `<table4>`.subject_id ) FROM `<table4>` INNER JOIN procedures ON `<table4>`.hadm_id = procedures.hadm_id WHERE `<table4>`.admission_type = "ELECTIVE" AND procedures.long_title = "Small-to-small intestinal anastomosis" | what is the number of elective hospital admission patients who had small-to-small intestinal anastomosis? |
<table0>[d_labitems] { <col0>[row_id]:[number] <col1>[itemid]:[number] <col2>[label]:[text] } <table1>[patients] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[gender]:[text] <col3>[dob]:[time] <col4>[dod]:[time] } <table2>[inputevents_cv] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[had... | SELECT COUNT( * ) FROM `<table13>` WHERE `<table13>`.icd9_code = ( SELECT `<table9>`.icd9_code FROM `<table9>` WHERE `<table9>`.short_title = 'exc/dest intvrt disc nos' ) AND `<table13>`.hadm_id IN ( SELECT `<table7>`.hadm_id FROM `<table7>` WHERE `<table7>`.subject_id = 73595 ) AND STRFTIME( '%y', `<table13>`.charttim... | count how many times until 2104 patient 73595 has had a exc/dest intvrt disc nos. |
<table0>[cultural_events] { <col0>[INT]:[event_type] <col1>[VARCHAR]:[event_date] <col2>[DATE]:[INSERT] } <table1>[funding_sources] { <col0>[INT]:[event_id] <col1>[INT]:[source_type] <col2>[VARCHAR]:[INSERT] } | SELECT c.event_type, COUNT( DISTINCT f.source_type ) FROM `<table0>` c LEFT JOIN funding_sources f ON c.id = f.event_id WHERE c.event_date >= '2021-01-01' GROUP BY c.event_type; | How many funding sources supported each type of cultural event in the past year? |
<table0>[table_name_95] { <col0>[incumbent]:[VARCHAR] <col1>[district]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "colorado 4" | Who is the incumbent for the Colorado 4 district? |
<table0>[ReviewTaskResultTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table1>[PostFeedback] { <col0>[number]:[PostId] <col1>[number]:[IsAnonymous] <col2>[boolean]:[VoteTypeId] <col3>[number]:[CreationDate] } <table2>[SuggestedEditVotes] { <col0>[number]:[SuggestedEditId] <col1>[number]:[UserId] <col2>... | SELECT ROW_NUMBER( ) OVER ( ORDER BY Reputation DESC ) AS "#", Id AS "user_link", Reputation FROM `<table23>` WHERE LOWER( Location ) LIKE '%bangladesh%' OR UPPER( Location ) LIKE '%bd' ORDER BY Reputation DESC LIMIT 100 | Top 100 users from Bangladesh.
|
<table0>[mzjzjlb] { <col0>[HXPLC]:[number] <col1>[HZXM]:[text] <col2>[JLSJ]:[time] <col3>[JZJSSJ]:[time] <col4>[JZKSBM]:[text] <col5>[JZKSMC]:[text] <col6>[JZKSRQ]:[time] <col7>[JZLSH]:[text] <col8>[JZZDBM]:[text] <col9>[JZZDSM]:[text] <col10>[JZZTDM]:[number] <col11>[JZZTMC]:[text] <col12>[text]:[KLX] <col13>[number]:... | SELECT * FROM `<table3>` JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN jybgb_jyjgzbb ON `<table3>`.YLJGDM = mzjzjlb.YLJGDM AND `<table3>`.KH = mzjzjlb.KH AND `<table3>`.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jybgb_jyjgzbb.YLJGDM AND jybgb.BGDH ... | 这位患者68694812过往有过哪些异常情况么?
|
<table0>[funding] { <col0>[source]:[VARCHAR] <col1>[255]:[INT] } | DELETE FROM funding; | Delete all records from the 'funding' table |
<table0>[date_day] { <col0>[month_number]:[int] <col1>[day_number]:[int] <col2>[year]:[int] <col3>[day_name]:[varchar] } <table1>[flight_fare] { <col0>[flight_id]:[int] <col1>[fare_id]:[int] } <table2>[days] { <col0>[days_code]:[varchar] <col1>[day_name]:[varchar] } <table3>[fare] { <col0>[fare_id]:[int] <col1>[from... | SELECT DISTINCT ground_service.transport_type FROM city, ground_service WHERE city.city_name = 'DALLAS' AND ground_service.city_code = city.city_code | describe ground transportation in DALLAS
|
<table0>[table_name_66] { <col0>[attendance]:[INTEGER] <col1>[loss]:[VARCHAR] } | SELECT AVG( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "papelbon ( 0–1 )" | What was the average attendance for games with a loss of papelbon (0 1)?
|
<table0>[wildlife_habitat] { <col0>[country_code]:[CHAR] <col1>[year]:[INT] <col2>[habitat_area]:[INT] } | INSERT INTO wildlife_habitat ( country_code, year, habitat_area ) VALUES ( 'ARG', 2024, 100000 ); | Insert new record of wildlife habitat data for Argentina in 2024 |
<table0>[criminal] { <col0>[case_id]:[INT] <col1>[client_name]:[VARCHAR] <col2>[case_type]:[VARCHAR] <col3>[case_outcome]:[VARCHAR] <col4>[case_date]:[DATE] } | INSERT INTO criminal ( client_name, case_type, case_outcome, case_date ) VALUES ( 'Leah Williams', 'criminal', 'in_progress', '2022-10-10' ); | Insert a new case for client 'Leah Williams' with case type 'criminal', outcome 'in_progress', and date '2022-10-10' into the 'criminal' table |
<table0>[paper] { <col0>[paperid]:[int] <col1>[title]:[varchar] <col2>[venueid]:[int] <col3>[year]:[int] <col4>[numciting]:[int] <col5>[numcitedby]:[int] <col6>[journalid]:[int] } <table1>[paperkeyphrase] { <col0>[paperid]:[int] <col1>[keyphraseid]:[int] } <table2>[paperdataset] { <col0>[paperid]:[int] <col1>[dataset... | SELECT DISTINCT paper.paperid FROM author, cite, paper, writes WHERE author.authorname = 'Daniel A Reed' AND paper.paperid = cite.citingpaperid AND writes.authorid = author.authorid AND writes.paperid = cite.citedpaperid | Which papers cite Daniel A Reed ?
|
<table0>[table_21632864_1] { <col0>[third_place]:[VARCHAR] <col1>[runners_up]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "Laranja Kyoto" | who got the third position when laranja kyoto got the second position? |
<table0>[table_name_84] { <col0>[high_assists]:[VARCHAR] <col1>[team]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "lakers" | How many high assists did the Lakers have? |
<table0>[table_52908] { <col0>[Ship]:[text] <col1>[Date]:[Commissioned] <col2>[real]:[Gross] <col3>[Tonnage]:[real] <col4>[Propulsion]:[text] <col5>[Material]:[text] } | SELECT SUM( "Gross Tonnage" ) FROM `<table0>` WHERE "Ship" = 'isis' AND "Date Commissioned" < '1842' | Tell me the sum of Gross Tonnage for isis ship on date commisioned less than 1842
|
<table0>[dapps] { <col0>[dapp_id]:[INT] <col1>[dapp_name]:[VARCHAR] <col2>[255]:[total_transactions] } <table1>[contracts_dapps] { <col0>[contract_id]:[INT] <col1>[dapp_id]:[INT] } <table2>[smart_contracts] { <col0>[contract_id]:[INT] <col1>[contract_name]:[VARCHAR] <col2>[255]:[total_transactions] } | SELECT d.dapp_name, sc.contract_name, SUM( sc.total_transactions ) as total_transactions FROM `<table0>` d JOIN contracts_`<table0>` cd ON d.dapp_id = cd.dapp_id JOIN smart_contracts sc ON cd.contract_id = sc.contract_id GROUP BY d.dapp_id, sc.contract_name ORDER BY total_transactions DESC, d.dapp_id DESC LIMIT 3; | Identify the top 3 decentralized applications with the highest number of transactions, along with the total number of transactions for the smart contracts associated with each application. |
<table0>[table_train_81] { <col0>[int]:[high_glucose] <col1>[bool]:[mini_mental_state_examination_mmse] <col2>[int]:[uncontrolled_diabetes] <col3>[bool]:[modified_hachinski_ischemia_scale] <col4>[int]:[clinical_dementia_rating_cdr] <col5>[float]:[NOUSE] } | SELECT * FROM `<table0>` WHERE mini_mental_state_examination_mmse > 27 | mmse total score > 27 |
<table0>[Emergency_Supplies] { <col0>[INT]:[PRIMARY] <col1>[KEY]:[supply] <col2>[VARCHAR]:[255] <col3>[country_id]:[INT] <col4>[quantity]:[INT] <col5>[supply_date]:[DATE] } | SELECT country_id, AVG( `<col4>` ) FROM `<table0>` WHERE EXTRACT( MONTH FROM `<col5>` ) = EXTRACT( MONTH FROM CURRENT_DATE - INTERVAL '1' MONTH ) GROUP BY country_id; | Calculate the average number of emergency supplies distributed in the last month for each country? |
<table0>[table_200_35] { <col0>[number]:[party] <col1>[text]:[active] <col2>[voters]:[number] <col3>[inactive]:[voters] <col4>[number]:[total] <col5>[voters]:[number] <col6>[percentage]:[text] } | SELECT "active voters" FROM `<table0>` WHERE "party" = 'republican' | as of october 25 , 2005 , how many active voters does the republican party have ? |
<table0>[jobs] { <col0>[job_id]:[int] <col1>[job_title]:[varchar] <col2>[description]:[varchar] <col3>[requirement]:[varchar] <col4>[city]:[varchar] <col5>[state]:[varchar] <col6>[country]:[varchar] <col7>[zip]:[int] } <table1>[course_tags_count] { <col0>[course_id]:[int] <col1>[clear_grading]:[int] <col2>[pop_quiz]:[... | SELECT DISTINCT `<col3>` FROM `<table13>` WHERE ( `<col7>` LIKE '%Investigations%' OR `<col1>` LIKE '%Investigations%' ) AND `<col2>` = 'EECS' | What is the Investigations class course number ? |
<table0>[ReviewTaskResults] { <col0>[number]:[ReviewTaskId] <col1>[number]:[ReviewTaskResultTypeId] <col2>[number]:[CreationDate] <col3>[time]:[RejectionReasonId] <col4>[number]:[Comment] } <table1>[PostTags] { <col0>[PostId]:[number] <col1>[TagId]:[number] } <table2>[SuggestedEditVotes] { <col0>[number]:[SuggestedEd... | SELECT TagName, ts.SourceTagName, Count FROM `<table10>` AS t LEFT JOIN TagSynonyms AS ts ON t.TagName = ts.TargetTagName WHERE ( TagName LIKE '%azure%' ) ORDER BY Count DESC | Azure-Stack OverFlow tags w/ azure + ' '.
|
<table0>[Rating] { <col0>[rID]:[int] <col1>[mID]:[int] <col2>[stars]:[int] <col3>[ratingDate]:[date] } <table1>[Reviewer] { <col0>[rID]:[int] <col1>[name]:[text] } <table2>[Movie] { <col0>[mID]:[int] <col1>[title]:[text] <col2>[year]:[int] <col3>[director]:[text] } | SELECT T2.title, SUM( MIN( T1.stars ) ) FROM `<table0>` AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY T2.title ORDER BY T2.title | Visualize the total smallest rating of different movie title using a bar chart, and sort by the X in asc please. |
<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, SUM( `<col0>` ) FROM `<table0>` GROUP BY `<col9>` ORDER BY SUM( `<col0>` ) DESC | Show sum team id from each all home, and could you show by the total number in desc? |
<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>[d_labitems] { <col0>[row_id]:[number] <col1>[itemid]:[number]... | SELECT COUNT( DISTINCT `<table10>`.subject_id ) FROM `<table10>` WHERE `<table10>`.hadm_id IN ( SELECT `<table3>`.hadm_id FROM `<table3>` WHERE `<table3>`.careunit = 'tsicu' AND STRFTIME( '%y', `<table3>`.intime ) = '2102' ) | how many patients were staying in tsicu careunits in 2102? |
<table0>[procedures] { <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 MIN( `<table2>`.age ) FROM `<table2>` WHERE `<table2>`.marital_status = "DIVORCED" AND `<table2>`.admission_type = "ELECTIVE" | what is minimum age of patients whose marital status is divorced and admission type is elective? |
<table0>[TagSynonyms] { <col0>[number]:[SourceTagName] <col1>[text]:[TargetTagName] <col2>[text]:[CreationDate] <col3>[time]:[OwnerUserId] <col4>[number]:[AutoRenameCount] <col5>[number]:[LastAutoRename] <col6>[time]:[Score] <col7>[number]:[ApprovedByUserId] <col8>[number]:[ApprovalDate] } <table1>[PostHistory] { <col... | SELECT t.TagName, TIME_TO_STR( p.CreationDate, '%q' ) AS q, YEAR( p.CreationDate ) AS y, COUNT( p.Id ) AS Num`<table15>`, SUM( CAST( p.AnswerCount AS INT ) ) AS NumAnswerCount FROM `<table15>` AS p JOIN PostTags AS pt ON p.Id = pt.PostId JOIN Tags AS t ON t.Id = pt.TagId WHERE YEAR( p.CreationDate ) >= 2020 AND TIME_TO... | Top Tags and Answer Count.
|
<table0>[table_76760] { <col0>[Player]:[text] <col1>[Pos]:[text] <col2>[Nationality]:[text] <col3>[Team]:[text] <col4>[Previous]:[team] <col5>[text]:[Years] <col6>[NBA]:[experience] <col7>[real]:[Career] <col8>[franchise]:[text] } | SELECT "Player" FROM `<table0>` WHERE "Team" = 'buffalo braves' AND "Previous team" = 'los angeles lakers' AND "Career with the `<col8>` [b ]" = '1970' | Who is the player from the Buffalo Braves with the previous team Los Angeles Lakers and a career with the franchase in 1970?
|
<table0>[table_name_77] { <col0>[opponent]:[VARCHAR] <col1>[score]:[VARCHAR] <col2>[january]:[VARCHAR] <col3>[game]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col2>` > 8 AND `<col3>` < 48 AND `<col1>` = "5–3" | Which Opponent has a January larger than 8, and a Game smaller than 48, and a Score of 5–3? |
<table0>[Spacecraft] { <col0>[INT]:[name] <col1>[VARCHAR]:[255] <col2>[manufacturer]:[VARCHAR] <col3>[255]:[budget] <col4>[DECIMAL]:[INSERT] } | SELECT SUM( budget ) FROM `<table0>` WHERE `<col2>` IN ( 'AeroSpace Inc.', 'SpaceX' ); | What is the total budget for all spacecraft manufactured by 'AeroSpace Inc.' and 'SpaceX'? |
<table0>[projects] { <col0>[code]:[text] <col1>[name]:[text] <col2>[hours]:[number] } <table1>[scientists] { <col0>[ssn]:[number] <col1>[name]:[text] } <table2>[assignedto] { <col0>[scientist]:[number] <col1>[project]:[text] } | SELECT COUNT( DISTINCT `<col0>` ) FROM `<table2>` | Count the number of different scientists assigned to any project. |
<table0>[table_72400] { <col0>[District]:[text] <col1>[Incumbent]:[text] <col2>[Party]:[text] <col3>[elected]:[text] <col4>[Result]:[text] <col5>[Candidates]:[text] } | SELECT COUNT( "First elected" ) FROM `<table0>` WHERE "Incumbent" = 'Noble Jones Gregory' | How many times was incumbent Noble Jones Gregory first elected?
|
<table0>[rural_infrastructure] { <col0>[INT]:[project_name] <col1>[VARCHAR]:[255] <col2>[budget]:[FLOAT] <col3>[state]:[VARCHAR] } | SELECT MIN( `<col2>` ) FROM `<table0>` WHERE `<col3>` = 'Bahia' | What is the minimum budget for rural infrastructure projects in Brazil's Bahia state? |
<table0>[table_name_25] { <col0>[crowd]:[INTEGER] <col1>[venue]:[VARCHAR] } | SELECT MIN( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "princes park" | Which Crowd has a Venue of princes park?
|
<table0>[procedures] { <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 `<table4>`.subject_id ) FROM `<table4>` INNER JOIN prescriptions ON `<table4>`.hadm_id = prescriptions.hadm_id WHERE prescriptions.route = "ID" | how many patients have the drug route as id? |
<table0>[lab] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[itemid]:[text] <col3>[charttime]:[text] <col4>[flag]:[text] <col5>[value_unit]:[text] <col6>[label]:[text] <col7>[fluid]:[text] } <table1>[demographic] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[name]:[text] <col3>[marital_status]:[... | SELECT COUNT( DISTINCT `<table1>`.subject_id ) FROM `<table1>` INNER JOIN diagnoses ON `<table1>`.hadm_id = diagnoses.hadm_id WHERE `<table1>`.days_stay > "4" AND diagnoses.icd9_code = "99681" | provide the number of patients whose days of hospital stay is greater than 4 and diagnoses icd9 code is 99681? |
<table0>[table_21348] { <col0>[Date]:[text] <col1>[Opponent]:[text] <col2>[Venue]:[text] <col3>[Result]:[text] <col4>[Attendance]:[real] <col5>[Competition]:[text] <col6>[Man]:[Match] } | SELECT "Result" FROM `<table0>` WHERE "Man of the Match" = 'Lukas Smital' AND "Venue" = 'Home' | Name the result for lukas smital and home
|
<table0>[regions] { <col0>[REGION_ID]:[decimal] <col1>[REGION_NAME]:[varchar] } <table1>[departments] { <col0>[DEPARTMENT_ID]:[decimal] <col1>[DEPARTMENT_NAME]:[varchar] <col2>[MANAGER_ID]:[decimal] <col3>[LOCATION_ID]:[decimal] } <table2>[countries] { <col0>[COUNTRY_ID]:[varchar] <col1>[COUNTRY_NAME]:[varchar] <col2... | SELECT HIRE_DATE, AVG( `<col7>` ) FROM `<table3>` WHERE `<col7>` BETWEEN 8000 AND 12000 AND `<col8>` <> "null" OR `<col10>` <> 40 | For those employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40, give me the comparison about the average of salary over the hire_date bin hire_date by time.
|
<table0>[AwardsMisc] { <col0>[name]:[text] <col1>[text]:[award] <col2>[text]:[year] <col3>[integer]:[lgID] <col4>[text]:[note] } <table1>[HOF] { <col0>[year]:[integer] <col1>[hofID]:[text] <col2>[name]:[text] <col3>[category]:[text] } <table2>[Teams] { <col0>[year]:[integer] <col1>[lgID]:[text] <col2>[tmID]:[text] <c... | SELECT T2.playerID, T2.tmID FROM ( SELECT `<col0>` FROM `<table5>` WHERE `<col8>` IS NOT NULL ORDER BY `<col8>` ASC LIMIT 1 ) AS T1 INNER JOIN ( SELECT DISTINCT playerID, `<col3>` FROM `<table11>` WHERE `<col1>` BETWEEN 1925 AND 1936 ) AS T2 ON T1.playerID = T2.playerID | Who is the shortest player and state the team ID of that player from 1925 to 1936. |
<table0>[songs] { <col0>[songid]:[number] <col1>[title]:[text] } <table1>[albums] { <col0>[aid]:[number] <col1>[title]:[text] <col2>[year]:[number] <col3>[label]:[text] <col4>[type]:[text] } <table2>[band] { <col0>[number]:[firstname] <col1>[text]:[lastname] } <table3>[instruments] { <col0>[songid]:[number] <col1>[b... | SELECT T2.firstname, T2.lastname FROM `<table6>` AS T1 JOIN band AS T2 ON T1.bandmate = T2.id JOIN songs AS T3 ON T3.songid = T1.songid WHERE T3.title = "Badlands" | Who performed the song named 'Badlands'? Show the first name and the last name.
|
<table0>[table_45218] { <col0>[Tournament]:[text] <col1>[2002]:[text] <col2>[2004]:[text] <col3>[2005]:[text] <col4>[2006]:[text] } | SELECT "2006" FROM `<table0>` WHERE "2002" = '0–1' | What shows for 2006 when 2002 is 0 1?
|
<table0>[film_text] { <col0>[film_id]:[integer] <col1>[title]:[text] <col2>[description]:[text] } <table1>[actor] { <col0>[actor_id]:[integer] <col1>[first_name]:[text] <col2>[last_name]:[text] <col3>[last_update]:[datetime] } <table2>[address] { <col0>[address_id]:[integer] } <table3>[category] { <col0>[category_id... | SELECT T2.first_name, T2.last_name FROM `<table12>` AS T1 INNER JOIN customer AS T2 ON T1.customer_id = T2.customer_id ORDER BY T1.amount DESC LIMIT 1 | Please give the full name of the customer who had made the biggest amount of payment in one single film rental. |
<table0>[table_68673] { <col0>[Year]:[real] <col1>[Total]:[Region] <col2>[real]:[Mackay] <col3>[real]:[Pioneer] <col4>[real]:[Mirani] <col5>[real]:[Sarina] } | SELECT SUM( "Pioneer" ) FROM `<table0>` WHERE "Sarina" < '3,268' AND "Mirani" < '4,412' | What is the Pioneer population with a Sarina population less than 3,268 and a Mirani population less than 4,412?
|
<table0>[PlayerDailyPlaytime] { <col0>[PlayerID]:[INT] <col1>[PlayDate]:[DATE] <col2>[Playtime]:[INT] } | SELECT PlayerID, AVG( `<col2>` ) as AvgPlaytime FROM `<table0>` WHERE `<col1>` >= '2022-01-01' AND `<col1>` <= '2022-01-31' GROUP BY `<col0>` | What is the average playtime per day for each player, in the past month? |
<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>`.marital_status = "DIVORCED" AND `<table0>`.dod_year <= "2183.0" | what number of patients were divorced and died in or before 2183?
|
<table0>[table_name_82] { <col0>[acquisition_via]:[VARCHAR] <col1>[school_club_team]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "state" | Which is the acquisition via that has a school or club team of state?
|
<table0>[cost] { <col0>[costid]:[number] <col1>[uniquepid]:[text] <col2>[patienthealthsystemstayid]:[number] <col3>[eventtype]:[text] <col4>[eventid]:[number] <col5>[chargetime]:[time] } <table1>[microlab] { <col0>[microlabid]:[number] <col1>[patientunitstayid]:[number] <col2>[culturesite]:[text] <col3>[organism]:[tex... | SELECT COUNT( * ) > 0 FROM `<table5>` WHERE `<table5>`.`<table2>`unitstayid IN ( SELECT `<table2>`.`<table2>`unitstayid FROM `<table2>` WHERE `<table2>`.`<table2>`healthsystemstayid IN ( SELECT `<table2>`.`<table2>`healthsystemstayid FROM `<table2>` WHERE `<table2>`.uniquepid = '022-89058' AND NOT `<table2>`.hospitaldi... | have acetaminophen, 50 ml vial : dextrose 50 % iv soln, or acetaminophen (tylenol) tablet 650 mg been ordered for patient 022-89058 during the first hospital encounter?
|
<table0>[PostTags] { <col0>[PostId]:[number] <col1>[TagId]:[number] } <table1>[CloseReasonTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table2>[ReviewTaskTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table3>[Users] { <col0>[number]:[Reputation] <col1>[number]:[CreationDate] <col2>[time]... | SELECT ROW_NUMBER( ) OVER ( ORDER BY u.DisplayName ), b.UserId, u.DisplayName AS Name FROM `<table3>` AS u, Badges AS b, Badges AS html, Badges AS js WHERE b.Name = 'css' AND b.Class = 1 AND html.Name = 'html' AND html.Class = 1 AND js.Name = 'javascript' AND js.Class = 1 AND u.Id = b.UserId AND u.Id = html.UserId AND ... | Users with CSS gold badge.
|
<table0>[military_bases] { <col0>[INT]:[base_name] <col1>[TEXT]:[country] <col2>[TEXT]:[num_soldiers] <col3>[INT]:[INSERT] } | SELECT country, COUNT( * ) as total_bases FROM `<table0>` GROUP BY country; | What is the total number of military bases for each country? |
<table0>[table_204_53] { <col0>[number]:[date] <col1>[text]:[result] <col2>[text]:[opponent] <col3>[text]:[event] <col4>[text]:[location] <col5>[text]:[method] <col6>[text]:[round] <col7>[number]:[time] } | SELECT COUNT( "event" ) FROM `<table0>` WHERE "location" = 'netherlands' | how many matches were held in the netherlands ? |
<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>[prescr... | SELECT COUNT( DISTINCT `<table3>`.subject_id ) FROM `<table3>` WHERE `<table3>`.marital_status = "MARRIED" | let me know the number of patients who are married.
|
<table0>[table_27202] { <col0>[real]:[Episode] <col1>[text]:[Air] <col2>[Date]:[text] <col3>[Timeslot]:[EST] <col4>[text]:[Rating] <col5>[text]:[Share] <col6>[real]:[Rating] <col7>[Share]:[text] <col8>[Viewers]:[text] <col9>[Weekly]:[Rank] } | SELECT "Viewers ( m )" FROM `<table0>` WHERE "Episode" = 'Blowups' | How many millions of viewers watched the episode 'blowups
|
<table0>[table_name_9] { <col0>[player]:[VARCHAR] <col1>[year]:[VARCHAR] } | SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = 1976 | Who was the player in 1976?
|
<table0>[prescriptions] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icustay_id]:[text] <col3>[drug_type]:[text] <col4>[drug]:[text] <col5>[formulary_drug_cd]:[text] <col6>[route]:[text] <col7>[drug_dose]:[text] } <table1>[diagnoses] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[te... | SELECT COUNT( DISTINCT `<table2>`.subject_id ) FROM `<table2>` INNER JOIN prescriptions ON `<table2>`.hadm_id = prescriptions.hadm_id WHERE prescriptions.drug = "Alteplase ( Catheter Clearance )" | give me the number of patients whose drug name is alteplase (catheter clearance)?
|
<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>[lab] {... | SELECT COUNT( DISTINCT `<table4>`.subject_id ) FROM `<table4>` INNER JOIN procedures ON `<table4>`.hadm_id = procedures.hadm_id WHERE `<table4>`.age < "77" AND procedures.icd9_code = "4632" | give me the number of patients whose age is less than 77 and procedure icd9 code is 4632?
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.