answer
stringlengths
6
3.91k
question
stringlengths
7
766
context
stringlengths
27
7.14k
SELECT location FROM table_16384648_2 WHERE team_nickname = "Bearcats"
Which city has the team nickname bearcats?
CREATE TABLE table_16384648_2 (location VARCHAR, team_nickname VARCHAR)
SELECT Payment_Method_Code FROM Payments GROUP BY Payment_Method_Code ORDER BY COUNT(*) LIMIT 1
With which kind of payment method were the least number of payments processed?
CREATE TABLE Payments (Payment_Method_Code VARCHAR)
SELECT T1.service_type_description, T1.service_type_code FROM ref_service_types AS T1 JOIN services AS T2 ON T1.service_type_code = T2.service_type_code GROUP BY T1.service_type_code ORDER BY COUNT(*) DESC LIMIT 1
What is the description and code of the type of service that is performed the most often?
CREATE TABLE products ( product_id text, product_name text, product_price number, product_description text, other_product_service_details text ) CREATE TABLE performers_in_bookings ( order_id number, performer_id number ) CREATE TABLE clients ( client_id number, address_id number, ...
SELECT joined_tschl FROM table_16384648_2 WHERE institution = "University of Pittsburgh"
What year did the university of Pittsburgh school join the hockey league?
CREATE TABLE table_16384648_2 (joined_tschl VARCHAR, institution VARCHAR)
SELECT SUM(Amount_Payment) FROM Payments
What is the total amount of payment?
CREATE TABLE Payments (Amount_Payment INTEGER)
SELECT "Attendance" FROM table_65097 WHERE "Date" = 'new zealand scores in bold'
What is the Attendance of New Zealand Scores in bold?
CREATE TABLE table_65097 ( "Date" text, "Opponent" text, "Score" text, "Venue" text, "Attendance" text )
SELECT MIN(joined_tschl) FROM table_16384648_2
What's the earliest year anybody joined the hockey league?
CREATE TABLE table_16384648_2 (joined_tschl INTEGER)
SELECT DISTINCT customer_details FROM Customers
What are all the distinct details of the customers?
CREATE TABLE Customers (customer_details VARCHAR)
SELECT code FROM table_name_34 WHERE currency = "croatian kuna"
What code is used to represent the currency of Croatian Kuna?
CREATE TABLE table_name_34 ( code VARCHAR, currency VARCHAR )
SELECT location FROM table_16384648_2 WHERE team_website = "Cincinnati Hockey"
Which city has the cincinnati hockey website?
CREATE TABLE table_16384648_2 (location VARCHAR, team_website VARCHAR)
SELECT Policy_Type_Code FROM Customer_Policies GROUP BY Policy_Type_Code ORDER BY COUNT(*) DESC LIMIT 1
Which kind of policy type was chosen by the most customers?
CREATE TABLE Customer_Policies (Policy_Type_Code VARCHAR)
SELECT Year, AVG(MAX(Score)) FROM wine ORDER BY AVG(MAX(Score))
Give me a bar chart for mean max(score) of each year, and sort by the y-axis in ascending.
CREATE TABLE appellations ( No INTEGER, Appelation TEXT, County TEXT, State TEXT, Area TEXT, isAVA TEXT ) CREATE TABLE grapes ( ID INTEGER, Grape TEXT, Color TEXT ) CREATE TABLE wine ( No INTEGER, Grape TEXT, Winery TEXT, Appelation TEXT, State TEXT, Name TE...
SELECT MIN(capacity) FROM table_16384648_2 WHERE team_nickname = "Flyers"
For the flyers, what's the minimum capacity?
CREATE TABLE table_16384648_2 (capacity INTEGER, team_nickname VARCHAR)
SELECT COUNT(*) FROM Settlements
How many settlements are there in total?
CREATE TABLE Settlements (Id VARCHAR)
SELECT d_icd_procedures.short_title FROM d_icd_procedures WHERE d_icd_procedures.icd9_code IN (SELECT t1.icd9_code FROM (SELECT procedures_icd.icd9_code, COUNT(procedures_icd.charttime) AS c1 FROM procedures_icd WHERE procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 737...
what is the name of a procedure that patient 73713 has been given for two times since 70 months ago?
CREATE TABLE d_items ( row_id number, itemid number, label text, linksto text ) CREATE TABLE patients ( row_id number, subject_id number, gender text, dob time, dod time ) CREATE TABLE outputevents ( row_id number, subject_id number, hadm_id number, icustay_id numbe...
SELECT COUNT(pinyin) FROM table_1638437_2 WHERE simplified = "河西区"
Name the number of pinyin where simplified is 河西区
CREATE TABLE table_1638437_2 (pinyin VARCHAR, simplified VARCHAR)
SELECT Payment_ID, Date_Payment_Made, Amount_Payment FROM Payments WHERE Payment_Method_Code = 'Visa'
Which Payments were processed with Visa? List the payment Id, the date and the amount.
CREATE TABLE Payments (Payment_ID VARCHAR, Date_Payment_Made VARCHAR, Amount_Payment VARCHAR, Payment_Method_Code VARCHAR)
SELECT "Tries for" FROM table_69514 WHERE "Tries against" = '30'
What is the number of tries for that has 30 tries against?
CREATE TABLE table_69514 ( "Club" text, "Played" text, "Drawn" text, "Lost" text, "Points for" text, "Points against" text, "Tries for" text, "Tries against" text, "Try bonus" text, "Losing bonus" text, "Points" text )
SELECT pinyin FROM table_1638437_2 WHERE population = 44617
Name the pinyin for where population is 44617
CREATE TABLE table_1638437_2 (pinyin VARCHAR, population VARCHAR)
SELECT customer_details FROM Customers EXCEPT SELECT T1.customer_details FROM Customers AS T1 JOIN Customer_Policies AS T2 ON T1.customer_id = T2.customer_id
List the details of the customers who do not have any policies.
CREATE TABLE Customer_Policies (customer_id VARCHAR); CREATE TABLE Customers (customer_details VARCHAR, customer_id VARCHAR); CREATE TABLE Customers (customer_details VARCHAR)
SELECT "Player" FROM table_34511 WHERE "Points" > '1,052'
Who is the player who had more than 1,052 points?
CREATE TABLE table_34511 ( "Rank" text, "Player" text, "Position" text, "Career" text, "Points" real )
SELECT pinyin FROM table_1638437_2 WHERE area = "487"
Name the pinyin for 487 area
CREATE TABLE table_1638437_2 (pinyin VARCHAR, area VARCHAR)
SELECT T1.claim_id, T1.date_claim_made, T1.Date_Claim_Settled FROM Claims AS T1 JOIN Settlements AS T2 ON T1.Claim_id = T2.Claim_id GROUP BY T1.claim_id HAVING COUNT(*) = 1
List the date the claim was made, the date it was settled and the amount settled for all the claims which had exactly one settlement.
CREATE TABLE Claims (claim_id VARCHAR, date_claim_made VARCHAR, Date_Claim_Settled VARCHAR, Claim_id VARCHAR); CREATE TABLE Settlements (Claim_id VARCHAR)
SELECT "time" FROM table_203_160 WHERE "nation" = 'germany'
how long did it take the german team to finish the race ?
CREATE TABLE table_203_160 ( id number, "rank" number, "heat" number, "nation" text, "competitors" text, "time" text, "notes" text )
SELECT traditional FROM table_1638437_2 WHERE population = 74779
Name the traditional for population 74779
CREATE TABLE table_1638437_2 (traditional VARCHAR, population VARCHAR)
SELECT SUM(Amount_Claimed) FROM Claims
Find the total claimed amount of all the claims.
CREATE TABLE Claims (Amount_Claimed INTEGER)
SELECT DISTINCT instructor.name FROM instructor INNER JOIN offering_instructor ON offering_instructor.instructor_id = instructor.instructor_id INNER JOIN student_record ON student_record.offering_id = offering_instructor.offering_id INNER JOIN student ON student.student_id = student_record.student_id INNER JOIN course_...
When Connie Shaw took GREEK 695 , who was the teacher ?
CREATE TABLE program ( program_id int, name varchar, college varchar, introduction varchar ) CREATE TABLE ta ( campus_job_id int, student_id int, location varchar ) CREATE TABLE course_offering ( offering_id int, course_id int, semester int, section_number int, start_ti...
SELECT english_name FROM table_1638437_2 WHERE simplified = "崖城镇"
Name the english name for 崖城镇
CREATE TABLE table_1638437_2 (english_name VARCHAR, simplified VARCHAR)
SELECT name FROM department GROUP BY departmentID ORDER BY COUNT(departmentID) DESC LIMIT 1
Which department has the largest number of employees?
CREATE TABLE department (name VARCHAR, departmentID VARCHAR)
SELECT JOB_ID, SUM(SALARY) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 GROUP BY JOB_ID ORDER BY SUM(SALARY) DESC
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 job_id and the sum of salary , and group by attribute job_id, and rank sum salary from high to low order.
CREATE TABLE departments ( DEPARTMENT_ID decimal(4,0), DEPARTMENT_NAME varchar(30), MANAGER_ID decimal(6,0), LOCATION_ID decimal(4,0) ) CREATE TABLE jobs ( JOB_ID varchar(10), JOB_TITLE varchar(35), MIN_SALARY decimal(6,0), MAX_SALARY decimal(6,0) ) CREATE TABLE job_history ( EMPLO...
SELECT date FROM table_16387700_1 WHERE away_team = "Richmond"
Name the date for richmond
CREATE TABLE table_16387700_1 (date VARCHAR, away_team VARCHAR)
SELECT head FROM department GROUP BY departmentID ORDER BY COUNT(departmentID) LIMIT 1
What is the employee id of the head whose department has the least number of employees?
CREATE TABLE department (head VARCHAR, departmentID VARCHAR)
SELECT SUM("Game") FROM table_77372 WHERE "November" = '27'
what is the game when on november 27?
CREATE TABLE table_77372 ( "Game" real, "November" real, "Opponent" text, "Score" text, "Record" text )
SELECT MAX(crowd) FROM table_16387700_1 WHERE date = "Saturday 16 February"
Name the most crowd for saturday 16 february
CREATE TABLE table_16387700_1 (crowd INTEGER, date VARCHAR)
SELECT T2.name, T2.position FROM department AS T1 JOIN physician AS T2 ON T1.head = T2.EmployeeID GROUP BY departmentID ORDER BY COUNT(departmentID) LIMIT 1
what is the name and position of the head whose department has least number of employees?
CREATE TABLE department (head VARCHAR); CREATE TABLE physician (name VARCHAR, position VARCHAR, EmployeeID VARCHAR)
SELECT County, COUNT(*) FROM School GROUP BY County
What is the proportion of the number of schools in different counties?
CREATE TABLE endowment ( endowment_id int, School_id int, donator_name text, amount real ) CREATE TABLE School ( School_id text, School_name text, Location text, Mascot text, Enrollment int, IHSAA_Class text, IHSAA_Football_Class text, County text ) CREATE TABLE budget ...
SELECT home_team FROM table_16388230_1 WHERE away_team = "West Coast"
What home team played the West Coast away team?
CREATE TABLE table_16388230_1 (home_team VARCHAR, away_team VARCHAR)
SELECT name FROM appointment AS T1 JOIN patient AS T2 ON T1.patient = T2.ssn
What are names of patients who made an appointment?
CREATE TABLE appointment (patient VARCHAR); CREATE TABLE patient (ssn VARCHAR)
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.gender = "F" AND prescriptions.drug = "Phenytoin Sodium"
provide the number of patients whose gender is f and drug name is phenytoin sodium?
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ...
SELECT COUNT(date) FROM table_16388230_1 WHERE home_team = "Hawthorn"
How many days did Hawthorn play as a home team?
CREATE TABLE table_16388230_1 (date VARCHAR, home_team VARCHAR)
SELECT name, phone FROM appointment AS T1 JOIN patient AS T2 ON T1.patient = T2.ssn GROUP BY T1.patient HAVING COUNT(*) > 1
what are name and phone number of patients who had more than one appointment?
CREATE TABLE appointment (patient VARCHAR); CREATE TABLE patient (ssn VARCHAR)
SELECT MIN("first issued") FROM table_203_82
what was year was the first arizona license plate made ?
CREATE TABLE table_203_82 ( id number, "first issued" number, "design" text, "slogan" text, "serial format" text, "serials issued" text, "notes" text )
SELECT ground FROM table_16388230_1 WHERE away_team = "Richmond"
The away team of Richmond played on what grounds?
CREATE TABLE table_16388230_1 (ground VARCHAR, away_team VARCHAR)
SELECT appointmentid FROM appointment ORDER BY START DESC LIMIT 1
Find the id of the appointment with the most recent start date?
CREATE TABLE appointment (appointmentid VARCHAR, START VARCHAR)
SELECT lead FROM table_name_15 WHERE nation = "switzerland"
Which Lead has a Nation of switzerland?
CREATE TABLE table_name_15 ( lead VARCHAR, nation VARCHAR )
SELECT away_team AS score FROM table_16387953_1 WHERE ground = "Football Park"
What was the away team's score at the venue football park?
CREATE TABLE table_16387953_1 (away_team VARCHAR, ground VARCHAR)
SELECT T2.name FROM appointment AS T1 JOIN physician AS T2 ON T1.Physician = T2.EmployeeID
List the name of physicians who took some appointment.
CREATE TABLE appointment (Physician VARCHAR); CREATE TABLE physician (name VARCHAR, EmployeeID VARCHAR)
SELECT MIN(drawn) FROM table_name_83 WHERE played > 2 AND _percentage_won > 100
What is the smallest draws for a player larger than 2 with a 100% wins?
CREATE TABLE table_name_83 ( drawn INTEGER, played VARCHAR, _percentage_won VARCHAR )
SELECT home_team AS score FROM table_16387953_1 WHERE home_team = "Adelaide"
What are the scores for games where the home team is Adelaide?
CREATE TABLE table_16387953_1 (home_team VARCHAR)
SELECT name FROM physician EXCEPT SELECT T2.name FROM appointment AS T1 JOIN physician AS T2 ON T1.Physician = T2.EmployeeID
List the name of physicians who never took any appointment.
CREATE TABLE physician (name VARCHAR); CREATE TABLE appointment (Physician VARCHAR); CREATE TABLE physician (name VARCHAR, EmployeeID VARCHAR)
SELECT STU_FNAME, COUNT(STU_FNAME) FROM STUDENT WHERE STU_GPA < (SELECT AVG(STU_GPA) FROM STUDENT) GROUP BY STU_FNAME
How many students that has a GPA lower than average? Show me a pie chart grouping by student's first name.
CREATE TABLE CLASS ( CLASS_CODE varchar(5), CRS_CODE varchar(10), CLASS_SECTION varchar(2), CLASS_TIME varchar(20), CLASS_ROOM varchar(8), PROF_NUM int ) CREATE TABLE COURSE ( CRS_CODE varchar(10), DEPT_CODE varchar(10), CRS_DESCRIPTION varchar(35), CRS_CREDIT float(8) ) CREATE...
SELECT date FROM table_16387953_1 WHERE ground = "Football Park"
On what dates where games played at Football Park?
CREATE TABLE table_16387953_1 (date VARCHAR, ground VARCHAR)
SELECT T1.name, T3.name FROM physician AS T1 JOIN affiliated_with AS T2 ON T1.EmployeeID = T2.physician JOIN department AS T3 ON T2.department = T3.DepartmentID WHERE T2.PrimaryAffiliation = 1
Find the names of all physicians and their primary affiliated departments' names.
CREATE TABLE department (name VARCHAR, DepartmentID VARCHAR); CREATE TABLE affiliated_with (physician VARCHAR, department VARCHAR, PrimaryAffiliation VARCHAR); CREATE TABLE physician (name VARCHAR, EmployeeID VARCHAR)
SELECT amount_settled, amount_claimed FROM claims ORDER BY amount_settled LIMIT 1
Find the claimed amount in the claim with the least amount settled. Show both the settlement amount and claim amount.
CREATE TABLE customers ( customer_id number, customer_details text ) CREATE TABLE settlements ( settlement_id number, claim_id number, date_claim_made time, date_claim_settled time, amount_claimed number, amount_settled number, customer_policy_id number ) CREATE TABLE payments ( ...
SELECT home_team AS score FROM table_16387653_1 WHERE away_team = "Collingwood"
What was the home team score against Collingwood?
CREATE TABLE table_16387653_1 (home_team VARCHAR, away_team VARCHAR)
SELECT T1.name FROM patient AS T1 JOIN appointment AS T2 ON T1.ssn = T2.patient ORDER BY T2.start DESC LIMIT 1
What is the name of the patient who made the most recent appointment?
CREATE TABLE patient (name VARCHAR, ssn VARCHAR); CREATE TABLE appointment (patient VARCHAR, start VARCHAR)
SELECT "Machine" FROM table_40931 WHERE "Place" = '5'
What machine has 5 as the place?
CREATE TABLE table_40931 ( "Place" real, "Rider" text, "Country" text, "Machine" text, "Speed" text, "Time" text, "Points" real )
SELECT away_team FROM table_16387653_1 WHERE home_team = "Carlton"
Who was the away team playing at Carlton?
CREATE TABLE table_16387653_1 (away_team VARCHAR, home_team VARCHAR)
SELECT COUNT(patient) FROM stay WHERE room = 112
How many patients stay in room 112?
CREATE TABLE stay (patient VARCHAR, room VARCHAR)
SELECT COUNT(*), cname FROM tryout GROUP BY cname ORDER BY COUNT(*) DESC
How many students participated in tryouts for each college by descennding count?
CREATE TABLE player ( pid number, pname text, ycard text, hs number ) CREATE TABLE tryout ( pid number, cname text, ppos text, decision text ) CREATE TABLE college ( cname text, state text, enr number )
SELECT home_team AS score FROM table_16387653_1 WHERE away_team = "Richmond"
What did the home team score against Richmond?
CREATE TABLE table_16387653_1 (home_team VARCHAR, away_team VARCHAR)
SELECT COUNT(T1.SSN) FROM patient AS T1 JOIN prescribes AS T2 ON T1.SSN = T2.patient JOIN physician AS T3 ON T2.physician = T3.employeeid WHERE T3.name = "John Dorian"
How many patients' prescriptions are made by physician John Dorian?
CREATE TABLE patient (SSN VARCHAR); CREATE TABLE prescribes (patient VARCHAR, physician VARCHAR); CREATE TABLE physician (employeeid VARCHAR, name VARCHAR)
SELECT COUNT("Japanese title") FROM table_2460 WHERE "Vocalist" = 'Momoiro Clover Z'
When momoiro clover z is the vocalist how many japanese titles are there?
CREATE TABLE table_2460 ( "#" real, "Japanese title" text, "R\u014dmaji" text, "Japanese translation" text, "Vocalist" text, "Episodes used" text )
SELECT MAX(crowd) FROM table_16387653_1 WHERE away_team = "St Kilda"
What was the maximum crowd size against St Kilda?
CREATE TABLE table_16387653_1 (crowd INTEGER, away_team VARCHAR)
SELECT T4.name FROM stay AS T1 JOIN patient AS T2 ON T1.Patient = T2.SSN JOIN Prescribes AS T3 ON T3.Patient = T2.SSN JOIN Medication AS T4 ON T3.Medication = T4.Code WHERE room = 111
Find the name of medication used on the patient who stays in room 111?
CREATE TABLE Prescribes (Patient VARCHAR, Medication VARCHAR); CREATE TABLE Medication (name VARCHAR, Code VARCHAR); CREATE TABLE patient (SSN VARCHAR); CREATE TABLE stay (Patient VARCHAR)
SELECT "Attenmdance" FROM table_4855 WHERE "Stadium" = 'war memorial stadium'
What was the attendance at war memorial stadium?
CREATE TABLE table_4855 ( "Week" real, "Opponent" text, "Result" text, "Stadium" text, "Record" text, "Attenmdance" text )
SELECT home_team AS score FROM table_16387653_1 WHERE home_team = "Footscray"
What to Footscray score at home?
CREATE TABLE table_16387653_1 (home_team VARCHAR)
SELECT patient FROM stay WHERE room = 111 ORDER BY staystart DESC LIMIT 1
Find the patient who most recently stayed in room 111.
CREATE TABLE stay (patient VARCHAR, room VARCHAR, staystart VARCHAR)
SELECT MIN("Total") FROM table_14012 WHERE "Gold" > '0' AND "Bronze" > '6' AND "Nation" = 'ussr' AND "Silver" < '85'
What's the total amount of USSR that has more than 0 gold, less than 85 silver and more than 6 bronze?
CREATE TABLE table_14012 ( "Rank" real, "Nation" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real )
SELECT date FROM table_16388439_3 WHERE ground = "Bundaberg Rum Stadium"
Name the date for bundaberg rum stadium
CREATE TABLE table_16388439_3 (date VARCHAR, ground VARCHAR)
SELECT T1.name FROM nurse AS T1 JOIN appointment AS T2 ON T1.employeeid = T2.prepnurse GROUP BY T1.employeeid ORDER BY COUNT(*) DESC LIMIT 1
What is the name of the nurse has the most appointments?
CREATE TABLE nurse (name VARCHAR, employeeid VARCHAR); CREATE TABLE appointment (prepnurse VARCHAR)
SELECT position_in_1999 FROM table_name_71 WHERE venue = "central, gomel"
What is the position of the team that played at the venue, Central, Gomel?
CREATE TABLE table_name_71 ( position_in_1999 VARCHAR, venue VARCHAR )
SELECT home_team AS score FROM table_16388439_3 WHERE home_team = "Brisbane Lions"
Name the home team score for brisbane lions
CREATE TABLE table_16388439_3 (home_team VARCHAR)
SELECT T1.name, COUNT(*) FROM physician AS T1 JOIN patient AS T2 ON T1.employeeid = T2.PCP GROUP BY T1.employeeid
How many patients do each physician take care of? List their names and number of patients they take care of.
CREATE TABLE patient (PCP VARCHAR); CREATE TABLE physician (name VARCHAR, employeeid VARCHAR)
SELECT player FROM table_name_60 WHERE total = "152"
Which player had a total of 152?
CREATE TABLE table_name_60 ( player VARCHAR, total VARCHAR )
SELECT home_team FROM table_16388439_3 WHERE ground = "Football Park"
Name the home team for football park
CREATE TABLE table_16388439_3 (home_team VARCHAR, ground VARCHAR)
SELECT T1.name FROM physician AS T1 JOIN patient AS T2 ON T1.employeeid = T2.PCP GROUP BY T1.employeeid HAVING COUNT(*) > 1
Find the name of physicians who are in charge of more than one patient.
CREATE TABLE patient (PCP VARCHAR); CREATE TABLE physician (name VARCHAR, employeeid VARCHAR)
SELECT demographic.expire_flag, demographic.admission_location FROM demographic WHERE demographic.name = "Kurt Buczek"
For patient Kurt Buczek, specify the location he was admitted to and his death status
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, ...
SELECT away_team AS score FROM table_16388439_3 WHERE home_team = "Carlton"
Name the away team score for carlton
CREATE TABLE table_16388439_3 (away_team VARCHAR, home_team VARCHAR)
SELECT COUNT(*), T1.blockfloor FROM BLOCK AS T1 JOIN room AS T2 ON T1.blockfloor = T2.blockfloor AND T1.blockcode = T2.blockcode GROUP BY T1.blockfloor
Find the number of rooms located on each block floor.
CREATE TABLE room (blockfloor VARCHAR, blockcode VARCHAR); CREATE TABLE BLOCK (blockfloor VARCHAR, blockcode VARCHAR)
SELECT fastest_lap FROM table_26920192_5 WHERE winning_driver = "Kristian Ghedina"
Who had the fastest lap when the winning driver was kristian ghedina?
CREATE TABLE table_26920192_5 ( fastest_lap VARCHAR, winning_driver VARCHAR )
SELECT date FROM table_16388439_3 WHERE home_team = "Adelaide" AND ground = "Westpac Stadium"
Name the date for adelaide for westpac stadium
CREATE TABLE table_16388439_3 (date VARCHAR, home_team VARCHAR, ground VARCHAR)
SELECT COUNT(*), T1.blockcode FROM BLOCK AS T1 JOIN room AS T2 ON T1.blockfloor = T2.blockfloor AND T1.blockcode = T2.blockcode GROUP BY T1.blockcode
Find the number of rooms for different block code?
CREATE TABLE room (blockfloor VARCHAR, blockcode VARCHAR); CREATE TABLE BLOCK (blockcode VARCHAR, blockfloor VARCHAR)
SELECT "District" FROM table_24498 WHERE "Date successor seated" = 'August 31, 1943'
In what district was the successor seated August 31, 1943?
CREATE TABLE table_24498 ( "District" text, "Vacator" text, "Reason for change" text, "Successor" text, "Date successor seated" text )
SELECT COUNT(ground) FROM table_16388439_1 WHERE home_team = "Essendon"
Name the total number of ground for essendon
CREATE TABLE table_16388439_1 (ground VARCHAR, home_team VARCHAR)
SELECT DISTINCT blockcode FROM room WHERE unavailable = 0
What are the unique block codes that have available rooms?
CREATE TABLE room (blockcode VARCHAR, unavailable VARCHAR)
SELECT COUNT("Silver") FROM table_42700 WHERE "Gold" > '2' AND "Bronze" < '35' AND "Nation" = 'china' AND "Total" > '26'
How many silvers have a gold greater than 2, a bronze less than 35, china as the nation, with a total greater than 26?
CREATE TABLE table_42700 ( "Nation" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real )
SELECT MAX(crowd) FROM table_16388439_1 WHERE away_team = "Essendon"
Name the most crowd for essendon
CREATE TABLE table_16388439_1 (crowd INTEGER, away_team VARCHAR)
SELECT COUNT(DISTINCT roomtype) FROM room
How many different types of rooms are there?
CREATE TABLE room (roomtype VARCHAR)
SELECT DISTINCT payment_type_code FROM payments
What are all the distinct payment types?
CREATE TABLE products_for_hire ( product_id number, product_type_code text, daily_hire_cost number, product_name text, product_description text ) CREATE TABLE customers ( customer_id number, coupon_id number, good_or_bad_customer text, first_name text, last_name text, gender...
SELECT COUNT(home_team) AS score FROM table_16388439_2 WHERE ground = "Manuka Oval"
When ground is manuka oval what is the home team score?
CREATE TABLE table_16388439_2 (home_team VARCHAR, ground VARCHAR)
SELECT DISTINCT T1.name FROM physician AS T1 JOIN prescribes AS T2 ON T1.employeeid = T2.physician JOIN medication AS T3 ON T3.code = T2.medication WHERE T3.name = "Thesisin"
What is the names of the physicians who prescribe medication Thesisin?
CREATE TABLE physician (name VARCHAR, employeeid VARCHAR); CREATE TABLE prescribes (physician VARCHAR, medication VARCHAR); CREATE TABLE medication (code VARCHAR, name VARCHAR)
SELECT t2.drugname FROM (SELECT patient.uniquepid, treatment.treatmenttime FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '012-4131') AND treatment.treatmen...
what is the name of the drug which patient 012-4131 was prescribed during the same day after having received a therapeutic antibacterials - third generation cephalosporin procedure until 08/2105?
CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE l...
SELECT away_team AS score FROM table_16388439_2 WHERE crowd = 8642
When the crowd was 8642 what was the away team's score?
CREATE TABLE table_16388439_2 (away_team VARCHAR, crowd VARCHAR)
SELECT DISTINCT T1.name, T1.position FROM physician AS T1 JOIN prescribes AS T2 ON T1.employeeid = T2.physician JOIN medication AS T3 ON T3.code = T2.medication WHERE T3.Brand = "X"
Find the name and position of physicians who prescribe some medication whose brand is X?
CREATE TABLE medication (code VARCHAR, Brand VARCHAR); CREATE TABLE prescribes (physician VARCHAR, medication VARCHAR); CREATE TABLE physician (name VARCHAR, position VARCHAR, employeeid VARCHAR)
SELECT COUNT("Year") FROM table_64334 WHERE "4th Place Team" = 'wyoming angus, johnstown, co'
What year was the 4th Place Team of the Wyoming Angus, Johnstown, Co?
CREATE TABLE table_64334 ( "Year" real, "1st Place Team" text, "2nd Place Team" text, "3rd Place Team" text, "4th Place Team" text, "Host Location" text )
SELECT ground FROM table_16388545_1 WHERE crowd = 22537
Which location had an attendance of 22537?
CREATE TABLE table_16388545_1 (ground VARCHAR, crowd VARCHAR)
SELECT COUNT(*), T1.name FROM medication AS T1 JOIN prescribes AS T2 ON T1.code = T2.medication GROUP BY T1.brand
Find the number of medications prescribed for each brand.
CREATE TABLE medication (name VARCHAR, brand VARCHAR, code VARCHAR); CREATE TABLE prescribes (medication VARCHAR)
SELECT Id, DisplayName, Reputation, WebsiteUrl, Location, LastAccessDate FROM Users WHERE Location LIKE '%Bangladesh%' ORDER BY Reputation DESC LIMIT 150
TOP 50 users from Bangladesh. Lists the top 50 users (ranked by reputation) that are located in Calicut/Kozhikode, Kerala, India according to their profile information. Thanks to http://data.stackexchange.com/stackoverflow/qe/1157/top-100-users-from-greece
CREATE TABLE Users ( Id number, Reputation number, CreationDate time, DisplayName text, LastAccessDate time, WebsiteUrl text, Location text, AboutMe text, Views number, UpVotes number, DownVotes number, ProfileImageUrl text, EmailHash text, AccountId number ) CRE...
SELECT away_team AS score FROM table_16388545_1 WHERE ground = "Telstra Stadium"
What was the away team's score of at the game of telstra stadium?
CREATE TABLE table_16388545_1 (away_team VARCHAR, ground VARCHAR)