schema
stringlengths
20
14.6k
query
stringlengths
17
2.58k
question
stringlengths
8
1.06k
<table0>[DispensarySales] { <col0>[DispensaryName]:[VARCHAR] <col1>[255]:[SalesAmount] <col2>[DECIMAL]:[State] <col3>[VARCHAR]:[255] <col4>[SaleType]:[VARCHAR] <col5>[255]:[INSERT] }
SELECT DispensaryName, SUM( SalesAmount ) FROM `<table0>` WHERE State = 'California' AND `<col4>` = 'Adult Use' GROUP BY DispensaryName;
What are the total sales for each dispensary in California, excluding medical sales?
<table0>[table_dev_38] { <col0>[int]:[gender] <col1>[string]:[serum_potassium] <col2>[float]:[systolic_blood_pressure_sbp] <col3>[int]:[creatinine_clearance_cl] <col4>[float]:[estimated_glomerular_filtration_rate_egfr] <col5>[int]:[diastolic_blood_pressure_dbp] <col6>[int]:[ace_inhibitors] <col7>[bool]:[serum_creatinin...
SELECT * FROM `<table0>` WHERE kidney_disease = 1 OR ( serum_creatinine > 1.3 AND serum_creatinine < 3.3 AND gender = 'female' ) OR ( serum_creatinine > 1.5 AND serum_creatinine < 3.5 AND gender = 'male' ) OR ( estimated_glomerular_filtration_rate_egfr >= 20 AND estimated_glomerular_filtration_rate_egfr <= 60 )
participants with certain levels of kidney function _ serum creatinine ( scr ) 1.3 to 3.3 mg / dl ( 115 to 291 micromol / l ) inclusive for female and 1.5 to 3.5 mg / dl ( 132 to 309 micromol / l ) inclusive for male , or an estimated glomerular filtration rate ( egfr ) 20 to 60 ml / min / 1.73 m2
<table0>[icustays] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[first_careunit]:[text] <col5>[last_careunit]:[text] <col6>[first_wardid]:[number] <col7>[last_wardid]:[number] <col8>[intime]:[time] <col9>[outtime]:[time] } <table1>[d_icd_procedures] {...
SELECT `<table3>`.charttime FROM `<table3>` WHERE `<table3>`.itemid IN ( SELECT `<table6>`.itemid FROM `<table6>` WHERE `<table6>`.label = 'bilirubin, total' ) AND `<table3>`.hadm_id IN ( SELECT `<table2>`.hadm_id FROM `<table2>` WHERE `<table2>`.subject_id = 30235 ) AND DATETIME( `<table3>`.charttime ) <= DATETIME( CU...
what was the first time until 29 months ago patient 30235 received a bilirubin, total lab test?
<table0>[table_name_10] { <col0>[competition]:[VARCHAR] <col1>[year]:[VARCHAR] <col2>[venue]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` < 2006 AND `<col2>` = "svk nitra"
What are the competitions that occurred before 2006 in SVK Nitra?
<table0>[Suppliers] { <col0>[SupplierID]:[int] <col1>[SupplierName]:[varchar] <col2>[Address]:[varchar] <col3>[100]:[Country] <col4>[varchar]:[INSERT] } <table1>[Products] { <col0>[ProductID]:[int] <col1>[ProductName]:[varchar] <col2>[SupplierID]:[int] <col3>[Revenue]:[int] }
SELECT SUM( `<table1>`.Revenue ) FROM `<table1>` INNER JOIN Suppliers ON `<table1>`.SupplierID = Suppliers.SupplierID WHERE Suppliers.Country = 'USA' AND Suppliers.State = 'California';
What is the total revenue of all products sold by suppliers in 'California'?
<table0>[Votes] { <col0>[number]:[PostId] <col1>[number]:[VoteTypeId] <col2>[number]:[UserId] <col3>[number]:[CreationDate] <col4>[time]:[BountyAmount] } <table1>[TagSynonyms] { <col0>[number]:[SourceTagName] <col1>[text]:[TargetTagName] <col2>[text]:[CreationDate] <col3>[time]:[OwnerUserId] <col4>[number]:[AutoRename...
SELECT COUNT( DISTINCT `<table18>`.Id ) FROM `<table18>` WHERE LOWER( Location ) LIKE '%korea%' OR LOWER( Location ) LIKE '%seoul%'
Number of Users each Country.
<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, SUM( `<col0>` ) FROM `<table1>` GROUP BY `<col6>`
Give me a pie chart to reflect the proportion of ACC_Road and the sum of Team_ID.
<table0>[astronauts] { <col0>[astronaut_id]:[INT] <col1>[name]:[VARCHAR] <col2>[100]:[last_medical_checkup] <col3>[DATE]:[INSERT] }
SELECT a.name FROM `<table0>` a LEFT JOIN ( SELECT `<col0>` FROM `<table0>` WHERE last_medical_checkup >= DATE_SUB( CURRENT_DATE, INTERVAL 12 MONTH ) ) am ON a.astronaut_id = am.astronaut_id WHERE am.astronaut_id IS NULL;
Which astronauts have not had a medical check-up in the last 12 months?
<table0>[Badges] { <col0>[number]:[UserId] <col1>[number]:[text] <col2>[Date]:[time] <col3>[Class]:[number] <col4>[TagBased]:[boolean] } <table1>[SuggestedEdits] { <col0>[number]:[PostId] <col1>[number]:[CreationDate] <col2>[time]:[ApprovalDate] <col3>[time]:[RejectionDate] <col4>[time]:[OwnerUserId] <col5>[number]:[C...
SELECT ROW_NUMBER( ) OVER ( ORDER BY Reputation DESC ) AS "#", Id AS "user_link", Reputation, Location, age FROM `<table24>` WHERE LOWER( Location ) LIKE '%iran%' OR UPPER( Location ) LIKE '%ir' ORDER BY Reputation DESC LIMIT 10
Top 10 Iranian GameDeveloper In Stackoverflow.
<table0>[table_test_17] { <col0>[int]:[anemia] <col1>[bool]:[left_ventricular_ejection_fraction_lvef] <col2>[int]:[systolic_blood_pressure_sbp] <col3>[int]:[active_infection] <col4>[bool]:[fever] <col5>[bool]:[bradycardia] <col6>[int]:[renal_disease] <col7>[bool]:[oliguria] <col8>[bool]:[creatinine_clearance_cl] <col9>...
SELECT * FROM `<table0>` WHERE systolic_blood_pressure_sbp < 100
systolic blood pressure < 100 mmhg
<table0>[table_name_29] { <col0>[stories]:[VARCHAR] <col1>[rank]:[VARCHAR] }
SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "16"
Name the total number of stories that had a 16 rank
<table0>[makeup_sales] { <col0>[product_id]:[INT] <col1>[product_name]:[VARCHAR] <col2>[255]:[sale_price] <col3>[DECIMAL]:[brand_id] <col4>[INT]:[country] <col5>[VARCHAR]:[255] } <table1>[brands] { <col0>[brand_id]:[INT] <col1>[brand_name]:[VARCHAR] <col2>[255]:[is_natural] <col3>[BOOLEAN]:[INSERT] <col4>[makeup_sales...
SELECT brands.brand_name, SUM( `<table0>`.sale_price ) AS revenue FROM `<table0>` INNER JOIN brands ON `<table0>`.brand_id = brands.brand_id WHERE brands.is_natural = true GROUP BY brands.brand_name ORDER BY revenue DESC LIMIT 5;
Who are the top 5 brands with the highest revenue in the natural makeup segment?
<table0>[table_name_68] { <col0>[written_by]:[VARCHAR] <col1>[series__number]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = 99
Who wrote series number 99?
<table0>[table_name_77] { <col0>[attendance]:[VARCHAR] <col1>[week]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = 10
What was the attendance total for week 10?
<table0>[table_42444] { <col0>[Round]:[text] <col1>[Date]:[weekend] <col2>[text]:[Matches] <col3>[real]:[Clubs] <col4>[text]:[Prize] <col5>[money]:[text] }
SELECT "Matches" FROM `<table0>` WHERE "Prize money" = '£1,000,000'
What is the Match with a Prize of money that is 1,000,000?
<table0>[factories] { <col0>[factory_id]:[INT] <col1>[department]:[VARCHAR] <col2>[255]:[worker_count] <col3>[INT]:[average_salary] <col4>[DECIMAL]:[INSERT] }
UPDATE factories SET average_salary = 3200.00 WHERE factory_id = 1 AND department = 'metalwork';
Update the average salary for the 'metalwork' department in the 'factory1' to 3200.00.
<table0>[requirement] { <col0>[requirement_id]:[int] } <table1>[program_requirement] { <col0>[program_id]:[int] <col1>[category]:[varchar] <col2>[min_credit]:[int] <col3>[additional_req]:[varchar] } <table2>[course_prerequisite] { <col0>[pre_course_id]:[int] <col1>[course_id]:[int] } <table3>[jobs] { <col0>[job_id]:...
SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, program, program_course, semester WHERE program_course.course_id = course.course_id AND program_course.course_id = course.course_id AND program.name LIKE '%CS%' AND program.program_id = program_course.program_id AND semester.sem...
For a CS major , this Spring what classes are there that count ?
<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 Affiliation, SUM( `<col5>` ) FROM `<table0>` WHERE `<col3>` > 1850 GROUP BY `<col4>`
Visualize a pie chart with what are the different affiliations, and what is the total enrollment of schools founded after 1850 for each enrollment type?
<table0>[ReviewTaskStates] { <col0>[number]:[text] <col1>[Description]:[text] } <table1>[PostLinks] { <col0>[number]:[CreationDate] <col1>[time]:[PostId] <col2>[number]:[RelatedPostId] <col3>[number]:[LinkTypeId] } <table2>[ReviewTaskResultTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table3>[VoteType...
SELECT Id, DisplayName, WebsiteUrl FROM `<table14>` WHERE LOWER( Location ) LIKE '%syria%'
How many people put stackoverflow.com as their personal website?. It's amazing how many people just dislike showing any personal link in the WebsiteUrl, and instead they put http://stackoverflow.com, their personal SO profile link, or any sub-link of stackoverflow! This simple query shows people who do that.
<table0>[table_10216] { <col0>[Date]:[text] <col1>[Visitor]:[text] <col2>[Score]:[text] <col3>[Home]:[text] <col4>[Leading]:[scorer] <col5>[text]:[Attendance] <col6>[real]:[Record] }
SELECT "Date" FROM `<table0>` WHERE "Record" = '43–35'
On what date was the Record of 43 35?
<table0>[art_pieces] { <col0>[INT]:[artist] <col1>[VARCHAR]:[style] <col2>[VARCHAR]:[year_sold] <col3>[INT]:[price] <col4>[DECIMAL]:[CREATE] <col5>[VIEW]:[cubist_pieces] }
UPDATE cubist_pieces SET price = price * 1.1;
Update the price of all Cubist pieces from the year 2000 to 2010 by 10%?
<table0>[table_name_90] { <col0>[episodes]:[INTEGER] <col1>[premiere]:[VARCHAR] }
SELECT MIN( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "february5,2007"
What is the earliest season with a premiere of february5,2007?
<table0>[Catalogs] { <col0>[catalog_id]:[INTEGER] <col1>[catalog_name]:[VARCHAR] <col2>[catalog_publisher]:[VARCHAR] <col3>[date_of_publication]:[DATETIME] <col4>[date_of_latest_revision]:[DATETIME] } <table1>[Attribute_Definitions] { <col0>[attribute_id]:[INTEGER] <col1>[attribute_name]:[VARCHAR] <col2>[attribute_dat...
SELECT date_of_publication, COUNT( `<col3>` ) FROM `<table0>` AS t1 JOIN Catalog_Structure AS t2 ON t1.catalog_id = t2.catalog_id WHERE catalog_level_number > 5 ORDER BY COUNT( `<col3>` ) DESC
Find the names and publication dates of all catalogs that have catalog level numbers greater than 5 Bin publication dates into Year interval, and count catalog as a bar chart, and could you order Y-axis from high to low order?
<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 `<table2>`.subject_id ) FROM `<table2>` INNER JOIN lab ON `<table2>`.hadm_id = lab.hadm_id WHERE `<table2>`.age < "85" AND lab.label = "MCV"
what is the number of patients whose age is less than 85 and lab test name is mcv?
<table0>[donors] { <col0>[INT]:[name] <col1>[TEXT]:[last_donation_date] <col2>[DATE]:[donation] <col3>[DECIMAL]:[INSERT] }
SELECT id, name, last_donation_date, donation FROM `<table0>` WHERE last_donation_date < DATE_SUB( CURRENT_DATE, INTERVAL 6 MONTH ) AND id NOT IN ( SELECT id FROM `<table0>` WHERE last_donation_date >= DATE_SUB( CURRENT_DATE, INTERVAL 6 MONTH ) );
List all unique donors who have not donated in the last 6 months, along with their last donation amount and date?
<table0>[table_20746062_1] { <col0>[date]:[VARCHAR] <col1>[game]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = 9
What day did the play game number 9?
<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, Weight FROM `<table0>` ORDER BY Weight DESC
Show me about the distribution of Name and Weight in a bar chart, and I want to sort in descending by the Y.
<table0>[instructor] { <col0>[instructor_id]:[int] <col1>[name]:[varchar] <col2>[uniqname]:[varchar] } <table1>[gsi] { <col0>[course_offering_id]:[int] <col1>[student_id]:[int] } <table2>[requirement] { <col0>[requirement_id]:[int] } <table3>[program] { <col0>[program_id]:[int] <col1>[name]:[varchar] <col2>[college]...
SELECT COUNT( * ) > 0 FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND course.department = 'SPANISH' AND course.number = 299 AND semester.semester = 'FA' AND semester.semester_id = course_offering.semester AND semester.year = 2016
Do you know if SPANISH 299 is being offered next semester ?
<table0>[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>[Oppose_rate]:[real] <col7>[Unsure_rate]:[real] } <table1>[people] { <col0>[People_ID]:[int] <col1>[Sex]:[text] <col2>[text]:[Date_of_Bi...
SELECT Sex, COUNT( `<col1>` ) FROM `<table1>` GROUP BY `<col1>`
Visualize a pie chart about the proportion of Sex and the amount of Sex.
<table0>[diagnosis] { <col0>[diagnosisid]:[number] <col1>[patientunitstayid]:[number] <col2>[diagnosisname]:[text] <col3>[diagnosistime]:[time] <col4>[icd9code]:[text] } <table1>[microlab] { <col0>[microlabid]:[number] <col1>[patientunitstayid]:[number] <col2>[culturesite]:[text] <col3>[organism]:[text] <col4>[culture...
SELECT 24 * ( STRFTIME( '%j', CURRENT_TIME( ) ) - STRFTIME( '%j', `<table3>`.`<table3>`time ) ) FROM `<table3>` WHERE `<table3>`.`<table7>`unitstayid IN ( SELECT `<table7>`.`<table7>`unitstayid FROM `<table7>` WHERE `<table7>`.`<table7>`healthsystemstayid IN ( SELECT `<table7>`.`<table7>`healthsystemstayid FROM `<table...
how many hours have passed since patient 005-87465 received his or her last meropenem intake on the current intensive care unit visit?
<table0>[table_name_48] { <col0>[perfect_fifth]:[VARCHAR] <col1>[minor_seventh]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "d"
What is the Perfect fifth with a Minor that is seventh of d?
<table0>[table_204_690] { <col0>[number]:[election] <col1>[number]:[party] <col2>[name]:[text] <col3>[total]:[votes] <col4>[number]:[share] <col5>[votes]:[text] <col6>[seats]:[number] <col7>[share]:[seats] <col8>[text]:[party] <col9>[leader]:[text] <col10>[notes]:[text] }
SELECT COUNT( * ) FROM `<table0>` WHERE "share of votes" >= 10
in how many years did the listed party have at least 10.0 % share of votes ?
<table0>[PendingFlags] { <col0>[number]:[FlagTypeId] <col1>[number]:[PostId] <col2>[number]:[CreationDate] <col3>[time]:[CloseReasonTypeId] <col4>[number]:[CloseAsOffTopicReasonTypeId] <col5>[number]:[DuplicateOfQuestionId] <col6>[number]:[BelongsOnBaseHostAddress] } <table1>[ReviewTaskResults] { <col0>[number]:[Revie...
SELECT p.Id AS "post_id" FROM `<table5>` AS p JOIN Badges AS b ON p.Id = b.Id WHERE b.Name = 'Revival'
Questions with answers which have earned more than one revival badge.
<table0>[SmartContracts] { <col0>[INT]:[name] <col1>[VARCHAR]:[255] <col2>[transaction_count]:[INT] <col3>[transaction_date]:[DATE] }
SELECT MAX( `<col2>` ) FROM `<table0>` WHERE id = 2 AND `<col3>` >= '2021-11-01' AND `<col3>` < '2021-12-01';
What is the maximum number of transactions per day for the smart contract with the id 2 in the month of November 2021?
<table0>[requirement] { <col0>[requirement_id]:[int] } <table1>[student] { <col0>[student_id]:[int] <col1>[lastname]:[varchar] <col2>[firstname]:[varchar] <col3>[program_id]:[int] <col4>[declare_major]:[varchar] <col5>[total_credit]:[int] <col6>[total_gpa]:[float] <col7>[entered_as]:[varchar] <col8>[admit_term]:[int] ...
SELECT DISTINCT department, name, `<col3>` FROM `<table13>` WHERE ( `<col7>` LIKE '%Intermediate Latin%' OR `<col1>` LIKE '%Intermediate Latin%' ) AND `<col4>` = 2
Get me Intermediate Latin courses of 2 credits .
<table0>[sensor_data] { <col0>[INT]:[crop_type] <col1>[VARCHAR]:[255] <col2>[temperature]:[INT] <col3>[humidity]:[INT] <col4>[measurement_date]:[DATE] }
UPDATE sensor_data SET temperature = 30 WHERE id = 2;
Update temperature readings for a specific sensor record of crop type 'Cotton'.
<table0>[course_tags_count] { <col0>[course_id]:[int] <col1>[clear_grading]:[int] <col2>[pop_quiz]:[int] <col3>[group_projects]:[int] <col4>[inspirational]:[int] <col5>[long_lectures]:[int] <col6>[extra_credit]:[int] <col7>[few_tests]:[int] <col8>[good_feedback]:[int] <col9>[tough_tests]:[int] <col10>[heavy_papers]:[in...
SELECT DISTINCT COURSE_0.department, COURSE_0.name, COURSE_0.number FROM `<table4>` AS COURSE_0, `<table4>` AS COURSE_1, `<table4>`_prerequisite, student_record WHERE COURSE_0.`<table4>`_id = `<table4>`_prerequisite.pre_`<table4>`_id AND COURSE_1.`<table4>`_id = `<table4>`_prerequisite.`<table4>`_id AND COURSE_1.depart...
I have fulfilled what prerequisites for REEES 695 already ?
<table0>[diagnoses] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table1>[procedures] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table2>[prescr...
SELECT COUNT( DISTINCT `<table4>`.subject_id ) FROM `<table4>` INNER JOIN procedures ON `<table4>`.hadm_id = procedures.hadm_id WHERE `<table4>`.insurance = "Medicaid" AND procedures.long_title = "Fiber-optic bronchoscopy"
how many patients with medicaid insurance are treated with procedure fiber optic bronchoscopy?
<table0>[regions] { <col0>[REGION_ID]:[decimal] <col1>[REGION_NAME]:[varchar] } <table1>[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] ...
SELECT HIRE_DATE, COUNT( `<col5>` ) FROM `<table1>` WHERE `<col5>` < '2002-06-21' ORDER BY COUNT( `<col5>` ) DESC
For those employees who was hired before 2002-06-21, return a bar chart about the distribution of hire_date and the amount of hire_date bin hire_date by time, display Y in desc order.
<table0>[diagnosis] { <col0>[diagnosisid]:[number] <col1>[patientunitstayid]:[number] <col2>[diagnosisname]:[text] <col3>[diagnosistime]:[time] <col4>[icd9code]:[text] } <table1>[microlab] { <col0>[microlabid]:[number] <col1>[patientunitstayid]:[number] <col2>[culturesite]:[text] <col3>[organism]:[text] <col4>[culture...
SELECT `<table4>`.drugstarttime FROM `<table4>` WHERE `<table4>`.`<table3>`unitstayid IN ( SELECT `<table3>`.`<table3>`unitstayid FROM `<table3>` WHERE `<table3>`.`<table3>`healthsystemstayid IN ( SELECT `<table3>`.`<table3>`healthsystemstayid FROM `<table3>` WHERE `<table3>`.uniquepid = '017-16041' AND `<table3>`.hosp...
when was the first time during the current hospital encounter patient 017-16041 was prescribed a medication?
<table0>[table_dev_48] { <col0>[int]:[gender] <col1>[string]:[systolic_blood_pressure_sbp] <col2>[int]:[hiv_infection] <col3>[bool]:[body_weight] <col4>[float]:[diabetic] <col5>[string]:[active_hepatitis] <col6>[bool]:[diastolic_blood_pressure_dbp] <col7>[int]:[liver_disease] <col8>[bool]:[high_density_lipoprotein_chol...
SELECT * FROM `<table0>` WHERE liver_disease = 1 OR active_hepatitis = 1 OR hiv_infection = 1 OR kidney_disease = 1
history of chronic liver disease, active hepatitis infection, hiv / aids, chronic kidney disease
<table0>[table_name_72] { <col0>[location]:[VARCHAR] <col1>[capacity]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "101,119"
Which location has 101,119 as the capacity?
<table0>[event] { <col0>[int]:[text] <col1>[Stadium_ID]:[int] <col2>[Year]:[text] } <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] <col3>[r...
SELECT Country, COUNT( * ) FROM `<table1>` GROUP BY Country ORDER BY COUNT( * )
Show me the total number by country in a histogram, sort in asc by the y-axis.
<table0>[procedures] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table1>[lab] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[itemid]:[text] <col3>[charttime]:[text] <col4>[flag]:[text] <col5>[value_unit]:[text] <col6>[la...
SELECT COUNT( DISTINCT `<table4>`.subject_id ) FROM `<table4>` WHERE `<table4>`.diagnosis = "ATRIAL FIBRILLATION\THORACOSCOPIC MAZE PROCEDURE BILATERAL/SDA" AND `<table4>`.age < "68"
Calculate the number of patients less than 68 years who have primary disease atrial fibrillation/thoracoscopic maze and had a bilateral/sda procedure.
<table0>[table_34090] { <col0>[Driver]:[text] <col1>[Points]:[real] <col2>[Season]:[real] <col3>[Races]:[real] <col4>[Percentage]:[possible] <col5>[points]:[text] }
SELECT SUM( "Season" ) FROM `<table0>` WHERE "Driver" = 'fernando alonso' AND "Percentage of possible points" = '64.12%' AND "Points" < '109'
How many seasons have fernando alonso as the driver, and a percentage of possible points of 64.12% and points less than 109?
<table0>[table_name_54] { <col0>[area]:[VARCHAR] <col1>[name]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "mangamahu primary school"
What is the area of Mangamahu primary school?
<table0>[Institution] { <col0>[Institution_id]:[text] } <table1>[protein] { <col0>[common_name]:[text] <col1>[protein_name]:[text] <col2>[divergence_from_human_lineage]:[real] <col3>[accession_number]:[text] <col4>[sequence_length]:[real] } <table2>[building] { <col0>[building_id]:[text] <col1>[text]:[Street_address]...
SELECT Name, Height_feet FROM `<table2>` AS T1 JOIN Institution AS T2 ON T1.`<table2>`_id = T2.`<table2>`_id WHERE T2.Founded > 1880 ORDER BY Height_feet DESC
Show the names and heights of buildings with at least two institutions founded after 1880 Plot them as bar chart, and I want to show Y-axis in descending order.
<table0>[certificate] { <col0>[eid]:[number] <col1>[aid]:[number] } <table1>[employee] { <col0>[eid]:[number] <col1>[name]:[varchar2] <col2>[salary]:[number] } <table2>[flight] { <col0>[flno]:[number] <col1>[origin]:[varchar2] <col2>[destination]:[varchar2] <col3>[distance]:[number] <col4>[departure_date]:[date] <col...
SELECT name, COUNT( * ) FROM `<table2>` AS T1 JOIN aircraft AS T2 ON T1.aid = T2.aid GROUP BY T1.aid ORDER BY name DESC
Show aircraft names and number of flights for each aircraft with a bar chart, and order by the X-axis from high to low.
<table0>[table_name_7] { <col0>[per_capita_income]:[VARCHAR] <col1>[median_family_income]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "$72,288"
What is the Per capita income where Median family income is $72,288?
<table0>[people] { <col0>[People_ID]:[int] <col1>[text]:[Height] <col2>[real]:[Weight] <col3>[real]:[Home] <col4>[Town]:[text] } <table1>[perpetrator] { <col0>[Perpetrator_ID]:[int] <col1>[People_ID]:[int] <col2>[Date]:[text] <col3>[Year]:[real] <col4>[Location]:[text] <col5>[Country]:[text] <col6>[Killed]:[int] <col7...
SELECT Country, COUNT( * ) FROM `<table1>` GROUP BY `<col5>` ORDER BY COUNT( * )
Visualize a bar chart for what are the countries of perpetrators? Show each country and the corresponding number of perpetrators there, and list from low to high by the Y-axis.
<table0>[table_train_176] { <col0>[int]:[systolic_blood_pressure_sbp] <col1>[int]:[hemoglobin_a1c_hba1c] <col2>[float]:[estimated_glomerular_filtration_rate_egfr] <col3>[int]:[blood_glucose] <col4>[int]:[hypoglycemia] <col5>[bool]:[total_cholesterol] <col6>[int]:[low_density_lipoprotein_ldl_cholesterol] <col7>[int]:[tr...
SELECT * FROM `<table0>` WHERE estimated_glomerular_filtration_rate_egfr > 30
have an egfr level > 30 l / min
<table0>[Categories] { <col0>[CategoryID]:[integer] <col1>[CategoryName]:[text] <col2>[Description]:[text] } <table1>[Customers] { <col0>[CustomerID]:[integer] <col1>[CustomerName]:[text] <col2>[ContactName]:[text] <col3>[Address]:[text] <col4>[City]:[text] <col5>[PostalCode]:[text] <col6>[Country]:[text] } <table2>[...
SELECT COUNT( T2.ProductID ) FROM `<table0>` AS T1 INNER JOIN Products AS T2 ON T1.CategoryID = T2.CategoryID INNER JOIN `Order Details` AS T3 ON T2.ProductID = T3.ProductID INNER JOIN Orders AS T4 ON T3.OrderID = T4.OrderID WHERE T1.CategoryName = 'Condiments' AND T1.CategoryID = 2 AND T4.OrderDate LIKE '1997%'
How many condiments were sold in 1997?
<table0>[table_61055] { <col0>[Role]:[text] <col1>[Original]:[Broadway] <col2>[cast]:[text] <col3>[Closing]:[Broadway] <col4>[cast]:[text] <col5>[Original]:[Tour] <col6>[cast]:[text] <col7>[Original]:[NonEquity] <col8>[Tour]:[cast] <col9>[text]:[Original] <col10>[u00e3o]:[Paulo] <col11>[cast]:[text] <col12>[Original]:[...
SELECT "Original US `<col8>` cast" FROM `<table0>` WHERE "Original Broadway cast" = 'kevin chamberlin'
What was the original US Tour cast when the original broadway was Kevin Chamberlin?
<table0>[table_name_72] { <col0>[result]:[VARCHAR] <col1>[attendance]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "60,705"
Which Result has an Attendance of 60,705?
<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 COUNT( * ) > 0 FROM `<table1>` WHERE `<table1>`.`<table8>`unitstayid IN ( SELECT `<table8>`.`<table8>`unitstayid FROM `<table8>` WHERE `<table8>`.`<table8>`healthsystemstayid IN ( SELECT `<table8>`.`<table8>`healthsystemstayid FROM `<table8>` WHERE `<table8>`.uniquepid = '016-18150' ) ) AND `<table1>`.cellpath L...
a month before has patient 016-18150 been getting any output amt-blake drain output?
<table0>[table_17369472_2] { <col0>[won]:[VARCHAR] <col1>[points]:[VARCHAR] }
SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "12"
How many were won when the points were 12?
<table0>[table_66908] { <col0>[Year]:[real] <col1>[Chassis]:[text] <col2>[Engine]:[text] <col3>[Tyres]:[text] <col4>[Points]:[text] }
SELECT "Chassis" FROM `<table0>` WHERE "Tyres" = 'g' AND "Year" > '1976' AND "Points" = '1'
Which of the Chassis has Tyres of g, is after 1976, and has 1 point?
<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>[Participates_in] { <col0>[stuid]:[INTEGER] <col1>[actid]:[INTEGER] } <table2>[Faculty] { <col...
SELECT Rank, COUNT( * ) FROM `<table2>` GROUP BY Sex, `<col3>` ORDER BY COUNT( * )
How many faculty members do we have for each rank and gender? Plot them as bar chart, I want to sort y axis in asc order.
<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 lab ON `<table0>`.hadm_id = lab.hadm_id WHERE `<table0>`.dob_year < "2120" AND lab.fluid = "Other Body Fluid"
how many patients are born before 2120 and their lab test fluid is other body fluid?
<table0>[rare_earth_production] { <col0>[year]:[INT] <col1>[element]:[VARCHAR] <col2>[production_quantity]:[FLOAT] }
DELETE FROM `<table0>` WHERE `<col1>` = 'Lanthanum' AND `<col0>` = 2019;
Delete the record of Lanthanum production in 2019 from the 'rare_earth_production' table.
<table0>[facility] { <col0>[INT]:[name] <col1>[VARCHAR]:[type] <col2>[VARCHAR]:[capacity] <col3>[INT]:[INSERT] }
DELETE FROM `<table0>` WHERE id = 2;
Delete the healthcare facility with ID 2 from the facility table.
<table0>[clients] { <col0>[INT]:[name] <col1>[VARCHAR]:[255] } <table1>[investments] { <col0>[INT]:[client_id] <col1>[INT]:[fund_type] <col2>[VARCHAR]:[255] <col3>[DECIMAL]:[INSERT] }
DELETE FROM `<table0>` WHERE id NOT IN ( SELECT client_id FROM `<table1>` WHERE fund_type = 'Socially Responsible' );
Delete all records of clients who have not invested in any socially responsible funds.
<table0>[security_incidents] { <col0>[threat_actor]:[VARCHAR] <col1>[is_internal]:[BOOLEAN] <col2>[incident_year]:[INTEGER] }
SELECT threat_actor, COUNT( * ) AS incident_count FROM `<table0>` WHERE `<col2>` = EXTRACT( YEAR FROM NOW( ) ) GROUP BY `<col0>` ORDER BY incident_count DESC LIMIT 5
Identify the top 5 threat actors by the number of security incidents they have been involved in, during the current year, both internal and external incidents.
<table0>[table_17120964_6] { <col0>[date]:[VARCHAR] <col1>[man_of_the_match]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "Stuart Potts"
On what day was Stuart Potts the Man of the Match?
<table0>[offering_instructor] { <col0>[offering_instructor_id]:[int] <col1>[offering_id]:[int] <col2>[instructor_id]:[int] } <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 COUNT( DISTINCT course_offering.offering_id ) FROM course, course_offering WHERE course.course_id = course_offering.course_id AND course.department = 'INSTHUM' AND course.number = 411
INSTHUM 411 , how many times has it been offered ?
<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 = "ELECTIVE" AND diagnoses.icd9_code = "4373"
provide the number of patients whose admission type is elective and diagnoses icd9 code is 4373?
<table0>[Products] { <col0>[Code]:[INTEGER] <col1>[VARCHAR]:[255] <col2>[Price]:[DECIMAL] <col3>[Manufacturer]:[INTEGER] } <table1>[Manufacturers] { <col0>[Code]:[INTEGER] <col1>[VARCHAR]:[255] <col2>[Headquarter]:[VARCHAR] <col3>[255]:[Founder] <col4>[VARCHAR]:[255] <col5>[Revenue]:[REAL] }
SELECT T2.Name, MAX( T1.Price ) FROM `<table0>` AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name
For each manufacturer's name, what are the prices of their most expensive product?
<table0>[table_name_95] { <col0>[date]:[VARCHAR] <col1>[home]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "dallas"
Home of dallas happened on what date?
<table0>[table_46158] { <col0>[Opposing]:[Team] <col1>[text]:[real] <col2>[Date]:[text] <col3>[Venue]:[text] <col4>[Round]:[text] }
SELECT AVG( "Against" ) FROM `<table0>` WHERE "Date" = '28 january 1950'
Which Against has a Date of 28 january 1950?
<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>[TagSynonyms] { <col0>[number]:[SourceTagName] <col1>[text]:[Tar...
SELECT Id AS "post_link", Score FROM `<table9>` WHERE PostTypeId = 2 ORDER BY Score DESC LIMIT 50
Top 50 Posts by score.
<table0>[table_203_418] { <col0>[number]:[number] <col1>[player]:[text] <col2>[position]:[text] <col3>[height]:[number] <col4>[current]:[club] }
SELECT COUNT( "player" ) FROM `<table0>` WHERE "height" >= 1.90
how many players have a height of at least 1.90 ?
<table0>[table_name_37] { <col0>[gold]:[INTEGER] <col1>[nation]:[VARCHAR] <col2>[total]:[VARCHAR] }
SELECT SUM( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "mongolia" AND `<col2>` > 18
How much Gold has a Nation of mongolia, and a Total larger than 18?
<table0>[month] { <col0>[month_number]:[int] <col1>[month_name]:[text] } <table1>[days] { <col0>[days_code]:[varchar] <col1>[day_name]:[varchar] } <table2>[state] { <col0>[state_code]:[text] <col1>[state_name]:[text] <col2>[country_name]:[text] } <table3>[flight_stop] { <col0>[flight_id]:[int] <col1>[stop_number]:[i...
SELECT DISTINCT flight.flight_id FROM `<table10>` AS AIRPORT_SERVICE_0, `<table10>` AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE ( ( ( flight.departure_time <= 1330 AND flight.departure_time >= 1230 ) AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND flight.to_airport = AIRPORT_SERVICE_1.airp...
all flights from CHARLOTTE to anywhere on US around 1pm
<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 prescriptions.route = "INHALATION"
which patients take medication via inhalation route?
<table0>[animals] { <col0>[INT]:[name] <col1>[VARCHAR]:[status] } <table1>[habitat_preservation] { <col0>[INT]:[location] <col1>[VARCHAR]:[100] <col2>[acres]:[FLOAT] } <table2>[community_education] { <col0>[INT]:[event_name] <col1>[VARCHAR]:[date] <col2>[DATE]:[attendees] }
CREATE TABLE conservation_events ( id INT, event_name VARCHAR( 50 ), location VARCHAR( 100 ), event_date DATE );
Create a new table named 'conservation_events' with columns: id (INT), event_name (VARCHAR(50)), location (VARCHAR(100)), event_date (DATE)
<table0>[table_46208] { <col0>[Club]:[text] <col1>[Played]:[text] <col2>[Drawn]:[text] <col3>[Lost]:[text] <col4>[Points]:[text] <col5>[Points]:[text] <col6>[Points]:[difference] <col7>[text]:[Points] }
SELECT "Played" FROM `<table0>` WHERE "Points difference" = '+261'
Which Played has a Points difference of +261?
<table0>[forests] { <col0>[INT]:[name] <col1>[VARCHAR]:[hectares] <col2>[DECIMAL]:[year_planted] <col3>[INT]:[avg_carbon_sequestration] <col4>[DECIMAL]:[PRIMARY] <col5>[KEY]:[INSERT] }
SELECT AVG( f.avg_carbon_sequestration ) FROM `<table0>` f WHERE f.year_planted > 1999;
Calculate the average carbon sequestration for forests planted after a certain year
<table0>[table_11214772_2] { <col0>[semi_finalist__number2]:[VARCHAR] <col1>[year]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = 2007
Which team was the second semi finalist in 2007?
<table0>[PendingFlags] { <col0>[number]:[FlagTypeId] <col1>[number]:[PostId] <col2>[number]:[CreationDate] <col3>[time]:[CloseReasonTypeId] <col4>[number]:[CloseAsOffTopicReasonTypeId] <col5>[number]:[DuplicateOfQuestionId] <col6>[number]:[BelongsOnBaseHostAddress] } <table1>[Votes] { <col0>[number]:[PostId] <col1>[nu...
SELECT * FROM `<table15>`
What are the vote types?.
<table0>[table_name_42] { <col0>[year]:[INTEGER] <col1>[aramac]:[VARCHAR] <col2>[population__total]:[VARCHAR] }
SELECT SUM( `<col0>` ) FROM `<table0>` WHERE _aramac_ = 832 AND population__total_ < 3 OFFSET 762
What Year has an (Aramac) of 832 and a Population (Total) less than 3,762?
<table0>[table_name_94] { <col0>[tournament]:[VARCHAR] <col1>[date]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "may 2, 2011"
what tournament happened on may 2, 2011?
<table0>[table_name_17] { <col0>[week]:[VARCHAR] <col1>[date]:[VARCHAR] }
SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "december 18, 1960"
What is the Week number on December 18, 1960?
<table0>[table_name_2] { <col0>[record]:[VARCHAR] <col1>[attendance]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "19,887"
What was the score when attendance was 19,887?
<table0>[procedures] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table1>[lab] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[itemid]:[text] <col3>[charttime]:[text] <col4>[flag]:[text] <col5>[value_unit]:[text] <col6>[la...
SELECT COUNT( DISTINCT `<table4>`.subject_id ) FROM `<table4>` INNER JOIN diagnoses ON `<table4>`.hadm_id = diagnoses.hadm_id INNER JOIN lab ON `<table4>`.hadm_id = lab.hadm_id WHERE diagnoses.short_title = "Benign neo skin face NEC" AND lab.flag = "delta"
give me the number of patients with delta abnormal lab test status who have been diagnosed with benign neoplasm of skin of other and unspecified parts of face.
<table0>[jobs] { <col0>[JOB_ID]:[varchar] <col1>[JOB_TITLE]:[varchar] <col2>[MIN_SALARY]:[decimal] <col3>[MAX_SALARY]:[decimal] } <table1>[countries] { <col0>[COUNTRY_ID]:[varchar] <col1>[COUNTRY_NAME]:[varchar] <col2>[REGION_ID]:[decimal] } <table2>[locations] { <col0>[LOCATION_ID]:[decimal] <col1>[STREET_ADDRESS]:[...
SELECT STATE_PROVINCE, COUNT( `<col4>` ) FROM `<table2>` GROUP BY `<col4>` ORDER BY COUNT( `<col4>` )
Group and count the state province attribute of the location table to visualize a bar chart, could you display in ascending by the Y please?
<table0>[menu_sales] { <col0>[menu_category]:[VARCHAR] <col1>[255]:[total_sales] <col2>[DECIMAL]:[INSERT] }
SELECT menu_category, SUM( total_sales ) FROM `<table0>` GROUP BY menu_category;
What are the total sales for each menu category?
<table0>[table_204_579] { <col0>[number]:[code] <col1>[text]:[district] <col2>[text]:[headquarters] <col3>[text]:[population] <col4>[2011]:[number] <col5>[area]:[km2] <col6>[number]:[density] <col7>[km2]:[number] }
SELECT "district" FROM `<table0>` WHERE "population ( as of `<col4>` )" < ( SELECT "population ( as of `<col4>` )" FROM `<table0>` WHERE "district" = 'haridwar' ) ORDER BY "population ( as of `<col4>` )" DESC LIMIT 1
what is the next most populous district after haridwar ?
<table0>[table_37991] { <col0>[Date]:[text] <col1>[Opponent]:[text] <col2>[Site]:[text] <col3>[Result]:[text] <col4>[Attendance]:[text] }
SELECT "Opponent" FROM `<table0>` WHERE "Result" = 'w48-0'
What is the name of the Opponent when the Result was w48-0?
<table0>[table_49745] { <col0>[Model]:[number] <col1>[text]:[Frequency] <col2>[text]:[Cache] <col3>[text]:[Mult] <col4>[real]:[Voltage] }
SELECT "L1 Cache" FROM `<table0>` WHERE "Model number" = 'x5-133 ady'
What is the L1 Cache, when the Model Number is X5-133 ADY?
<table0>[users] { <col0>[userid]:[integer] <col1>[age]:[text] <col2>[u_gender]:[text] <col3>[occupation]:[text] } <table1>[directors] { <col0>[directorid]:[integer] <col1>[d_quality]:[integer] <col2>[avg_revenue]:[integer] } <table2>[actors] { <col0>[actorid]:[integer] <col1>[a_gender]:[text] <col2>[a_quality]:[integ...
SELECT T2.genre FROM `<table1>` AS T1 INNER JOIN movies2`<table1>` AS T2 ON T1.directorid = T2.directorid WHERE T1.d_quality = 0 GROUP BY T2.genre ORDER BY COUNT( T2.movieid ) DESC LIMIT 1
What are the most common film genres made by the worst directors?
<table0>[table_21636599_1] { <col0>[security_forces]:[INTEGER] }
SELECT MAX( `<col0>` ) FROM `<table0>`
How many security forces?
<table0>[city] { <col0>[city_code]:[varchar] <col1>[city_name]:[varchar] <col2>[state_code]:[varchar] <col3>[country_name]:[varchar] <col4>[time_zone_code]:[varchar] } <table1>[flight_leg] { <col0>[flight_id]:[int] <col1>[leg_number]:[int] <col2>[leg_flight]:[int] } <table2>[dual_carrier] { <col0>[main_airline]:[varc...
SELECT DISTINCT flight.flight_id FROM `<table10>` AS AIRPORT_SERVICE_0, `<table10>` 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 = 'DALLAS' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BALTIMORE' AND ...
what flights go from DALLAS to BALTIMORE
<table0>[storm] { <col0>[Storm_ID]:[int] <col1>[text]:[Dates_active] <col2>[text]:[Max_speed] <col3>[int]:[Damage_millions_USD] <col4>[real]:[Number_Deaths] } <table1>[region] { <col0>[Region_id]:[int] <col1>[Region_code]:[text] <col2>[Region_name]:[text] } <table2>[affected_region] { <col0>[Region_id]:[int] <col1>[S...
SELECT Dates_active, Number_Deaths FROM `<table0>` WHERE Number_Deaths >= 1
For all storms with at least 1 death, show me the dates active and the total number of deaths with a bar chart.
<table0>[instructor] { <col0>[instructor_id]:[int] <col1>[name]:[varchar] <col2>[uniqname]:[varchar] } <table1>[program] { <col0>[program_id]:[int] <col1>[name]:[varchar] <col2>[college]:[varchar] <col3>[introduction]:[varchar] } <table2>[jobs] { <col0>[job_id]:[int] <col1>[job_title]:[varchar] <col2>[description]:[v...
SELECT COUNT( DISTINCT `<table16>`_offering.section_number ) FROM `<table16>` INNER JOIN program_`<table16>` ON program_`<table16>`.`<table16>`_id = `<table16>`.`<table16>`_id INNER JOIN `<table16>`_offering ON `<table16>`.`<table16>`_id = `<table16>`_offering.`<table16>`_id WHERE `<table16>`.department = 'HBEHED' AND ...
What is the number of sections available for HBEHED 610 ?
<table0>[seasons] { <col0>[year]:[number] <col1>[url]:[text] } <table1>[constructors] { <col0>[constructorid]:[number] <col1>[constructorref]:[text] <col2>[name]:[text] <col3>[nationality]:[text] <col4>[url]:[text] } <table2>[pitstops] { <col0>[raceid]:[number] <col1>[driverid]:[number] <col2>[stop]:[number] <col3>[l...
SELECT DISTINCT driverid, `<col2>` FROM `<table2>` WHERE `<col5>` > ( SELECT MIN( `<col5>` ) FROM `<table2>` WHERE `<col0>` = 841 )
What are the different ids and stop durations of all the drivers whose stop lasted longer than the driver in the race with the id 841?
<table0>[Reviewer] { <col0>[rID]:[int] <col1>[name]:[text] } <table1>[Rating] { <col0>[rID]:[int] <col1>[mID]:[int] <col2>[stars]:[int] <col3>[ratingDate]:[date] } <table2>[Movie] { <col0>[mID]:[int] <col1>[title]:[text] <col2>[year]:[int] <col3>[director]:[text] }
SELECT director, `<col2>` FROM `<table1>` AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID ORDER BY director DESC
Please give me a bar chart to compare the stars by directors, and list by the X-axis from high to low.
<table0>[smart_irrigation_systems] { <col0>[INT]:[country] <col1>[VARCHAR]:[255] <col2>[installed_date]:[DATE] }
SELECT COUNT( * ) FROM `<table0>` WHERE country IN ( 'India', 'Canada', 'Argentina' );
Identify the number of smart irrigation systems installed in India, Canada and Argentina.
<table0>[table_name_73] { <col0>[acquired]:[INTEGER] <col1>[number]:[VARCHAR] }
SELECT AVG( `<col0>` ) FROM `<table0>` WHERE `<col1>` = 7
What is the average Acquired when the Number shows as 7?
<table0>[table_18945] { <col0>[Asset]:[Acquired] <col1>[text]:[Acquired] <col2>[text]:[Date] <col3>[Announced]:[text] <col4>[Date]:[Completed] <col5>[text]:[Reported] <col6>[Cost]:[text] }
SELECT "Reported Cost" FROM `<table0>` WHERE "Acquired From" = 'Standard & Poor''s'
What was the reported cost of the asset acquired from Standard & Poor's?
<table0>[CountryRegion] { <col0>[CountryRegionCode]:[text] <col1>[text]:[ModifiedDate] } <table1>[Culture] { <col0>[CultureID]:[text] <col1>[text]:[ModifiedDate] } <table2>[Currency] { <col0>[CurrencyCode]:[text] <col1>[text]:[ModifiedDate] } <table3>[CountryRegionCurrency] { <col0>[CountryRegionCode]:[text] <col1>[...
SELECT T2.ReferenceOrderID FROM `<table60>` AS T1 INNER JOIN TransactionHistory AS T2 ON T1.`<table60>`ID = T2.`<table60>`ID WHERE T1.Name = 'Mountain End Caps'
What is the order reference number for the "Mountain End Caps" product?