answer
stringlengths 6
3.91k
| question
stringlengths 7
766
| context
stringlengths 27
7.14k
|
|---|---|---|
SELECT MIN(year) FROM table_16677738_1
|
What is the lowest overall year?
|
CREATE TABLE table_16677738_1 (year INTEGER)
|
SELECT COUNT(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.fname = "Tracy" AND t3.lname = "Kim"
|
Find the number of clubs where "Tracy Kim" is a member.
|
CREATE TABLE student (stuid VARCHAR, fname VARCHAR, lname VARCHAR); CREATE TABLE member_of_club (clubid VARCHAR, stuid VARCHAR); CREATE TABLE club (clubid VARCHAR)
|
SELECT Headquarter, MAX(Revenue) FROM Manufacturers GROUP BY Headquarter
|
Give me a bar chart to show the revenue of the company that earns the highest revenue in each headquarter city.
|
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
)
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
)
|
SELECT inns_of_court_and_chancery FROM table_16677738_1 WHERE without_the_walls = 70489
|
When 70489 is without walls what is the inns of court and chancery?
|
CREATE TABLE table_16677738_1 (inns_of_court_and_chancery VARCHAR, without_the_walls VARCHAR)
|
SELECT t3.fname, t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = "Bootup Baltimore" AND t3.sex = "F"
|
Find all the female members of club "Bootup Baltimore". Show the first name and last name.
|
CREATE TABLE club (clubid VARCHAR, clubname VARCHAR); CREATE TABLE student (fname VARCHAR, lname VARCHAR, stuid VARCHAR, sex VARCHAR); CREATE TABLE member_of_club (clubid VARCHAR, stuid VARCHAR)
|
SELECT MIN(grid) FROM table_name_10 WHERE laps = 21 AND manufacturer = "yamaha" AND time = "+18.802"
|
What is the lowest Grid, when Laps is 21, when Manufacturer is Yamaha, and when Time is +18.802?
|
CREATE TABLE table_name_10 (
grid INTEGER,
time VARCHAR,
laps VARCHAR,
manufacturer VARCHAR
)
|
SELECT MIN(without_the_walls) FROM table_16677738_1 WHERE within_the_walls > 56174.0
|
When within the walls is larger than 56174.0 what is the lowest amount without the walls?
|
CREATE TABLE table_16677738_1 (without_the_walls INTEGER, within_the_walls INTEGER)
|
SELECT t3.fname, t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = "Hopkins Student Enterprises" AND t3.sex = "M"
|
Find all the male members of club "Hopkins Student Enterprises". Show the first name and last name.
|
CREATE TABLE club (clubid VARCHAR, clubname VARCHAR); CREATE TABLE student (fname VARCHAR, lname VARCHAR, stuid VARCHAR, sex VARCHAR); CREATE TABLE member_of_club (clubid VARCHAR, stuid VARCHAR)
|
SELECT MIN("Grid") FROM table_62894 WHERE "Entrant" = 'fred saunders'
|
What's the lowest grid with and entrant of fred saunders?
|
CREATE TABLE table_62894 (
"Driver" text,
"Entrant" text,
"Constructor" text,
"Time/Retired" text,
"Grid" real
)
|
SELECT MAX(holborn_division) FROM table_16677738_1 WHERE tower_division = 272966
|
When 272966 is the tower division what is the highest holborn division?
|
CREATE TABLE table_16677738_1 (holborn_division INTEGER, tower_division VARCHAR)
|
SELECT t3.fname, t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = "Bootup Baltimore" AND t3.major = "600"
|
Find all members of "Bootup Baltimore" whose major is "600". Show the first name and last name.
|
CREATE TABLE club (clubid VARCHAR, clubname VARCHAR); CREATE TABLE member_of_club (clubid VARCHAR, stuid VARCHAR); CREATE TABLE student (fname VARCHAR, lname VARCHAR, stuid VARCHAR, major VARCHAR)
|
SELECT "Name" FROM table_9427 WHERE "Proposed" = '12/30/1982' AND "County" = 'rockingham' AND "CERCLIS ID" = 'nhd062004569'
|
What name was proposed on 12/30/1982 in rockingham county with a CERCLIS ID of nhd062004569?
|
CREATE TABLE table_9427 (
"CERCLIS ID" text,
"Name" text,
"County" text,
"Proposed" text,
"Listed" text,
"Construction completed" text,
"Partially deleted" text
)
|
SELECT MAX(stolen_ends_against) FROM table_16684420_2 WHERE country = Japan
|
What is the maximum number of stolen ends against for Japan?
|
CREATE TABLE table_16684420_2 (stolen_ends_against INTEGER, country VARCHAR, Japan VARCHAR)
|
SELECT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.major = "600" GROUP BY t1.clubname ORDER BY COUNT(*) DESC LIMIT 1
|
Which club has the most members majoring in "600"?
|
CREATE TABLE student (stuid VARCHAR, major VARCHAR); CREATE TABLE member_of_club (clubid VARCHAR, stuid VARCHAR); CREATE TABLE club (clubname VARCHAR, clubid VARCHAR)
|
SELECT stock FROM table_12834315_4 WHERE colt_model_no = "MT6601"
|
Name the stock for colt model mt6601
|
CREATE TABLE table_12834315_4 (
stock VARCHAR,
colt_model_no VARCHAR
)
|
SELECT skip FROM table_16684420_2 WHERE stolen_ends_against = 13
|
Who was the skip when the stolen ends against was 13?
|
CREATE TABLE table_16684420_2 (skip VARCHAR, stolen_ends_against VARCHAR)
|
SELECT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.sex = "F" GROUP BY t1.clubname ORDER BY COUNT(*) DESC LIMIT 1
|
Find the name of the club that has the most female students.
|
CREATE TABLE student (stuid VARCHAR, sex VARCHAR); CREATE TABLE member_of_club (clubid VARCHAR, stuid VARCHAR); CREATE TABLE club (clubname VARCHAR, clubid VARCHAR)
|
SELECT "Established" FROM table_36871 WHERE "Championships" > '0' AND "League" = 'west coast league'
|
What year was the West Coast League established than the championships are greater than 0?
|
CREATE TABLE table_36871 (
"Club" text,
"Sport" text,
"League" text,
"Venue" text,
"Established" real,
"Championships" real
)
|
SELECT batting_partners FROM table_1670921_1 WHERE season = "1997"
|
Who are the batting partners for the 1997 season?
|
CREATE TABLE table_1670921_1 (batting_partners VARCHAR, season VARCHAR)
|
SELECT clubdesc FROM club WHERE clubname = "Tennis Club"
|
What is the description of the club named "Tennis Club"?
|
CREATE TABLE club (clubdesc VARCHAR, clubname VARCHAR)
|
SELECT T2.Party, SUM(COUNT(*)) FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID GROUP BY T2.Party ORDER BY T2.Party
|
Show the name of each party and the corresponding number of delegates from that party Plot them as bar chart, sort by the x axis from low to high please.
|
CREATE TABLE county (
County_Id int,
County_name text,
Population real,
Zip_code text
)
CREATE TABLE party (
Party_ID int,
Year real,
Party text,
Governor text,
Lieutenant_Governor text,
Comptroller text,
Attorney_General text,
US_Senate text
)
CREATE TABLE election (
Election_ID int,
Counties_Represented text,
District int,
Delegate text,
Party int,
First_Elected real,
Committee text
)
|
SELECT season FROM table_1670921_1 WHERE wicket = "7th"
|
Which season reported wickets of 7th?
|
CREATE TABLE table_1670921_1 (season VARCHAR, wicket VARCHAR)
|
SELECT clubdesc FROM club WHERE clubname = "Pen and Paper Gaming"
|
Find the description of the club "Pen and Paper Gaming".
|
CREATE TABLE club (clubdesc VARCHAR, clubname VARCHAR)
|
SELECT "Institutional authority" FROM table_57777 WHERE "Rocket launch" = 'rehnuma-10'
|
Which Institutional authority has a Rocket launch of rehnuma-10?
|
CREATE TABLE table_57777 (
"Rocket launch" text,
"Launch Date" text,
"Mission" text,
"Institutional authority" text,
"Launch Site" text,
"Outcomes" text,
"Derivatives" text
)
|
SELECT fielding_team FROM table_1670921_1 WHERE wicket = "9th"
|
Which team is 9th in wickets?
|
CREATE TABLE table_1670921_1 (fielding_team VARCHAR, wicket VARCHAR)
|
SELECT clublocation FROM club WHERE clubname = "Tennis Club"
|
What is the location of the club named "Tennis Club"?
|
CREATE TABLE club (clublocation VARCHAR, clubname VARCHAR)
|
SELECT high_points FROM table_name_49 WHERE team = "utah"
|
What are Utah's high points?
|
CREATE TABLE table_name_49 (
high_points VARCHAR,
team VARCHAR
)
|
SELECT venue FROM table_1670921_1 WHERE batting_partners = "Mahela Jayawardene and Prasanna Jayawardene"
|
What is the venue for batting partners Mahela Jayawardene and Prasanna Jayawardene
|
CREATE TABLE table_1670921_1 (venue VARCHAR, batting_partners VARCHAR)
|
SELECT clublocation FROM club WHERE clubname = "Pen and Paper Gaming"
|
Find the location of the club "Pen and Paper Gaming".
|
CREATE TABLE club (clublocation VARCHAR, clubname VARCHAR)
|
SELECT "Swimsuit" FROM table_21281 WHERE "Preliminary" = '8.847'
|
Give swimsuit scores of participants 8.847 in preliminary
|
CREATE TABLE table_21281 (
"Country" text,
"Preliminary" text,
"Interview" text,
"Swimsuit" text,
"Evening Gown" text,
"Average" text
)
|
SELECT COUNT(batting_team) FROM table_1670921_1 WHERE wicket = "3rd"
|
How many teams are listed for 3rd wickets?
|
CREATE TABLE table_1670921_1 (batting_team VARCHAR, wicket VARCHAR)
|
SELECT clublocation FROM club WHERE clubname = "Hopkins Student Enterprises"
|
Where is the club "Hopkins Student Enterprises" located?
|
CREATE TABLE club (clublocation VARCHAR, clubname VARCHAR)
|
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service 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 = 'SAN FRANCISCO' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BOSTON' AND flight.to_airport = AIRPORT_SERVICE_0.airport_code AND flight.from_airport = AIRPORT_SERVICE_1.airport_code) AND flight.airline_code = 'CO'
|
i want a flight on CO from BOSTON to SAN FRANCISCO
|
CREATE TABLE time_interval (
period text,
begin_time int,
end_time int
)
CREATE TABLE fare (
fare_id int,
from_airport varchar,
to_airport varchar,
fare_basis_code text,
fare_airline text,
restriction_code text,
one_direction_cost int,
round_trip_cost int,
round_trip_required varchar
)
CREATE TABLE date_day (
month_number int,
day_number int,
year int,
day_name varchar
)
CREATE TABLE month (
month_number int,
month_name text
)
CREATE TABLE food_service (
meal_code text,
meal_number int,
compartment text,
meal_description varchar
)
CREATE TABLE compartment_class (
compartment varchar,
class_type varchar
)
CREATE TABLE equipment_sequence (
aircraft_code_sequence varchar,
aircraft_code varchar
)
CREATE TABLE days (
days_code varchar,
day_name varchar
)
CREATE TABLE state (
state_code text,
state_name text,
country_name text
)
CREATE TABLE city (
city_code varchar,
city_name varchar,
state_code varchar,
country_name varchar,
time_zone_code varchar
)
CREATE TABLE ground_service (
city_code text,
airport_code text,
transport_type text,
ground_fare int
)
CREATE TABLE class_of_service (
booking_class varchar,
rank int,
class_description text
)
CREATE TABLE flight_stop (
flight_id int,
stop_number int,
stop_days text,
stop_airport text,
arrival_time int,
arrival_airline text,
arrival_flight_number int,
departure_time int,
departure_airline text,
departure_flight_number int,
stop_time int
)
CREATE TABLE flight_fare (
flight_id int,
fare_id int
)
CREATE TABLE code_description (
code varchar,
description text
)
CREATE TABLE fare_basis (
fare_basis_code text,
booking_class text,
class_type text,
premium text,
economy text,
discounted text,
night text,
season text,
basis_days text
)
CREATE TABLE time_zone (
time_zone_code text,
time_zone_name text,
hours_from_gmt int
)
CREATE TABLE flight_leg (
flight_id int,
leg_number int,
leg_flight int
)
CREATE TABLE airport_service (
city_code varchar,
airport_code varchar,
miles_distant int,
direction varchar,
minutes_distant int
)
CREATE TABLE flight (
aircraft_code_sequence text,
airline_code varchar,
airline_flight text,
arrival_time int,
connections int,
departure_time int,
dual_carrier text,
flight_days text,
flight_id int,
flight_number int,
from_airport varchar,
meal_code text,
stops int,
time_elapsed int,
to_airport varchar
)
CREATE TABLE restriction (
restriction_code text,
advance_purchase int,
stopovers text,
saturday_stay_required text,
minimum_stay int,
maximum_stay int,
application text,
no_discounts text
)
CREATE TABLE dual_carrier (
main_airline varchar,
low_flight_number int,
high_flight_number int,
dual_airline varchar,
service_name text
)
CREATE TABLE aircraft (
aircraft_code varchar,
aircraft_description varchar,
manufacturer varchar,
basic_type varchar,
engines int,
propulsion varchar,
wide_body varchar,
wing_span int,
length int,
weight int,
capacity int,
pay_load int,
cruising_speed int,
range_miles int,
pressurized varchar
)
CREATE TABLE airport (
airport_code varchar,
airport_name text,
airport_location text,
state_code varchar,
country_name varchar,
time_zone_code varchar,
minimum_connect_time int
)
CREATE TABLE airline (
airline_code varchar,
airline_name text,
note text
)
|
SELECT COUNT(batting_partners) FROM table_1670921_2 WHERE season = "2006"
|
How many total batting partners were most successful in the 2006 season?
|
CREATE TABLE table_1670921_2 (batting_partners VARCHAR, season VARCHAR)
|
SELECT clubname FROM club WHERE clublocation = "AKW"
|
Find the name of all the clubs at "AKW".
|
CREATE TABLE club (clubname VARCHAR, clublocation VARCHAR)
|
SELECT "Region" FROM table_8574 WHERE "Catalog" = 'ilps 9153'
|
The Catalog of ilps 9153 is from what region?
|
CREATE TABLE table_8574 (
"Region" text,
"Date" text,
"Label" text,
"Format" text,
"Catalog" text
)
|
SELECT batting_partners FROM table_1670921_2 WHERE batting_team = "Pakistan"
|
What batting partners batted for pakistan?
|
CREATE TABLE table_1670921_2 (batting_partners VARCHAR, batting_team VARCHAR)
|
SELECT COUNT(*) FROM club WHERE clublocation = "HHH"
|
How many clubs are located at "HHH"?
|
CREATE TABLE club (clublocation VARCHAR)
|
SELECT COUNT(february) FROM table_name_48 WHERE opponent = "vancouver canucks" AND game > 55
|
What is the February number of the game with the Vancouver Canucks as the opponent and a game number greater than 55?
|
CREATE TABLE table_name_48 (
february VARCHAR,
opponent VARCHAR,
game VARCHAR
)
|
SELECT runs FROM table_1670921_2 WHERE fielding_team = "Bangladesh"
|
How many runs when bangladesh was the fielding team?
|
CREATE TABLE table_1670921_2 (runs VARCHAR, fielding_team VARCHAR)
|
SELECT t3.fname, t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = "Bootup Baltimore" AND t2.position = "President"
|
What are the first and last name of the president of the club "Bootup Baltimore"?
|
CREATE TABLE club (clubid VARCHAR, clubname VARCHAR); CREATE TABLE student (fname VARCHAR, lname VARCHAR, stuid VARCHAR); CREATE TABLE member_of_club (clubid VARCHAR, stuid VARCHAR, position VARCHAR)
|
SELECT prescriptions.drug FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 52898) AND prescriptions.route = 'right ear' AND STRFTIME('%y-%m', prescriptions.startdate) >= '2105-02' ORDER BY prescriptions.startdate DESC LIMIT 1
|
what was the name of the drug, which patient 52898 was last prescribed via right ear route since 02/2105?
|
CREATE TABLE prescriptions (
row_id number,
subject_id number,
hadm_id number,
startdate time,
enddate time,
drug text,
dose_val_rx text,
dose_unit_rx text,
route text
)
CREATE TABLE admissions (
row_id number,
subject_id number,
hadm_id number,
admittime time,
dischtime time,
admission_type text,
admission_location text,
discharge_location text,
insurance text,
language text,
marital_status text,
ethnicity text,
age number
)
CREATE TABLE d_labitems (
row_id number,
itemid number,
label text
)
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value number
)
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
amount number
)
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE transfers (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
eventtype text,
careunit text,
wardid number,
intime time,
outtime time
)
CREATE TABLE chartevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
cost number
)
CREATE TABLE icustays (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
first_careunit text,
last_careunit text,
first_wardid number,
last_wardid number,
intime time,
outtime time
)
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
|
SELECT wicket FROM table_1670921_2 WHERE runs = "451" AND fielding_team = "India"
|
What are the wickets when there are 451 runs and india is the fielding team?
|
CREATE TABLE table_1670921_2 (wicket VARCHAR, runs VARCHAR, fielding_team VARCHAR)
|
SELECT t3.fname, t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = "Hopkins Student Enterprises" AND t2.position = "CTO"
|
Who is the "CTO" of club "Hopkins Student Enterprises"? Show the first name and last name.
|
CREATE TABLE club (clubid VARCHAR, clubname VARCHAR); CREATE TABLE student (fname VARCHAR, lname VARCHAR, stuid VARCHAR); CREATE TABLE member_of_club (clubid VARCHAR, stuid VARCHAR, position VARCHAR)
|
SELECT AVG("Rank") FROM table_10504 WHERE "Laps" = '76'
|
What is the average rank of one who is at 76 laps?
|
CREATE TABLE table_10504 (
"Grid" real,
"Constructor" text,
"Qual" real,
"Rank" real,
"Laps" real,
"Time/retired" text
)
|
SELECT batting_partners FROM table_1670921_2 WHERE venue = "Sydney"
|
What batting partners played in sydney?
|
CREATE TABLE table_1670921_2 (batting_partners VARCHAR, venue VARCHAR)
|
SELECT COUNT(DISTINCT t2.position) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid WHERE t1.clubname = "Bootup Baltimore"
|
How many different roles are there in the club "Bootup Baltimore"?
|
CREATE TABLE club (clubid VARCHAR, clubname VARCHAR); CREATE TABLE member_of_club (position VARCHAR, clubid VARCHAR)
|
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.short_title = "Atrial fibrillation" AND prescriptions.route = "TP"
|
count the number of patients whose diagnoses short title is atrial fibrillation and drug route is tp?
|
CREATE TABLE procedures (
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,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
|
SELECT batting_partners FROM table_1670921_2 WHERE season = "2004"
|
What batting partners were the most successful in 2004?
|
CREATE TABLE table_1670921_2 (batting_partners VARCHAR, season VARCHAR)
|
SELECT COUNT(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = "Bootup Baltimore" AND t3.age > 18
|
How many members of "Bootup Baltimore" are older than 18?
|
CREATE TABLE club (clubid VARCHAR, clubname VARCHAR); CREATE TABLE student (stuid VARCHAR, age VARCHAR); CREATE TABLE member_of_club (clubid VARCHAR, stuid VARCHAR)
|
SELECT country FROM table_name_10 WHERE music = "nino oliviero"
|
What country is the film that has music of nino oliviero?
|
CREATE TABLE table_name_10 (
country VARCHAR,
music VARCHAR
)
|
SELECT falcons_points FROM table_16710829_2 WHERE record = "3-2"
|
Name the falcons points for record of 3-2
|
CREATE TABLE table_16710829_2 (falcons_points VARCHAR, record VARCHAR)
|
SELECT COUNT(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = "Bootup Baltimore" AND t3.age < 18
|
How many members of club "Bootup Baltimore" are younger than 18?
|
CREATE TABLE club (clubid VARCHAR, clubname VARCHAR); CREATE TABLE student (stuid VARCHAR, age VARCHAR); CREATE TABLE member_of_club (clubid VARCHAR, stuid VARCHAR)
|
SELECT DISTINCT semester.semester, semester.year FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND course.department = 'EECS' AND course.number = 421 AND course_offering.semester = semester.semester_id AND semester.semester_id > (SELECT SEMESTERalias1.semester_id FROM semester AS SEMESTERalias1 WHERE SEMESTERalias1.semester = 'WN' AND SEMESTERalias1.year = 2016) ORDER BY semester.semester_id LIMIT 1
|
When can I take 421 ?
|
CREATE TABLE area (
course_id int,
area varchar
)
CREATE TABLE requirement (
requirement_id int,
requirement varchar,
college varchar
)
CREATE TABLE ta (
campus_job_id int,
student_id int,
location varchar
)
CREATE TABLE program (
program_id int,
name varchar,
college varchar,
introduction varchar
)
CREATE TABLE gsi (
course_offering_id int,
student_id int
)
CREATE TABLE semester (
semester_id int,
semester varchar,
year int
)
CREATE TABLE course_offering (
offering_id int,
course_id int,
semester int,
section_number int,
start_time time,
end_time time,
monday varchar,
tuesday varchar,
wednesday varchar,
thursday varchar,
friday varchar,
saturday varchar,
sunday varchar,
has_final_project varchar,
has_final_exam varchar,
textbook varchar,
class_address varchar,
allow_audit varchar
)
CREATE TABLE comment_instructor (
instructor_id int,
student_id int,
score int,
comment_text varchar
)
CREATE TABLE offering_instructor (
offering_instructor_id int,
offering_id int,
instructor_id int
)
CREATE TABLE program_requirement (
program_id int,
category varchar,
min_credit int,
additional_req varchar
)
CREATE TABLE jobs (
job_id int,
job_title varchar,
description varchar,
requirement varchar,
city varchar,
state varchar,
country varchar,
zip int
)
CREATE TABLE instructor (
instructor_id int,
name varchar,
uniqname varchar
)
CREATE TABLE student (
student_id int,
lastname varchar,
firstname varchar,
program_id int,
declare_major varchar,
total_credit int,
total_gpa float,
entered_as varchar,
admit_term int,
predicted_graduation_semester int,
degree varchar,
minor varchar,
internship varchar
)
CREATE TABLE course (
course_id int,
name varchar,
department varchar,
number varchar,
credits varchar,
advisory_requirement varchar,
enforced_requirement varchar,
description varchar,
num_semesters int,
num_enrolled int,
has_discussion varchar,
has_lab varchar,
has_projects varchar,
has_exams varchar,
num_reviews int,
clarity_score int,
easiness_score int,
helpfulness_score int
)
CREATE TABLE student_record (
student_id int,
course_id int,
semester int,
grade varchar,
how varchar,
transfer_source varchar,
earn_credit varchar,
repeat_term varchar,
test_id varchar
)
CREATE TABLE course_prerequisite (
pre_course_id int,
course_id int
)
CREATE TABLE course_tags_count (
course_id int,
clear_grading int,
pop_quiz int,
group_projects int,
inspirational int,
long_lectures int,
extra_credit int,
few_tests int,
good_feedback int,
tough_tests int,
heavy_papers int,
cares_for_students int,
heavy_assignments int,
respected int,
participation int,
heavy_reading int,
tough_grader int,
hilarious int,
would_take_again int,
good_lecture int,
no_skip int
)
CREATE TABLE program_course (
program_id int,
course_id int,
workload int,
category varchar
)
|
SELECT date FROM table_16710829_2 WHERE game = 9
|
Name the date for game 9
|
CREATE TABLE table_16710829_2 (date VARCHAR, game VARCHAR)
|
SELECT DISTINCT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.city_code = "BAL"
|
Find the names of all the clubs that have at least a member from the city with city code "BAL".
|
CREATE TABLE member_of_club (clubid VARCHAR, stuid VARCHAR); CREATE TABLE club (clubname VARCHAR, clubid VARCHAR); CREATE TABLE student (stuid VARCHAR, city_code VARCHAR)
|
SELECT COUNT(*), SUM(Enrollment) FROM School GROUP BY County
|
Show the relationship between the number of schools in each county and total enrollment in each county by a scatter plot.
|
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 endowment (
endowment_id int,
School_id int,
donator_name text,
amount real
)
CREATE TABLE budget (
School_id int,
Year int,
Budgeted int,
total_budget_percent_budgeted real,
Invested int,
total_budget_percent_invested real,
Budget_invested_percent text
)
|
SELECT MAX(game) FROM table_16710829_2 WHERE attendance = 54774
|
Name the max game for attendance being 54774
|
CREATE TABLE table_16710829_2 (game INTEGER, attendance VARCHAR)
|
SELECT DISTINCT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.city_code = "HOU"
|
Find the names of the clubs that have at least a member from the city with city code "HOU".
|
CREATE TABLE member_of_club (clubid VARCHAR, stuid VARCHAR); CREATE TABLE club (clubname VARCHAR, clubid VARCHAR); CREATE TABLE student (stuid VARCHAR, city_code VARCHAR)
|
SELECT T1.Name, T1.Manufacturer FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T1.Name ORDER BY T1.Name DESC
|
For those records from the products and each product's manufacturer, visualize a bar chart about the distribution of name and the average of manufacturer , and group by attribute name, I want to show by the X in desc.
|
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
)
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
)
|
SELECT COUNT(result) FROM table_16710829_2 WHERE opponent = "New Orleans Saints"
|
Name the total number of results for new orleans saints
|
CREATE TABLE table_16710829_2 (result VARCHAR, opponent VARCHAR)
|
SELECT COUNT(DISTINCT t1.clubname) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.fname = "Eric" AND t3.lname = "Tai"
|
How many clubs does the student named "Eric Tai" belong to?
|
CREATE TABLE student (stuid VARCHAR, fname VARCHAR, lname VARCHAR); CREATE TABLE member_of_club (clubid VARCHAR, stuid VARCHAR); CREATE TABLE club (clubname VARCHAR, clubid VARCHAR)
|
SELECT home_team FROM table_14312471_7 WHERE away_team = "Richmond"
|
Who played Richmond at home?
|
CREATE TABLE table_14312471_7 (
home_team VARCHAR,
away_team VARCHAR
)
|
SELECT COUNT(opponent) FROM table_16710971_2 WHERE record = "1-3"
|
What is the total number of opponents for the game recorded as 1-3?
|
CREATE TABLE table_16710971_2 (opponent VARCHAR, record VARCHAR)
|
SELECT DISTINCT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.fname = "Davis" AND t3.lname = "Steven"
|
List the clubs having "Davis Steven" as a member.
|
CREATE TABLE student (stuid VARCHAR, fname VARCHAR, lname VARCHAR); CREATE TABLE member_of_club (clubid VARCHAR, stuid VARCHAR); CREATE TABLE club (clubname VARCHAR, clubid VARCHAR)
|
SELECT "Label" FROM table_53217 WHERE "Year" > '2004'
|
What label is after 2004?
|
CREATE TABLE table_53217 (
"Year" real,
"Tracks" text,
"Title" text,
"Format, Special Notes" text,
"Label" text
)
|
SELECT result FROM table_16710971_2 WHERE record = "1-2"
|
What was the result of the 1978 Atlanta Falcons season when the record was 1-2?
|
CREATE TABLE table_16710971_2 (result VARCHAR, record VARCHAR)
|
SELECT DISTINCT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.advisor = 1121
|
List the clubs that have at least a member with advisor "1121".
|
CREATE TABLE member_of_club (clubid VARCHAR, stuid VARCHAR); CREATE TABLE club (clubname VARCHAR, clubid VARCHAR); CREATE TABLE student (stuid VARCHAR, advisor VARCHAR)
|
SELECT DISTINCT aircraft_code FROM aircraft WHERE aircraft_code = '734'
|
how many seats in a 734
|
CREATE TABLE dual_carrier (
main_airline varchar,
low_flight_number int,
high_flight_number int,
dual_airline varchar,
service_name text
)
CREATE TABLE ground_service (
city_code text,
airport_code text,
transport_type text,
ground_fare int
)
CREATE TABLE airline (
airline_code varchar,
airline_name text,
note text
)
CREATE TABLE restriction (
restriction_code text,
advance_purchase int,
stopovers text,
saturday_stay_required text,
minimum_stay int,
maximum_stay int,
application text,
no_discounts text
)
CREATE TABLE airport_service (
city_code varchar,
airport_code varchar,
miles_distant int,
direction varchar,
minutes_distant int
)
CREATE TABLE flight_stop (
flight_id int,
stop_number int,
stop_days text,
stop_airport text,
arrival_time int,
arrival_airline text,
arrival_flight_number int,
departure_time int,
departure_airline text,
departure_flight_number int,
stop_time int
)
CREATE TABLE time_interval (
period text,
begin_time int,
end_time int
)
CREATE TABLE flight_leg (
flight_id int,
leg_number int,
leg_flight int
)
CREATE TABLE time_zone (
time_zone_code text,
time_zone_name text,
hours_from_gmt int
)
CREATE TABLE fare (
fare_id int,
from_airport varchar,
to_airport varchar,
fare_basis_code text,
fare_airline text,
restriction_code text,
one_direction_cost int,
round_trip_cost int,
round_trip_required varchar
)
CREATE TABLE equipment_sequence (
aircraft_code_sequence varchar,
aircraft_code varchar
)
CREATE TABLE flight_fare (
flight_id int,
fare_id int
)
CREATE TABLE airport (
airport_code varchar,
airport_name text,
airport_location text,
state_code varchar,
country_name varchar,
time_zone_code varchar,
minimum_connect_time int
)
CREATE TABLE code_description (
code varchar,
description text
)
CREATE TABLE state (
state_code text,
state_name text,
country_name text
)
CREATE TABLE city (
city_code varchar,
city_name varchar,
state_code varchar,
country_name varchar,
time_zone_code varchar
)
CREATE TABLE food_service (
meal_code text,
meal_number int,
compartment text,
meal_description varchar
)
CREATE TABLE class_of_service (
booking_class varchar,
rank int,
class_description text
)
CREATE TABLE aircraft (
aircraft_code varchar,
aircraft_description varchar,
manufacturer varchar,
basic_type varchar,
engines int,
propulsion varchar,
wide_body varchar,
wing_span int,
length int,
weight int,
capacity int,
pay_load int,
cruising_speed int,
range_miles int,
pressurized varchar
)
CREATE TABLE month (
month_number int,
month_name text
)
CREATE TABLE date_day (
month_number int,
day_number int,
year int,
day_name varchar
)
CREATE TABLE days (
days_code varchar,
day_name varchar
)
CREATE TABLE compartment_class (
compartment varchar,
class_type varchar
)
CREATE TABLE flight (
aircraft_code_sequence text,
airline_code varchar,
airline_flight text,
arrival_time int,
connections int,
departure_time int,
dual_carrier text,
flight_days text,
flight_id int,
flight_number int,
from_airport varchar,
meal_code text,
stops int,
time_elapsed int,
to_airport varchar
)
CREATE TABLE fare_basis (
fare_basis_code text,
booking_class text,
class_type text,
premium text,
economy text,
discounted text,
night text,
season text,
basis_days text
)
|
SELECT falcons_points FROM table_16710971_2 WHERE record = "4-4"
|
How many points did the Falcons score when the record was 4-4?
|
CREATE TABLE table_16710971_2 (falcons_points VARCHAR, record VARCHAR)
|
SELECT AVG(t3.age) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = "Bootup Baltimore"
|
What is the average age of the members of the club "Bootup Baltimore"?
|
CREATE TABLE club (clubid VARCHAR, clubname VARCHAR); CREATE TABLE student (age INTEGER, stuid VARCHAR); CREATE TABLE member_of_club (clubid VARCHAR, stuid VARCHAR)
|
SELECT "Name" FROM table_63371 WHERE "Constituency number" = '150'
|
what is the name when the constituency number is 150?
|
CREATE TABLE table_63371 (
"Constituency number" text,
"Name" text,
"Reserved for ( SC / ST /None)" text,
"District" text,
"Number of electorates (2009)" real
)
|
SELECT COUNT(opponents) FROM table_16710971_2 WHERE record = "6-4"
|
How many opponents were there for the game recorded as 6-4 in the Atlanta Falcons 1978 season?
|
CREATE TABLE table_16710971_2 (opponents VARCHAR, record VARCHAR)
|
SELECT AVG(t3.age) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = "Hopkins Student Enterprises"
|
Find the average age of members of the club "Hopkins Student Enterprises".
|
CREATE TABLE club (clubid VARCHAR, clubname VARCHAR); CREATE TABLE student (age INTEGER, stuid VARCHAR); CREATE TABLE member_of_club (clubid VARCHAR, stuid VARCHAR)
|
SELECT place FROM table_name_48 WHERE score = 67 - 70 = 137
|
WHAT PLACE WAS A SCORE 67-70=137?
|
CREATE TABLE table_name_48 (
place VARCHAR,
score VARCHAR
)
|
SELECT MIN(falcons_points) FROM table_16710971_2 WHERE opponent = "San Francisco 49ers"
|
In games where the opponent was the San Francisco 49ers what was the minimum amount of points scored?
|
CREATE TABLE table_16710971_2 (falcons_points INTEGER, opponent VARCHAR)
|
SELECT AVG(t3.age) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = "Tennis Club"
|
Retrieve the average age of members of the club "Tennis Club".
|
CREATE TABLE club (clubid VARCHAR, clubname VARCHAR); CREATE TABLE student (age INTEGER, stuid VARCHAR); CREATE TABLE member_of_club (clubid VARCHAR, stuid VARCHAR)
|
SELECT demographic.dischtime, diagnoses.icd9_code FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.subject_id = "42820"
|
mention the discharge time and diagnosis icd9 code of subject id 42820.
|
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
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 (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
|
SELECT pts FROM table_16710541_2 WHERE team = "Kiefer-Bos-Castrol Honda"
|
How many points did kiefer-bos-castrol honda have?
|
CREATE TABLE table_16710541_2 (pts VARCHAR, team VARCHAR)
|
SELECT T1.grant_amount FROM Grants AS T1 JOIN Documents AS T2 ON T1.grant_id = T2.grant_id WHERE T2.sent_date < '1986-08-26 20:49:27' INTERSECT SELECT grant_amount FROM grants WHERE grant_end_date > '1989-03-16 18:27:16'
|
What are the distinct grant amount for the grants where the documents were sent before '1986-08-26 20:49:27' and grant were ended after '1989-03-16 18:27:16'?
|
CREATE TABLE grants (grant_amount VARCHAR, grant_end_date INTEGER); CREATE TABLE Grants (grant_amount VARCHAR, grant_id VARCHAR); CREATE TABLE Documents (grant_id VARCHAR, sent_date INTEGER)
|
SELECT JOB_ID, DEPARTMENT_ID FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY JOB_ID DESC
|
For those employees who do not work in departments with managers that have ids between 100 and 200, a bar chart shows the distribution of job_id and department_id , and could you rank names from high to low order?
|
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varchar(12),
CITY varchar(30),
STATE_PROVINCE varchar(25),
COUNTRY_ID varchar(2)
)
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
HIRE_DATE date,
JOB_ID varchar(10),
SALARY decimal(8,2),
COMMISSION_PCT decimal(2,2),
MANAGER_ID decimal(6,0),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
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)
)
|
SELECT position FROM table_16710541_2 WHERE motorcycle = "KTM"
|
What result did the ktm motorcycle achieve?
|
CREATE TABLE table_16710541_2 (position VARCHAR, motorcycle VARCHAR)
|
SELECT T1.project_details FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id WHERE T2.outcome_code = 'Paper' INTERSECT SELECT T1.project_details FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id WHERE T2.outcome_code = 'Patent'
|
List the project details of the project both producing patent and paper as outcomes.
|
CREATE TABLE Project_outcomes (project_id VARCHAR, outcome_code VARCHAR); CREATE TABLE Projects (project_details VARCHAR, project_id VARCHAR)
|
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "RUQ PAIN" AND demographic.dob_year < "2112"
|
provide the number of patients whose primary disease is ruq pain and year of birth is less than 2112?
|
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
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,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
|
SELECT MIN(poles) FROM table_16710541_2
|
What is the lowest number of poles?
|
CREATE TABLE table_16710541_2 (poles INTEGER)
|
SELECT SUM(grant_amount) FROM Grants AS T1 JOIN Organisations AS T2 ON T1.organisation_id = T2.organisation_id JOIN organisation_Types AS T3 ON T2.organisation_type = T3.organisation_type WHERE T3.organisation_type_description = 'Research'
|
What is the total grant amount of the organisations described as research?
|
CREATE TABLE organisation_Types (organisation_type VARCHAR, organisation_type_description VARCHAR); CREATE TABLE Grants (organisation_id VARCHAR); CREATE TABLE Organisations (organisation_id VARCHAR, organisation_type VARCHAR)
|
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.discharge_location = "SHORT TERM HOSPITAL" AND demographic.age < "67"
|
How many patients are with discharge location short term hospital and below age 67?
|
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid 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,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
|
SELECT MIN(top_5) FROM table_1671401_1
|
Name the least top 5
|
CREATE TABLE table_1671401_1 (top_5 INTEGER)
|
SELECT date_from, date_to FROM Project_Staff WHERE project_id IN (SELECT project_id FROM Project_Staff GROUP BY project_id ORDER BY COUNT(*) DESC LIMIT 1) UNION SELECT date_from, date_to FROM Project_Staff WHERE role_code = 'leader'
|
List from which date and to which date these staff work: project staff of the project which hires the most staffs
|
CREATE TABLE Project_Staff (date_from VARCHAR, date_to VARCHAR, project_id VARCHAR, role_code VARCHAR)
|
SELECT "Year Built" FROM table_59057 WHERE "Location of the Church" = 'arnafjord'
|
When was the church in Arnafjord built?
|
CREATE TABLE table_59057 (
"Parish (Prestegjeld)" text,
"Sub-Parish (Sokn)" text,
"Church Name" text,
"Year Built" text,
"Location of the Church" text
)
|
SELECT top_5 FROM table_1671401_3 WHERE winnings = "$52,595"
|
name the top 5 where the winnings is $52,595
|
CREATE TABLE table_1671401_3 (top_5 VARCHAR, winnings VARCHAR)
|
SELECT T2.organisation_id, T2.organisation_details FROM Grants AS T1 JOIN Organisations AS T2 ON T1.organisation_id = T2.organisation_id GROUP BY T2.organisation_id HAVING SUM(T1.grant_amount) > 6000
|
Find the organisation ids and details of the organisations which are involved in
|
CREATE TABLE Grants (organisation_id VARCHAR, grant_amount INTEGER); CREATE TABLE Organisations (organisation_id VARCHAR, organisation_details VARCHAR)
|
SELECT "Result" FROM table_59320 WHERE "Attendance" = '56,500'
|
What was the result of the game that had 56,500 in attendance?
|
CREATE TABLE table_59320 (
"Date" text,
"Time" text,
"Opponent#" text,
"Rank #" text,
"Result" text,
"Attendance" text
)
|
SELECT COUNT(top_10) FROM table_1671401_3 WHERE position = "51st"
|
name the total number of top 10 also where the position is 51st
|
CREATE TABLE table_1671401_3 (top_10 VARCHAR, position VARCHAR)
|
SELECT T1.organisation_type, T1.organisation_id FROM Organisations AS T1 JOIN Research_Staff AS T2 ON T1.organisation_id = T2.employer_organisation_id GROUP BY T1.organisation_id ORDER BY COUNT(*) DESC LIMIT 1
|
What is the organisation type and id of the organisation which has the most number of research staff?
|
CREATE TABLE Research_Staff (employer_organisation_id VARCHAR); CREATE TABLE Organisations (organisation_type VARCHAR, organisation_id VARCHAR)
|
SELECT SUM(round) FROM table_name_91 WHERE school_club_team = "pan american"
|
How many rounds have School/club team of pan american?
|
CREATE TABLE table_name_91 (
round INTEGER,
school_club_team VARCHAR
)
|
SELECT winnings FROM table_1671401_3 WHERE starts = 7
|
name all the winnings that the start appears to be 7
|
CREATE TABLE table_1671401_3 (winnings VARCHAR, starts VARCHAR)
|
SELECT T1.organisation_type FROM Organisations AS T1 JOIN Research_Staff AS T2 ON T1.organisation_id = T2.employer_organisation_id GROUP BY T1.organisation_type ORDER BY COUNT(*) DESC LIMIT 1
|
Which organisation type hires most research staff?
|
CREATE TABLE Research_Staff (employer_organisation_id VARCHAR); CREATE TABLE Organisations (organisation_type VARCHAR, organisation_id VARCHAR)
|
SELECT "Attendance" FROM table_77393 WHERE "Time" = '3:00'
|
What is the number of people in attendance when the time is 3:00?
|
CREATE TABLE table_77393 (
"Game" real,
"Date" text,
"Score" text,
"Location" text,
"Time" text,
"Attendance" real
)
|
SELECT COUNT(winnings) FROM table_1671401_2 WHERE year = 1995
|
Name the total number of winnings for 1995
|
CREATE TABLE table_1671401_2 (winnings VARCHAR, year VARCHAR)
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.