schema
stringlengths
20
14.6k
query
stringlengths
17
2.58k
question
stringlengths
8
1.06k
<table0>[Staff_Roles] { <col0>[role_code]:[VARCHAR] <col1>[role_description]:[VARCHAR] } <table1>[Document_Types] { <col0>[document_type_code]:[VARCHAR] <col1>[document_description]:[VARCHAR] } <table2>[Projects] { <col0>[project_id]:[INTEGER] <col1>[organisation_id]:[INTEGER] <col2>[project_details]:[VARCHAR] } <ta...
SELECT date_from, COUNT( `<col3>` ) FROM `<table8>` ORDER BY COUNT( `<col3>` )
When do all the researcher role staff start to work? Bin the time into weekday interval and count them with a bar chart, I want to list in asc by the Y-axis please.
<table0>[news_organizations] { <col0>[INT]:[name] <col1>[VARCHAR]:[country] <col2>[VARCHAR]:[articles_published] <col3>[INT]:[INSERT] }
SELECT name, country, articles_published FROM `<table0>` WHERE country = 'Africa' ORDER BY articles_published DESC LIMIT 3;
Who are the top 3 news organizations in Africa in terms of articles published in 2021?
<table0>[table_29639] { <col0>[Season]:[text] <col1>[Episodes]:[real] <col2>[Timeslot]:[EST] <col3>[text]:[Season] <col4>[premiere]:[text] <col5>[Season]:[finale] <col6>[text]:[season] <col7>[text]:[Rank] <col8>[text]:[Viewers] <col9>[millions]:[text] }
SELECT "Season premiere" FROM `<table0>` WHERE "Season finale" = 'May 22, 2007'
What season premiere date had a finale on may 22, 2007?
<table0>[Vessels] { <col0>[INT]:[VARCHAR] <col1>[Type]:[VARCHAR] <col2>[Safety_Inspections]:[INT] <col3>[Engine_Capacity]:[INT] }
SELECT Name, Engine_Capacity, `<col2>` FROM `<table0>` WHERE `<col2>` = 0 OR `<col3>` > 4000 AND `<col1>` != 'Passenger Ship';
Display the vessel names, engine capacities, and safety inspection status for vessels that have not had any safety inspections or have an engine capacity greater than 4000, excluding passenger ships?
<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>[jobs] { <col0>[JOB_ID]:[varchar] <col1>[JOB_TITLE]:[varchar] <col2>[MIN_SALARY]:[decimal] <col3>[MAX_SALARY]...
SELECT HIRE_DATE, COUNT( `<col5>` ) FROM `<table6>` WHERE NOT `<col0>` IN ( SELECT `<col0>` FROM `<table5>` ) ORDER BY COUNT( `<col5>` )
For those employees who did not have any job in the past, return a bar chart about the distribution of hire_date and the amount of hire_date bin hire_date by weekday, and display y axis in asc order.
<table0>[table_name_63] { <col0>[place]:[VARCHAR] <col1>[score]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = 69 - 70 - 72 = 211
what country has a score of 69-70-72=211?
<table0>[service_union] { <col0>[employee_id]:[INT] <col1>[department]:[VARCHAR] <col2>[salary]:[DECIMAL] }
SELECT AVG( `<col2>` ) FROM `<table0>` WHERE `<col1>` = 'Cleaning';
What is the average salary of 'Cleaning' staff in the 'service_union' table?
<table0>[table_name_29] { }
SELECT 1992 FROM `<table0>` WHERE 1990 = "grand slams"
What is 1992, when 1990 is "Grand Slams"?
<table0>[table_48323] { <col0>[Year]:[real] <col1>[Venue]:[text] <col2>[Winner]:[text] <col3>[Runner]:[text] <col4>[Place]:[text] }
SELECT "Third Place" FROM `<table0>` WHERE "Year" = '2012'
Who took third place in 2012?
<table0>[africa_scores] { <col0>[region]:[TEXT] <col1>[index_score]:[INT] }
SELECT region, index_score, COUNT( * ) FROM `<table0>` GROUP BY `<col1>` ORDER BY index_score;
What is the distribution of digital divide index scores by region in Africa?
<table0>[greenhouse_gas_emissions] { <col0>[country]:[VARCHAR] <col1>[255]:[co2_emissions] <col2>[DECIMAL]:[year] <col3>[INT]:[continent] <col4>[VARCHAR]:[255] } <table1>[continent_map] { <col0>[country]:[VARCHAR] <col1>[255]:[continent] <col2>[VARCHAR]:[255] }
SELECT c.continent, SUM( g.co2_emissions ) as total_emissions FROM `<table0>` g INNER JOIN continent_map c ON g.country = c.country GROUP BY c.continent;
What is the total CO2 emissions for each continent in the 'greenhouse_gas_emissions' table?
<table0>[rural_clinics] { <col0>[INT]:[region] <col1>[VARCHAR]:[255] <col2>[name]:[VARCHAR] <col3>[255]:[patient_volume] <col4>[INT]:[INSERT] }
SELECT `<col2>` FROM `<table0>` WHERE region = 'Appalachian' ORDER BY patient_volume ASC LIMIT 1;
What is the name of the rural clinic with the lowest patient volume in the Appalachian region?
<table0>[ocean_acidification] { <col0>[INT]:[location] <col1>[VARCHAR]:[FLOAT] <col2>[date]:[DATE] }
INSERT INTO ocean_acidification ( location, pH, date ) VALUES ( 'Pacific Ocean', 7.8, '2022-03-02' );
Insert a new record in the table "ocean_acidification" with values 'Pacific Ocean', 7.8, '2022-03-02'
<table0>[trees] { <col0>[tree_id]:[INT] <col1>[region_id]:[INT] <col2>[year]:[INT] }
SELECT region_id, year, SUM( num_`<table0>` ) AS total_`<table0>`, RANK( ) OVER ( PARTITION BY `<col2>` ORDER BY SUM( num_`<table0>` ) DESC ) AS tree_rank FROM `<table0>` GROUP BY region_id, `<col2>` ORDER BY year, tree_rank ASC;
For each year, find the total number of trees in each region and rank them in descending order of total trees.
<table0>[ocean_map] { <col0>[project]:[VARCHAR] <col1>[depth]:[FLOAT] }
SELECT project, AVG( `<col1>` ) as avg_depth FROM `<table0>` GROUP BY project;
What is the average depth of the ocean floor for each mapping project, along with the project name?
<table0>[VehicleSafetyTests] { <col0>[INT]:[Vehicle] <col1>[VARCHAR]:[TestDate] <col2>[DATE]:[INSERT] }
SELECT COUNT( * ) FROM `<table0>` WHERE Vehicle = 'Ford Mustang' AND TestDate >= DATEADD( year, -3, GETDATE( ) );
How many safety tests has the Ford Mustang passed in the last 3 years?
<table0>[table_name_48] { <col0>[total]:[VARCHAR] <col1>[silver]:[VARCHAR] <col2>[bronze]:[VARCHAR] <col3>[rank]:[VARCHAR] }
SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col2>` > 13 AND `<col3>` = "8" AND `<col1>` < 11
How many Total(s) are there, when the number of Bronze is greater than 13, when the Rank is 8, and when the number of Silver is less than 11?
<table0>[students] { <col0>[INT]:[department] <col1>[VARCHAR]:[255] }
SELECT department, COUNT( * ) FROM `<table0>` GROUP BY department;
How many graduate students are there in each department?
<table0>[table_name_39] { <col0>[driver]:[VARCHAR] <col1>[time_retired]:[VARCHAR] <col2>[constructor]:[VARCHAR] <col3>[grid]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col2>` = "maserati" AND `<col3>` < 6 AND `<col1>` = "+2 laps"
Who was driving the Maserati with a Grid smaller than 6, and a Time/Retired of +2 laps?
<table0>[table_1851] { <col0>[Main]:[contestant] <col1>[text]:[contestant] <col2>[Yaar]:[Pyaar] <col3>[text]:[Date] <col4>[performed]:[text] <col5>[Scores]:[individual] <col6>[judge]:[text] <col7>[Total]:[score] <col8>[week]:[text] <col9>[Position]:[text] <col10>[Status]:[text] }
SELECT "Total score/week" FROM `<table0>` WHERE "Date performed" = 'August 14' AND "Position" = 'Bottom 2'
What was the total score / week of the contestant who placed in the bottom 2 on august 14?
<table0>[court_cases_2] { <col0>[court_type]:[VARCHAR] <col1>[year]:[INT] <col2>[case_type]:[VARCHAR] <col3>[num_cases]:[INT] }
SELECT court_type, SUM( `<col3>` ) as total_cases FROM `<table0>` WHERE `<col1>` = 2021 GROUP BY court_type;
What was the total number of criminal and civil cases heard in each court last year?
<table0>[comment_instructor] { <col0>[instructor_id]:[int] <col1>[student_id]:[int] <col2>[score]:[int] <col3>[comment_text]:[varchar] } <table1>[offering_instructor] { <col0>[offering_instructor_id]:[int] <col1>[offering_id]:[int] <col2>[instructor_id]:[int] } <table2>[student_record] { <col0>[student_id]:[int] <col...
SELECT DISTINCT semester.year FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND course.department = 'BIOSTAT' AND course.number = 666 AND semester.semester_id = course_offering.semester ORDER BY semester.year DESC LIMIT 1
BIOSTAT 666 was offered last time when ?
<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_Games, `<col0>` FROM `<table0>`
A pie chart shows the proportion of All_Games and Team_ID.
<table0>[FlagTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table1>[TagSynonyms] { <col0>[number]:[SourceTagName] <col1>[text]:[TargetTagName] <col2>[text]:[CreationDate] <col3>[time]:[OwnerUserId] <col4>[number]:[AutoRenameCount] <col5>[number]:[LastAutoRename] <col6>[time]:[Score] <col7>[number]:[Appro...
WITH Raw AS ( SELECT Id, PostId, `<col7>` AS Tags, UserId, RANK( ) OVER ( PARTITION BY PostId ORDER BY Id ) AS No FROM `<table15>` WHERE `<table15>`TypeId IN ( 3, 6, 9 ) ) SELECT N.UserId AS "user_link", Tags.TagName, COUNT( * ) AS Count FROM Raw AS C, Raw AS N, PostTags, Tags WHERE C.PostId = N.PostId AND C.No + 1 = N...
Outcome of status-review s by the tagger. We see the posts which were (re)tagged as 'status-review' in their post history. We group them by their _current_ status-* tagging and by the re-tagger user. So we can estimate the likely outcome of a change request, from the re-tagger SE employee.
<table0>[table_name_14] { <col0>[round]:[VARCHAR] <col1>[method]:[VARCHAR] <col2>[opponent]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "ko" AND `<col2>` = "alfonse d'amore"
Which Round has a Method of ko, and an Opponent of alfonse d'amore?
<table0>[table_name_2] { <col0>[round]:[VARCHAR] <col1>[player]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "ray kurpis"
What round did Ray Kurpis play?
<table0>[game] { <col0>[stadium_id]:[int] <col1>[int]:[Season] <col2>[int]:[Date] <col3>[text]:[Home_team] <col4>[text]:[Away_team] <col5>[text]:[Score] <col6>[text]:[Competition] } <table1>[stadium] { <col0>[int]:[name] <col1>[text]:[Home_Games] <col2>[int]:[Average_Attendance] <col3>[real]:[Total_Attendance] <col4>[...
SELECT Home_team, COUNT( Home_team ) FROM `<table0>` GROUP BY Home_team ORDER BY COUNT( Home_team )
Show me how many home team by home team in a histogram, and I want to order how many home team in ascending order.
<table0>[table_name_87] { <col0>[call_sign]:[VARCHAR] <col1>[state]:[VARCHAR] <col2>[frequency]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "florida" AND `<col2>` = "90.9 fm"
What is the call sign for 90.9 FM which is in Florida?
<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 diagnoses ON `<table1>`.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON `<table1>`.hadm_id = prescriptions.hadm_id WHERE diagnoses.icd9_code = "78630" AND prescriptions.drug_type = "ADDITIVE"
what is the number of patients whose diagnoses icd9 code is 78630 and drug type is additive?
<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 COUNT( * ) > 0 FROM `<table4>` WHERE `<table4>`.`<table9>`unitstayid IN ( SELECT `<table9>`.`<table9>`unitstayid FROM `<table9>` WHERE `<table9>`.`<table9>`healthsystemstayid IN ( SELECT `<table9>`.`<table9>`healthsystemstayid FROM `<table9>` WHERE `<table9>`.uniquepid = '015-15167' ) ) AND `<table4>`.`<table4>`...
had patient 015-15167 ever undergone a tracheal suctioning until 3 years ago?
<table0>[people] { <col0>[People_ID]:[int] <col1>[text]:[Height] <col2>[real]:[Weight] <col3>[real]:[Birth_Date] <col4>[text]:[Birth_Place] } <table1>[body_builder] { <col0>[Body_Builder_ID]:[int] <col1>[People_ID]:[int] <col2>[Snatch]:[real] <col3>[Clean_Jerk]:[real] <col4>[Total]:[real] }
SELECT Snatch, `<col3>` FROM `<table1>`
List the snatch score and clean jerk score of body builders in ascending order of snatch score in a scatter chart
<table0>[salaries] { <col0>[worker_id]:[INT] <col1>[job_role]:[VARCHAR] <col2>[255]:[location] <col3>[VARCHAR]:[255] <col4>[salary]:[FLOAT] }
SELECT location, job_role, AVG( `<col4>` ) FROM `<table0>` GROUP BY location, job_role;
What is the average salary of workers in the manufacturing industry, grouped by their job role and location?
<table0>[Documents] { <col0>[Document_ID]:[INTEGER] <col1>[Document_Type_Code]:[CHAR] <col2>[Project_ID]:[INTEGER] <col3>[Document_Date]:[DATETIME] <col4>[Document_Name]:[VARCHAR] <col5>[255]:[Document_Description] <col6>[VARCHAR]:[255] <col7>[Other_Details]:[VARCHAR] } <table1>[Ref_Document_Types] { <col0>[Document_T...
SELECT T1.Project_Details, T1.Project_ID FROM `<table4>` AS T1 JOIN Documents AS T2 ON T1.Project_ID = T2.Project_ID
A bar chart about what is the project id and detail for the project with at least two documents?
<table0>[Languages] { <col0>[LanguageID]:[int] <col1>[LanguageName]:[varchar] } <table1>[Content] { <col0>[ContentID]:[int] <col1>[ContentType]:[varchar] <col2>[LanguageID]:[int] }
SELECT COUNT( `<table1>`ID ) FROM `<table1>` WHERE `<table1>`Type = 'Documentary' AND `<col2>` = ( SELECT `<col2>` FROM `<table0>` WHERE `<col1>` = 'Hindi' );
How many pieces of 'Documentary' content are available in the 'Hindi' language?
<table0>[table_760] { <col0>[District]:[text] <col1>[Incumbent]:[text] <col2>[Party]:[text] <col3>[elected]:[real] <col4>[Result]:[text] <col5>[Candidates]:[text] }
SELECT "District" FROM `<table0>` WHERE "Incumbent" = 'James C. Davis'
What district does incumbent james c. davis represent?
<table0>[Projects] { <col0>[Project_ID]:[INTEGER] <col1>[Project_Details]:[VARCHAR] } <table1>[Statements] { <col0>[Statement_ID]:[INTEGER] <col1>[Statement_Details]:[VARCHAR] } <table2>[Ref_Document_Types] { <col0>[Document_Type_Code]:[CHAR] <col1>[Document_Type_Name]:[VARCHAR] <col2>[255]:[Document_Type_Description...
SELECT Document_Type_Description, COUNT( Document_Type_Description ) FROM `<table2>` AS T1 JOIN Documents AS T2 ON T1.Document_Type_Code = T2.Document_Type_Code GROUP BY Document_Type_Description ORDER BY Document_Type_Description DESC
Return a bar chart showing the number of documents for each document type description, I want to display x axis in desc order.
<table0>[table_13609] { <col0>[Year]:[real] <col1>[Finish]:[position] <col2>[text]:[1st] <col3>[day]:[text] <col4>[2nd]:[day] <col5>[text]:[3rd] <col6>[day]:[text] <col7>[4th]:[Day] }
SELECT "Finish position" FROM `<table0>` WHERE "4th Day" = 'bumped robinson'
Which Finish position has a 4th Day of bumped robinson?
<table0>[table_name_14] { <col0>[location]:[VARCHAR] <col1>[date]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "11 november"
What is the location of the race on 11 November?
<table0>[job_history] { <col0>[EMPLOYEE_ID]:[decimal] <col1>[START_DATE]:[date] <col2>[END_DATE]:[date] <col3>[JOB_ID]:[varchar] <col4>[DEPARTMENT_ID]:[decimal] } <table1>[regions] { <col0>[REGION_ID]:[decimal] <col1>[REGION_NAME]:[varchar] } <table2>[employees] { <col0>[EMPLOYEE_ID]:[decimal] <col1>[FIRST_NAME]:[var...
SELECT PHONE_NUMBER, `<col7>` FROM `<table2>` WHERE NOT `<col10>` IN ( SELECT `<col10>` FROM `<table6>` WHERE `<col9>` BETWEEN 100 AND 200 ) ORDER BY `<col4>`
For those employees who do not work in departments with managers that have ids between 100 and 200, return a bar chart about the distribution of phone_number and salary , and I want to sort by the bar in asc.
<table0>[table_204_980] { <col0>[number]:[name] <col1>[text]:[type] <col2>[text]:[elevation] <col3>[ground]:[station] <col4>[number]:[elevation] <col5>[mountain]:[station] <col6>[number]:[slope] <col7>[length]:[number] <col8>[capacity]:[persons] <col9>[hour]:[number] <col10>[construction]:[year] }
SELECT "type" FROM `<table0>` WHERE "name" = 'trainer 1'
is the trainer 1 a cable car or a surface lift ?
<table0>[table_name_36] { <col0>[tournament]:[VARCHAR] <col1>[runner_up]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "pat cash"
Which Tournament has Pat Cash as a runner-up?
<table0>[table_name_51] { <col0>[nationality]:[VARCHAR] <col1>[position]:[VARCHAR] <col2>[player]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "center" AND `<col2>` = "mark eaton"
What nationality is mark eaton, center position?
<table0>[SuggestedEditVotes] { <col0>[number]:[SuggestedEditId] <col1>[number]:[UserId] <col2>[number]:[VoteTypeId] <col3>[number]:[CreationDate] <col4>[time]:[TargetUserId] <col5>[number]:[TargetRepChange] } <table1>[PostLinks] { <col0>[number]:[CreationDate] <col1>[time]:[PostId] <col2>[number]:[RelatedPostId] <col3...
SELECT ( 1.0 * ( SELECT COUNT( * ) FROM ( SELECT u.Id FROM ( SELECT Id FROM `<table20>` WHERE Reputation = 1 ) AS u JOIN Posts AS p ON u.Id = p.OwnerUserId GROUP BY u.Id HAVING COUNT( * ) = 1 AND MAX( p.PostTypeId ) = 1 ) AS Chosen ) ) / ( 1.0 * ( SELECT COUNT( * ) FROM `<table20>` ) ) * 100
Percentage of users with rep=1 and with just a single question post.
<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 `<table1>`.drug_type, `<table1>`.route FROM `<table1>` WHERE `<table1>`.formulary_drug_cd = "METRBASE"
what is drug type and drug route of drug code metrbase?
<table0>[prescriptions] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icustay_id]:[text] <col3>[drug_type]:[text] <col4>[drug]:[text] <col5>[formulary_drug_cd]:[text] <col6>[route]:[text] <col7>[drug_dose]:[text] } <table1>[procedures] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[t...
SELECT `<table2>`.admission_type, diagnoses.long_title FROM `<table2>` INNER JOIN diagnoses ON `<table2>`.hadm_id = diagnoses.hadm_id WHERE `<table2>`.subject_id = "2560"
what is the admission type and diagnosis long title of subject id 2560?
<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 `<table1>`.long_title FROM `<table1>` WHERE `<table1>`.subject_id = "18077"
Tell me the long title of diagnoses for the patient with patient id 18077.
<table0>[STUDENT] { <col0>[STU_NUM]:[int] <col1>[STU_LNAME]:[varchar] <col2>[STU_FNAME]:[varchar] <col3>[STU_INIT]:[varchar] <col4>[STU_DOB]:[datetime] <col5>[STU_HRS]:[int] <col6>[STU_CLASS]:[varchar] <col7>[STU_GPA]:[float] <col8>[STU_TRANSFER]:[numeric] <col9>[DEPT_CODE]:[varchar] <col10>[STU_PHONE]:[varchar] <col11...
SELECT DEPT_CODE, COUNT( * ) FROM `<table0>` GROUP BY `<col9>`
Find the number of students for each department. Plot them as bar chart.
<table0>[program] { <col0>[program_id]:[int] <col1>[name]:[varchar] <col2>[college]:[varchar] <col3>[introduction]:[varchar] } <table1>[course_offering] { <col0>[offering_id]:[int] <col1>[course_id]:[int] <col2>[semester]:[int] <col3>[section_number]:[int] <col4>[start_time]:[time] <col5>[end_time]:[time] <col6>[monda...
SELECT DISTINCT `<table4>`.department, `<table4>`.name, `<table4>`.number FROM `<table4>` INNER JOIN student_record ON student_record.`<table4>`_id = `<table4>`.`<table4>`_id INNER JOIN program_`<table4>` ON student_record.`<table4>`_id = program_`<table4>`.`<table4>`_id WHERE program_`<table4>`.category LIKE '%Core%' ...
The classes that I took before did any of them consist of Core classes ?
<table0>[clinics] { <col0>[INT]:[name] <col1>[TEXT]:[state] <col2>[TEXT]:[INSERT] } <table1>[states] { <col0>[INT]:[name] <col1>[TEXT]:[diabetes_rate] <col2>[FLOAT]:[INSERT] }
SELECT c.name FROM `<table0>` c INNER JOIN states s ON c.state = s.name WHERE s.diabetes_rate > 0.12;
List all rural clinics in states with high prevalence of diabetes.
<table0>[table_21795] { <col0>[Poll]:[Source] <col1>[text]:[Dates] <col2>[administered]:[text] <col3>[Democrat]:[Jay] <col4>[Nixon]:[text] <col5>[Republican]:[Kenny] <col6>[Hulshof]:[text] <col7>[Lead]:[Margin] }
SELECT COUNT( "Lead Margin" ) FROM `<table0>` WHERE "Dates administered" = 'September 11, 2008'
How many different lead margins were stated in the poll administered on September 11, 2008?
<table0>[table_name_35] { <col0>[sample_size]:[INTEGER] <col1>[date_s__administered]:[VARCHAR] }
SELECT MAX( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "october 18"
What is the highest sample size administered on October 18?
<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 DISTINCT course.department, course.name, course.number FROM course, course_offering, program, program_course, semester WHERE course.course_id = course_offering.course_id AND program_course.category LIKE '%Core%' AND program_course.course_id = course.course_id AND program.name LIKE '%CS-LSA%' AND program.program_...
Next semester , which classes can be taken as Core ?
<table0>[fare] { <col0>[fare_id]:[int] <col1>[from_airport]:[varchar] <col2>[to_airport]:[varchar] <col3>[fare_basis_code]:[text] <col4>[fare_airline]:[text] <col5>[restriction_code]:[text] <col6>[one_direction_cost]:[int] <col7>[round_trip_cost]:[int] <col8>[round_trip_required]:[varchar] } <table1>[dual_carrier] { <...
SELECT DISTINCT flight.flight_id FROM `<table17>` AS AIRPORT_SERVICE_0, `<table17>` 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 = 'NASHVILLE' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'NEWARK' AN...
what are the AA flights from NEWARK to NASHVILLE
<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 STRFTIME( '%Y', T2.OrderDate ) FROM `<table1>` AS T1 INNER JOIN Orders AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.CompanyName = 'Around the Horn' GROUP BY STRFTIME( '%Y', T2.OrderDate ) ORDER BY COUNT( T2.OrderID ) DESC LIMIT 1
In which year did Around the Horn place the most orders?
<table0>[Artifacts] { <col0>[ArtifactName]:[VARCHAR] <col1>[SiteName]:[VARCHAR] <col2>[AnalysisResult]:[VARCHAR] }
SELECT ArtifactName, `<col2>` FROM `<table0>` WHERE `<col1>` != 'Site13';
List all artifacts with their respective analysis results, excluding those from 'Site13'.
<table0>[employees] { <col0>[employee_id]:[number] <col1>[role_code]:[text] <col2>[employee_name]:[text] <col3>[gender_mfu]:[text] <col4>[date_of_birth]:[time] <col5>[other_details]:[text] } <table1>[ref_calendar] { <col0>[calendar_date]:[time] <col1>[day_number]:[number] } <table2>[documents_to_be_destroyed] { <col0...
SELECT location_code, date_in_location_from, `<col3>` FROM `<table3>`
Show the location code, the starting date and ending data in that location for all the documents.
<table0>[employee_skills] { <col0>[employee_id]:[INT] <col1>[skill_name]:[VARCHAR] <col2>[experience_years]:[INT] }
SELECT AVG( `<col2>` ) FROM `<table0>` WHERE `<col1>` = 'quality_control';
What is the average experience of employees in 'quality_control' skill?
<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 `<table4>`.discharge_location, `<table4>`.dischtime FROM `<table4>` WHERE `<table4>`.name = "Thomas Nazario"
what is discharge location and discharge time of subject name thomas nazario?
<table0>[zyjzjlb] { <col0>[CYBQDM]:[text] <col1>[CYBQMC]:[text] <col2>[CYCWH]:[text] <col3>[CYKSDM]:[text] <col4>[CYKSMC]:[text] <col5>[CYSJ]:[time] <col6>[CYZTDM]:[number] <col7>[HZXM]:[text] <col8>[JZKSDM]:[text] <col9>[JZKSMC]:[text] <col10>[JZLSH]:[text] <col11>[text]:[KLX] <col12>[number]:[MZBMLX] <col13>[number]:...
SELECT `<table2>`.JGDM, `<table2>`.JGMC, COUNT( `<table2>`.RYBH ) FROM `<table2>` JOIN hz_info JOIN mzjzjlb ON `<table2>`.RYBH = hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX WHERE mzjzjlb.JZZDSM = '嗜眠症' GROUP BY `<table2>`.JGDM
门诊诊断为嗜眠症的患者的籍贯代码是什么?名称是什么?相应人数是多少?
<table0>[table_name_3] { <col0>[finalist]:[VARCHAR] <col1>[semifinalists]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "andre agassi ( 1 ) lleyton hewitt ( 14 )"
Which finalist has Semifinalists of andre agassi (1) lleyton hewitt (14)?
<table0>[class_of_service] { <col0>[booking_class]:[varchar] <col1>[rank]:[int] <col2>[class_description]:[text] } <table1>[equipment_sequence] { <col0>[aircraft_code_sequence]:[varchar] <col1>[aircraft_code]:[varchar] } <table2>[days] { <col0>[days_code]:[varchar] <col1>[day_name]:[varchar] } <table3>[state] { <col...
SELECT DISTINCT flight.flight_id FROM `<table9>` AS AIRPORT_SERVICE_0, `<table9>` AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, flight WHERE ( CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'PHOENIX' AND date_day.day_number = 20 AND date_day.month_number = 1 AND date_day.y...
list flights tomorrow from SAN DIEGO to PHOENIX
<table0>[table_name_42] { <col0>[gold]:[VARCHAR] <col1>[total]:[INTEGER] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` > 4
How many gold medals correspond with a total over 4?
<table0>[table_name_83] { <col0>[poles]:[INTEGER] <col1>[driver]:[VARCHAR] }
SELECT SUM( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "nelson piquet"
How many poles does driver Nelson Piquet have?
<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 lab ON `<table1>`.hadm_id = lab.hadm_id WHERE `<table1>`.religion = "PROTESTANT QUAKER" AND lab.itemid = "51447"
Tell me the number of patients with protestant quaker religious backgrounds who have lab test item id 51447.
<table0>[table_name_4] { <col0>[year]:[INTEGER] <col1>[position]:[VARCHAR] }
SELECT MIN( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "12th"
Name the lowest year for 12th position
<table0>[habitats] { <col0>[INT]:[habitat_name] <col1>[VARCHAR]:[preservation_status] } <table1>[education_programs] { <col0>[INT]:[habitat_id] <col1>[INT]:[coordinator_name] }
SELECT h.habitat_name, h.preservation_status, e.coordinator_name FROM `<table0>` h INNER JOIN education_programs e ON h.id = e.habitat_id;
List all the habitats along with their corresponding preservation status and education program coordinator name.
<table0>[table_name_64] { <col0>[grid]:[INTEGER] <col1>[rider]:[VARCHAR] }
SELECT MAX( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "mika kallio"
what is the grid when the rider is mika kallio?
<table0>[table_68734] { <col0>[Year]:[real] <col1>[Entrant]:[text] <col2>[Chassis]:[text] <col3>[Engine]:[text] <col4>[Points]:[real] }
SELECT "Engine" FROM `<table0>` WHERE "Points" = '0' AND "Entrant" = 'élie bayol'
Which engine did lie Bayol use when they earned 0 points?
<table0>[table_name_27] { <col0>[distance]:[VARCHAR] <col1>[bearing]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "297°"
what is the distance for bearing 297°?
<table0>[table_18220102_1] { <col0>[opening_film]:[VARCHAR] <col1>[date__opening]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE date__opening_ = "August 23"
Which opening film has the opening date of august 23?
<table0>[table_name_79] { <col0>[college_or_campus_name]:[VARCHAR] <col1>[weblink]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "http://www.aucev.edu.in/"
Which College or campus has a website of http://www.aucev.edu.in/?
<table0>[table_name_98] { <col0>[rank]:[VARCHAR] <col1>[total_gdp__]:[_bn] }
SELECT `<col0>` FROM `<table0>` WHERE total_gdp__€_bn__ = "€11.243"
Which rank has a Total GDP ( bn) of 11.243??
<table0>[student_record] { <col0>[student_id]:[int] <col1>[course_id]:[int] <col2>[semester]:[int] <col3>[grade]:[varchar] <col4>[varchar]:[transfer_source] <col5>[varchar]:[earn_credit] <col6>[varchar]:[repeat_term] <col7>[varchar]:[test_id] } <table1>[course_tags_count] { <col0>[course_id]:[int] <col1>[clear_grading...
SELECT DISTINCT course.department, course.name, course.number FROM `<table5>` INNER JOIN course ON `<table5>`.course_id = course.course_id WHERE course.department = 'PHRMACOL'
As a CS major , what PHRMACOL classes are required to graduate ?
<table0>[diagnoses_icd] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icd9_code]:[text] <col4>[charttime]:[time] } <table1>[transfers] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[eventtype]:[text] <col5>[careu...
SELECT t3.drug FROM ( SELECT t2.drug, DENSE_RANK( ) OVER ( ORDER BY COUNT( * ) DESC ) AS c1 FROM ( SELECT admissions.subject_id, `<table0>`.charttime FROM `<table0>` JOIN admissions ON `<table0>`.hadm_id = admissions.hadm_id WHERE `<table0>`.icd9_code = ( SELECT `<table3>`.icd9_code FROM `<table3>` WHERE `<table3>`.sho...
what is the three most frequently prescribed drugs that were prescribed within the same month to the male patients with age 40s after they have been diagnosed with atrial fibrillation,?
<table0>[Members] { } <table1>[Meditation] { <col0>[MemberID]:[INT] <col1>[Duration]:[INT] } <table2>[Cycling] { <col0>[MemberID]:[INT] <col1>[INSERT]:[Members] <col2>[VALUES]:[INSERT] <col3>[Meditation]:[MemberID] <col4>[Duration]:[VALUES] }
SELECT MAX( `<col1>` ) FROM `<table1>` WHERE `<col0>` IN ( SELECT `<col0>` FROM `<table0>` JOIN Cycling ON `<table0>`.ID = Cycling.MemberID );
What's the maximum duration of meditation sessions for members who also do cycling?
<table0>[appellations] { <col0>[INTEGER]:[Appelation] <col1>[TEXT]:[County] <col2>[TEXT]:[State] <col3>[TEXT]:[Area] <col4>[TEXT]:[isAVA] } <table1>[grapes] { <col0>[INTEGER]:[Grape] <col1>[TEXT]:[Color] } <table2>[wine] { <col0>[INTEGER]:[Grape] <col1>[TEXT]:[Winery] <col2>[TEXT]:[Appelation] <col3>[TEXT]:[State] <c...
SELECT Year, AVG( `<col6>` ) FROM `<table2>` GROUP BY `<col5>`
Display a line chart for what is the average prices of wines for each each?
<table0>[table_1579922_1] { <col0>[broadcast_date]:[VARCHAR] <col1>[run_time]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "24:30"
What date was an episode with a run time of 24:30 broadcasted?
<table0>[t_kc22] { <col0>[number]:[CHA_ITEM_LEV] <col1>[number]:[DATA_ID] <col2>[text]:[DIRE_TYPE] <col3>[number]:[DOSE_FORM] <col4>[text]:[DOSE_UNIT] <col5>[text]:[EACH_DOSAGE] <col6>[text]:[EXP_OCC_DATE] <col7>[time]:[FLX_MED_ORG_ID] <col8>[text]:[FXBZ] <col9>[number]:[HOSP_DOC_CD] <col10>[text]:[HOSP_DOC_NM] <col11>...
SELECT `<table0>`.CHA_ITEM_LEV FROM `<table0>` JOIN t_kc21_`<table0>` JOIN t_kc21 ON t_kc21_`<table0>`.MED_EXP_DET_ID = `<table0>`.MED_EXP_DET_ID AND t_kc21_`<table0>`.MED_CLINIC_ID = t_kc21.MED_CLINIC_ID WHERE t_kc21.MED_CLINIC_ID = '14864928570' AND `<table0>`.SOC_SRT_DIRE_NM = '盐酸帕罗西汀片'
盐酸帕罗西汀片在医疗就诊14864928570中,他的收费项目分多少等级?
<table0>[table_19580] { <col0>[Year]:[real] <col1>[Enrollment]:[real] <col2>[Black]:[text] <col3>[White]:[text] <col4>[Hispanic]:[text] <col5>[Asian]:[text] <col6>[Free]:[reduced] <col7>[lunch]:[text] }
SELECT "Free/reduced `<col7>` ( % )" FROM `<table0>` WHERE "Hispanic ( % )" = '3.7'
What percentage of free/reduced lunch are there when the hispanic percentage is 3.7?
<table0>[demographic] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[name]:[text] <col3>[marital_status]:[text] <col4>[age]:[text] <col5>[dob]:[text] <col6>[gender]:[text] <col7>[language]:[text] <col8>[religion]:[text] <col9>[admission_type]:[text] <col10>[days_stay]:[text] <col11>[insurance]:[text] <col12>...
SELECT COUNT( DISTINCT `<table0>`.subject_id ) FROM `<table0>` INNER JOIN diagnoses ON `<table0>`.hadm_id = diagnoses.hadm_id WHERE `<table0>`.admission_type = "NEWBORN" AND diagnoses.long_title = "Other Staphylococcus pneumonia"
count the number of patients whose admission type is newborn and diagnoses long title is other staphylococcus pneumonia?
<table0>[table_name_23] { <col0>[enrollment]:[VARCHAR] <col1>[nickname]:[VARCHAR] <col2>[founded]:[VARCHAR] }
SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "buccaneers" AND `<col2>` < 1911
What is the number of enrollments for teams named the Buccaneers founded before 1911?
<table0>[demographic] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[name]:[text] <col3>[marital_status]:[text] <col4>[age]:[text] <col5>[dob]:[text] <col6>[gender]:[text] <col7>[language]:[text] <col8>[religion]:[text] <col9>[admission_type]:[text] <col10>[days_stay]:[text] <col11>[insurance]:[text] <col12>...
SELECT COUNT( DISTINCT `<table0>`.subject_id ) FROM `<table0>` INNER JOIN diagnoses ON `<table0>`.hadm_id = diagnoses.hadm_id WHERE `<table0>`.admityear < "2148" AND diagnoses.short_title = "Obesity NOS"
give me the number of patients admitted before 2148 who are diagnosed with unspecified obesity.
<table0>[table_name_40] { <col0>[VARCHAR]:[runner_up] <col1>[VARCHAR]:[edition] }
SELECT third FROM `<table0>` WHERE runner_up = "paris saint-germain" AND edition < 5
I want to know the third with runner of paris saint-germain and edition less than 5
<table0>[table_name_44] { <col0>[loser]:[VARCHAR] <col1>[time]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "0:58"
Who lost with a time of 0:58?
<table0>[treatment] { <col0>[treatmentid]:[number] <col1>[patientunitstayid]:[number] <col2>[treatmentname]:[text] <col3>[treatmenttime]:[time] } <table1>[patient] { <col0>[uniquepid]:[text] <col1>[patienthealthsystemstayid]:[number] <col2>[patientunitstayid]:[number] <col3>[gender]:[text] <col4>[age]:[text] <col5>[et...
SELECT `<table9>`.drugname FROM `<table9>` WHERE `<table9>`.`<table1>`unitstayid IN ( SELECT `<table1>`.`<table1>`unitstayid FROM `<table1>` WHERE `<table1>`.uniquepid = '021-80293' ) AND DATETIME( `<table9>`.drugstarttime, 'start of day' ) = DATETIME( CURRENT_TIME( ), 'start of day', '-0 day' ) EXCEPT SELECT `<table9>...
what were the drugs which were added to patient 021-80293 today compared to the ones yesterday?
<table0>[lab] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[itemid]:[text] <col3>[charttime]:[text] <col4>[flag]:[text] <col5>[value_unit]:[text] <col6>[label]:[text] <col7>[fluid]:[text] } <table1>[procedures] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:...
SELECT COUNT( DISTINCT `<table3>`.subject_id ) FROM `<table3>` WHERE `<table3>`.discharge_location = "DISCH-TRAN TO PSYCH HOSP" AND `<table3>`.diagnosis = "RUQ PAIN"
how many patients whose discharge location is disch-tran to psych hosp and primary disease is ruq pain?
<table0>[jobs] { <col0>[JOB_ID]:[varchar] <col1>[JOB_TITLE]:[varchar] <col2>[MIN_SALARY]:[decimal] <col3>[MAX_SALARY]:[decimal] } <table1>[regions] { <col0>[REGION_ID]:[decimal] <col1>[REGION_NAME]:[varchar] } <table2>[locations] { <col0>[LOCATION_ID]:[decimal] <col1>[STREET_ADDRESS]:[varchar] <col2>[POSTAL_CODE]:[va...
SELECT JOB_TITLE, `<col3>` - `<col2>` FROM `<table0>` WHERE `<col3>` BETWEEN 12000 AND 18000 ORDER BY `<col1>` DESC
what are the job titles, and range of salaries for jobs with maximum salary between 12000 and 18000?, could you sort by the names in descending?
<table0>[record] { <col0>[int]:[Result] <col1>[text]:[Swimmer_ID] <col2>[int]:[Event_ID] } <table1>[stadium] { <col0>[int]:[name] <col1>[text]:[Capacity] <col2>[int]:[City] <col3>[text]:[Country] <col4>[text]:[Opening_year] } <table2>[swimmer] { <col0>[int]:[name] <col1>[text]:[Nationality] <col2>[text]:[meter_100] <...
SELECT meter_400, meter_100 FROM `<table2>`
Return a bar chart about the distribution of meter_400 and meter_100 .
<table0>[program] { <col0>[program_id]:[int] <col1>[name]:[varchar] <col2>[college]:[varchar] <col3>[introduction]:[varchar] } <table1>[student_record] { <col0>[student_id]:[int] <col1>[course_id]:[int] <col2>[semester]:[int] <col3>[grade]:[varchar] <col4>[varchar]:[transfer_source] <col5>[varchar]:[earn_credit] <col6...
SELECT DISTINCT `<table9>`.department, `<table9>`.name, `<table9>`.number FROM `<table9>` INNER JOIN program_`<table9>` ON program_`<table9>`.`<table9>`_id = `<table9>`.`<table9>`_id WHERE `<table9>`.credits = 9 AND program_`<table9>`.category LIKE 'ULCS'
Are there any upper-level classes that have 9 credits ?
<table0>[table_203_151] { <col0>[number]:[number] <col1>[date]:[text] <col2>[tournament]:[text] <col3>[winning]:[score] <col4>[text]:[margin] <col5>[nvictory]:[text] <col6>[runner]:[text] }
SELECT ( SELECT "date" FROM `<table0>` WHERE "tournament" = 'klm open' AND "margin of\nvictory" = '4 strokes' ) - ( SELECT "date" FROM `<table0>` WHERE "tournament" = 'bmw international open' AND "margin of\nvictory" = 'playoff' )
how long separated the playoff victory at bmw international open and the 4 stroke victory at the klm open ?
<table0>[cost] { <col0>[costid]:[number] <col1>[uniquepid]:[text] <col2>[patienthealthsystemstayid]:[number] <col3>[eventtype]:[text] <col4>[eventid]:[number] <col5>[chargetime]:[time] } <table1>[intakeoutput] { <col0>[intakeoutputid]:[number] <col1>[patientunitstayid]:[number] <col2>[cellpath]:[text] <col3>[celllabel...
SELECT COUNT( DISTINCT `<table3>`.uniquepid ) FROM `<table3>` WHERE STRFTIME( '%y', `<table3>`.hospitaladmittime ) <= '2100'
how many patients have been admitted to hospitals until 2100?
<table0>[donation_data] { <col0>[INT]:[type] <col1>[VARCHAR]:[DECIMAL] }
SELECT type, SUM( amount ) as total_donations FROM `<table0>` GROUP BY type;
What is the total donation amount by organization type?
<table0>[Bear_Population] { <col0>[INT]:[species] <col1>[VARCHAR]:[population] } <table1>[Conservation_Efforts] { <col0>[INT]:[species] <col1>[VARCHAR]:[efforts] }
SELECT SUM( population ) FROM `<table0>` WHERE species = 'Polar Bear' UNION ALL SELECT SUM( efforts ) FROM `<table1>` WHERE species = 'Polar Bear'
Find the total number of polar bears in the 'Bear_Population' table and the 'Conservation_Efforts' table, then sum the results.
<table0>[Transactions_Lots] { <col0>[transaction_id]:[INTEGER] <col1>[lot_id]:[INTEGER] } <table1>[Transactions] { <col0>[transaction_id]:[INTEGER] <col1>[investor_id]:[INTEGER] <col2>[transaction_type_code]:[VARCHAR] <col3>[date_of_transaction]:[DATETIME] <col4>[amount_of_transaction]:[DECIMAL] <col5>[share_count]:[V...
SELECT lot_details, COUNT( lot_details ) FROM `<table4>` AS T1 JOIN Lots AS T2 ON T1.investor_id = T2.investor_id WHERE T1.Investor_details = "l" GROUP BY lot_details
A bar chart for returning the number of the lot details of lots that belong to investors with details 'l'?
<table0>[table_name_3] { <col0>[grid]:[VARCHAR] <col1>[driver]:[VARCHAR] }
SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "giancarlo fisichella"
How many grid numbers were there for the driver Giancarlo Fisichella?
<table0>[PostHistoryTypes] { <col0>[number]:[text] } <table1>[Votes] { <col0>[number]:[PostId] <col1>[number]:[VoteTypeId] <col2>[number]:[UserId] <col3>[number]:[CreationDate] <col4>[time]:[BountyAmount] } <table2>[PostsWithDeleted] { <col0>[number]:[PostTypeId] <col1>[number]:[AcceptedAnswerId] <col2>[number]:[Pare...
SELECT p.Id AS "post_link" FROM `<table21>` AS p WHERE AnswerCount > 0 AND AcceptedAnswerId IS NULL AND ClosedDate IS NULL AND NOT EXISTS( SELECT a.Id FROM `<table21>` AS a WHERE a.ParentId = p.Id AND a.Score >= 0 ) ORDER BY p.Score DESC
Questions where all answers have negative score.
<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 `<table3>`.diagnosis, `<table3>`.admittime FROM `<table3>` WHERE `<table3>`.subject_id = "29767"
what is primary disease and admission time of subject id 29767?
<table0>[table_76437] { <col0>[Player]:[text] <col1>[Country]:[text] <col2>[Year]:[won] <col3>[text]:[Total] <col4>[real]:[par] <col5>[real]:[Finish] }
SELECT "Country" FROM `<table0>` WHERE "Total" < '290' AND "Year( s ) won" = '1960'
What is Country, when Total is less than 290, and when Year(s) Won is 1960?
<table0>[carbon_offset_programs] { <col0>[INT]:[location] <col1>[VARCHAR]:[INSERT] }
SELECT location, COUNT( * ) AS count FROM `<table0>` WHERE location IN ( 'Europe', 'Asia' ) GROUP BY location;
Count the number of carbon offset programs implemented in 'Europe' and 'Asia'.