query_id
int64
0
1.53k
database_id
stringclasses
11 values
table_id
sequencelengths
1
4
query
stringlengths
23
286
answer
stringlengths
29
1.45k
difficulty
stringclasses
3 values
evidence
stringlengths
0
591
1,300
thrombosis_prediction
[ "Examination", "Laboratory" ]
What is the disease name of the patient who has the highest level of triglyceride within the normal range?
SELECT T1.Diagnosis FROM Examination AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.TG < 200 ORDER BY T2.TG DESC LIMIT 1
moderate
disease name referse to Diagnosis; highest level of triglyceride within the normal range refers to MAX(TG < 200);
1,301
thrombosis_prediction
[ "Laboratory", "Examination" ]
Please list the IDs of the patients with no thrombosis and an abnormal level of creatinine phosphokinase.
SELECT DISTINCT T1.ID FROM Laboratory AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID WHERE T2.Thrombosis = 0 AND T1.CPK < 250
simple
no thrombosis refers to Thrombosis = 0 ; abnormal level of creatinine phosphokinase refers to CPK < 250;
1,302
thrombosis_prediction
[ "Laboratory", "Examination", "Patient" ]
For the patients with a normal range of creatinine phosphokinase, how many of them have a positive measure of degree of coagulation?
SELECT COUNT(T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID INNER JOIN Examination AS T3 ON T1.ID = T3.ID WHERE T2.CPK < 250 AND (T3.KCT = '+' OR T3.RVVT = '+' OR T3.LAC = '+')
challenging
normal range of creatinine phosphokinase refers to CPK < 250; positive measure of degree of coagulation refers to KCT = '+' or RVVT = '+' or LAC = '+' ;
1,303
thrombosis_prediction
[ "Laboratory", "Patient" ]
When is the birthday of the oldest patient whose blood glucose is abnormal?
SELECT T1.Birthday FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.GLU > 180 ORDER BY T1.Birthday ASC LIMIT 1
simple
oldest patient refers to MIN(Birthday); blood glucose is abnormal refers to GLU > 180;
1,304
thrombosis_prediction
[ "Laboratory", "Examination", "Patient" ]
Among the patients with a normal blood glucose, how many of them don't have thrombosis?
SELECT COUNT(T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID INNER JOIN Examination AS T3 ON T1.ID = T3.ID WHERE T2.GLU < 180 AND T3.Thrombosis = 0
moderate
normal blood glucose refers to GLU < 180; don't have thrombosis refers to Thrombosis = 0;
1,305
thrombosis_prediction
[ "Laboratory", "Patient" ]
How many patients accepted to the hospital have a normal level of white blood cells?
SELECT COUNT(T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.WBC BETWEEN 3.5 AND 9 AND T1.Admission = '+'
moderate
accepted to the hospital refers to Admission = '+'; normal level of white blood cells refers to WBC between 3.5 and 9.0;
1,306
thrombosis_prediction
[ "Laboratory", "Patient" ]
How many patients diagnosed with SLE have a normal white blood cell level?
SELECT COUNT(T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T1.Diagnosis = 'SLE' AND T2.WBC BETWEEN 3.5 AND 9
simple
diagnosed with SLE refers to Diagnosis = 'SLE'; normal white blood cell level refers to WBC between 3.5 and 9.0;
1,307
thrombosis_prediction
[ "Laboratory", "Patient" ]
Please list the patient's ID if he or she has an abnormal level of red blood cell and is followed at the outpatient clinic.
SELECT DISTINCT T1.ID FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE (T2.RBC <= 3.5 OR T2.RBC >= 6) AND T1.Admission = '-'
challenging
RBC < = 3.5 or RBC > = 6.0 means the patient has an abnormal level of red blood cell; 3.5 < RBC < 6.0 means the patient has a normal level of red blood cell; followed at the outpatient clinic refers to Admission = '-';
1,308
thrombosis_prediction
[ "Laboratory", "Patient" ]
Among the patients who have a normal platelet level, how many of them have other symptoms observed?
SELECT COUNT(T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.PLT BETWEEN 100 AND 400 AND T1.Diagnosis IS NOT NULL
moderate
normal platelet level refers to PLT > 100 and PLT < 400; have other symptoms refers to Diagnosis is not null;
1,309
thrombosis_prediction
[ "Laboratory", "Patient" ]
Please list a patient's platelet level if it is within the normal range and if he or she is diagnosed with MCTD.
SELECT T2.PLT FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T1.Diagnosis = 'MCTD' AND T2.PLT BETWEEN 100 AND 400
moderate
PLT > 100 and PLT < 400 means platelet level is within the normal range; PLT < 100 and PLT > 400 means platelet level is not within the normal range; diagnosed with MCTD refers to Diagnosis = 'MCTD';
1,310
thrombosis_prediction
[ "Laboratory", "Patient" ]
For the male patients that have a normal prothrombin time, what is their average prothrombin time?
SELECT AVG(T2.PT) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.PT < 14 AND T1.SEX = 'M'
simple
male refers to Sex = 'M'; normal prothrombin time refer to PT < 14; average prothrombin time = AVG(PT);
1,311
thrombosis_prediction
[ "Laboratory", "Examination", "Patient" ]
How many patients with severe thrombosis have a normal prothrombin time?
SELECT COUNT(T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID INNER JOIN Examination AS T3 ON T1.ID = T3.ID WHERE T2.PT < 14 AND T3.Thrombosis < 3 AND T3.Thrombosis > 0
moderate
severe thrombosis refers to Thrombosis = 2 or 1; normal prothrombin time refers to PT < 14;
1,312
student_club
[ "major", "member" ]
What's Angela Sanders's major?
SELECT T2.major_name FROM member AS T1 INNER JOIN major AS T2 ON T1.link_to_major = T2.major_id WHERE T1.first_name = 'Angela' AND T1.last_name = 'Sanders'
simple
major refers to major_name
1,313
student_club
[ "major", "member" ]
How many students in the Student_Club are from the College of Engineering?
SELECT COUNT(T1.member_id) FROM member AS T1 INNER JOIN major AS T2 ON T1.link_to_major = T2.major_id WHERE T2.college = 'College of Engineering'
simple
1,314
student_club
[ "major", "member" ]
Please list the full names of the students in the Student_Club that come from the Art and Design Department.
SELECT T1.first_name, T1.last_name FROM member AS T1 INNER JOIN major AS T2 ON T1.link_to_major = T2.major_id WHERE T2.department = 'Art and Design Department'
simple
full name refers to first_name, last_name;
1,315
student_club
[ "attendance", "event" ]
How many students of the Student_Club have attended the event "Women's Soccer"?
SELECT COUNT(T1.event_id) FROM event AS T1 INNER JOIN attendance AS T2 ON T1.event_id = T2.link_to_event WHERE T1.event_name = 'Women''s Soccer'
simple
Women's Soccer is an event name
1,316
student_club
[ "member", "attendance", "event" ]
Please list the phone numbers of the students from the Student_Club that has attended the event "Women's Soccer".
SELECT T3.phone FROM event AS T1 INNER JOIN attendance AS T2 ON T1.event_id = T2.link_to_event INNER JOIN member AS T3 ON T2.link_to_member = T3.member_id WHERE T1.event_name = 'Women''s Soccer'
moderate
Women's Soccer is an event name; phone numbers refers to phone
1,317
student_club
[ "member", "attendance", "event" ]
Among the students from the Student_Club who attended the event "Women's Soccer", how many of them want a T-shirt that's in medium size?
SELECT COUNT(T1.event_id) FROM event AS T1 INNER JOIN attendance AS T2 ON T1.event_id = T2.link_to_event INNER JOIN member AS T3 ON T2.link_to_member = T3.member_id WHERE T1.event_name = 'Women''s Soccer' AND T3.t_shirt_size = 'Medium'
moderate
Women's Soccer is an event name; T-shirt that is in medium size refers to t_shirt_size = 'Medium'
1,318
student_club
[ "attendance", "event" ]
What is the event that has the highest attendance of the students from the Student_Club?
SELECT T1.event_name FROM event AS T1 INNER JOIN attendance AS T2 ON T1.event_id = T2.link_to_event GROUP BY T1.event_name ORDER BY COUNT(T2.link_to_event) DESC LIMIT 1
simple
event with highest attendance refers to MAX(COUNT(link_to_event))
1,319
student_club
[ "major", "member" ]
Which college is the vice president of the Student_Club from?
SELECT T2.college FROM member AS T1 INNER JOIN major AS T2 ON T1.link_to_major = T2.major_id WHERE T1.position LIKE 'vice president'
simple
Vice President is a position of the Student Club
1,320
student_club
[ "member", "attendance", "event" ]
Please list the event names of all the events attended by Maya Mclean.
SELECT T1.event_name FROM event AS T1 INNER JOIN attendance AS T2 ON T1.event_id = T2.link_to_event INNER JOIN member AS T3 ON T2.link_to_member = T3.member_id WHERE T3.first_name = 'Maya' AND T3.last_name = 'Mclean'
simple
1,321
student_club
[ "member", "attendance", "event" ]
How many events of the Student_Club did Sacha Harrison attend in 2019?
SELECT COUNT(T1.event_id) FROM event AS T1 INNER JOIN attendance AS T2 ON T1.event_id = T2.link_to_event INNER JOIN member AS T3 ON T2.link_to_member = T3.member_id WHERE T3.first_name = 'Sacha' AND T3.last_name = 'Harrison' AND SUBSTR(T1.event_date, 1, 4) = '2019'
moderate
events attended in 2019 refers to YEAR(event_date) = 2019
1,322
student_club
[ "attendance", "event" ]
Among the events attended by more than 10 members of the Student_Club, how many of them are meetings?
SELECT COUNT(T1.event_id) FROM event AS T1 INNER JOIN attendance AS T2 ON T1.event_id = T2.link_to_event WHERE T1.type = 'Meeting' GROUP BY T1.type HAVING COUNT(T2.link_to_event) > 10
moderate
meetings events refers to type = 'Meeting'; attended by more than 10 members refers to COUNT(event_id) > 10
1,323
student_club
[ "attendance", "event" ]
Please list the names of all the events of the Student_Club that had an attendance of over 20 students.
SELECT T1.event_name FROM event AS T1 INNER JOIN attendance AS T2 ON T1.event_id = T2.link_to_event GROUP BY T1.event_id HAVING COUNT(T2.link_to_event) > 20
moderate
name of events refers to event_name; attendance of over 20 students COUNT(event_id) > 20
1,324
student_club
[ "attendance", "event" ]
What is the average attendance of meetings in 2020?
SELECT CAST(COUNT(T2.link_to_event) AS REAL) / COUNT(DISTINCT T2.link_to_event) FROM event AS T1 INNER JOIN attendance AS T2 ON T1.event_id = T2.link_to_event WHERE SUBSTR(T1.event_date, 1, 4) = '2020' AND T1.type = 'Meeting'
moderate
meetings in 2020 refers to type = 'Meeting' where YEAR(event_date) = 2020; average = DIVIDE(COUNT(event_id), COUNT(DISTINCT event_name))
1,325
student_club
[ "expense" ]
What is the most expensive item that was spent in support of club events?
SELECT expense_description FROM expense ORDER BY cost DESC LIMIT 1
simple
item in support of club events refers to expense_description; most expensive refers to MAX(cost)
1,326
student_club
[ "major", "member" ]
How many members of the Student_Club have majored Environmental Engineering?
SELECT COUNT(T1.member_id) FROM member AS T1 INNER JOIN major AS T2 ON T1.link_to_major = T2.major_id WHERE T2.major_name = 'Environmental Engineering'
simple
'Environmental Engineering' is the major name
1,327
student_club
[ "attendance", "member", "event" ]
List the full name of all the members of the Student_Club who attended the "Laugh Out Loud" event.
SELECT T1.first_name, T1.last_name FROM member AS T1 INNER JOIN attendance AS T2 ON T1.member_id = T2.link_to_member INNER JOIN event AS T3 ON T2.link_to_event = T3.event_id WHERE T3.event_name = 'Laugh Out Loud'
moderate
full name of members refers to first_name, last_name; 'Laugh Out Loud' is an event name;
1,328
student_club
[ "major", "member" ]
List the last name of all the students who majored Law and Constitutional Studies.
SELECT T1.last_name FROM member AS T1 INNER JOIN major AS T2 ON T1.link_to_major = T2.major_id WHERE T2.major_name = 'Law and Constitutional Studies'
simple
'Law and Constitutional Studies' is the major name
1,329
student_club
[ "zip_code", "member" ]
What county did Sherri Ramsey grew up?
SELECT T2.county FROM member AS T1 INNER JOIN zip_code AS T2 ON T1.zip = T2.zip_code WHERE T1.first_name = 'Sherri' AND T1.last_name = 'Ramsey'
simple
1,330
student_club
[ "major", "member" ]
What college offers the major that Tyler Hewitt took?
SELECT T2.college FROM member AS T1 INNER JOIN major AS T2 ON T1.link_to_major = T2.major_id WHERE T1.first_name = 'Tyler' AND T1.last_name = 'Hewitt'
simple
1,331
student_club
[ "member", "income" ]
What is the amount of the funds that the Vice President received?
SELECT T2.amount FROM member AS T1 INNER JOIN income AS T2 ON T1.member_id = T2.link_to_member WHERE T1.position = 'Vice President'
simple
'Vice President' is a position of Student Club; funds received refers to amount;
1,332
student_club
[ "event", "budget" ]
How much did the Student_Club members spend on food in September Meeting?
SELECT T2.spent FROM event AS T1 INNER JOIN budget AS T2 ON T1.event_id = T2.link_to_event WHERE T1.event_name = 'September Meeting' AND T2.category = 'Food' AND SUBSTR(T1.event_date, 6, 2) = '09'
moderate
amount spent refers to spent; spend on food in September Meeting refers to category = 'Food' where event_name = 'September Meeting'
1,333
student_club
[ "zip_code", "member" ]
What city and state did the President of the Student_Club grow up?
SELECT T2.city, T2.state FROM member AS T1 INNER JOIN zip_code AS T2 ON T1.zip = T2.zip_code WHERE T1.position = 'President'
simple
'President' is a position of Student Club;
1,334
student_club
[ "zip_code", "member" ]
List the full name of the Student_Club members that grew up in Illinois state.
SELECT T1.first_name, T1.last_name FROM member AS T1 INNER JOIN zip_code AS T2 ON T1.zip = T2.zip_code WHERE T2.state = 'Illinois'
simple
full name of member refers to first_name, last_name
1,335
student_club
[ "event", "budget" ]
How much did the Student_Club members spend on advertisement in September Meeting?
SELECT T2.spent FROM event AS T1 INNER JOIN budget AS T2 ON T1.event_id = T2.link_to_event WHERE T1.event_name = 'September Meeting' AND T2.category = 'Advertisement' AND SUBSTR(T1.event_date, 6, 2) = '09'
moderate
amount spent refers to spent; spend on food in September Meeting refers to category = 'Advertisement' where event_name = 'September Meeting'
1,336
student_club
[ "major", "member" ]
What department offers the major that Pierce and Guidi took?
SELECT T2.department FROM member AS T1 INNER JOIN major AS T2 ON T1.link_to_major = T2.major_id WHERE T1.last_name = 'Pierce' OR T1.last_name = 'Guidi'
simple
1,337
student_club
[ "event", "budget" ]
What is the total budgeted amount for all category in "October Speaker" event?
SELECT SUM(T2.amount) FROM event AS T1 INNER JOIN budget AS T2 ON T1.event_id = T2.link_to_event WHERE T1.event_name = 'October Speaker'
simple
total budgeted amount refers to SUM(amount) where event_name = 'October Speaker'
1,338
student_club
[ "event", "budget", "expense" ]
Was each expense in October Meeting on October 8, 2019 approved?
SELECT T3.approved FROM event AS T1 INNER JOIN budget AS T2 ON T1.event_id = T2.link_to_event INNER JOIN expense AS T3 ON T2.budget_id = T3.link_to_budget WHERE T1.event_name = 'October Meeting' AND T1.event_date LIKE '2019-10-08%'
moderate
event_name = 'October Meeting' where event_date = '2019-10-08'; approved = True means expenses was approved; approved = False means expenses was not approved
1,339
student_club
[ "member", "expense" ]
Calculate the total average cost that Elijah Allen spent in the events on September and October.
SELECT AVG(T2.cost) FROM member AS T1 INNER JOIN expense AS T2 ON T1.member_id = T2.link_to_member WHERE T1.last_name = 'Allen' AND T1.first_name = 'Elijah' AND (SUBSTR(T2.expense_date, 6, 2) = '09' OR SUBSTR(T2.expense_date, 6, 2) = '10')
challenging
events in September and October refers to month(expense_date) = 9 AND MONTH(expense_date) = 10
1,340
student_club
[ "event", "budget" ]
Calculate the difference of the total amount spent in all events by the Student_Club in year 2019 and 2020.
SELECT SUM(CASE WHEN SUBSTR(T1.event_date, 1, 4) = '2019' THEN T2.spent ELSE 0 END) - SUM(CASE WHEN SUBSTR(T1.event_date, 1, 4) = '2020' THEN T2.spent ELSE 0 END) AS num FROM event AS T1 INNER JOIN budget AS T2 ON T1.event_id = T2.link_to_event
moderate
SUBTRACT(spent where YEAR(event_date) = 2019, spent where YEAR(event_date) = 2020)
1,341
student_club
[ "event" ]
Give the location for "Spring Budget Review".
SELECT location FROM event WHERE event_name = 'Spring Budget Review'
simple
'Spring Budget Review' is an event name;
1,342
student_club
[ "expense" ]
What was the cost for the "Posters" on 2019/9/4?
SELECT cost FROM expense WHERE expense_description = 'Posters' AND expense_date = '2019-09-04'
simple
'Poster' is an event description; on 2019/9/14 refers to event_date = '2019-09-04'
1,343
student_club
[ "budget" ]
With the biggest budget for the "Food", what was the remaining of it?
SELECT remaining FROM budget WHERE category = 'Food' AND amount = ( SELECT MAX(amount) FROM budget WHERE category = 'Food' )
simple
remaining of budget refers to remaining, biggest budget for 'Food' refers to MAX(budget.amount) where category = 'Food'
1,344
student_club
[ "income" ]
What was the notes of the fundraising on 2019/9/14?
SELECT notes FROM income WHERE source = 'Fundraising' AND date_received = '2019-09-14'
simple
fundraising on 2019/9/14 refers to source = 'Fundraising' where date_received = '2019-09-14'
1,345
student_club
[ "major" ]
How many majors are there in "College of Humanities and Social Sciences"?
SELECT COUNT(major_name) FROM major WHERE college = 'College of Humanities and Social Sciences'
simple
1,346
student_club
[ "member" ]
Tell the phone number of "Carlo Jacobs".
SELECT phone FROM member WHERE first_name = 'Carlo' AND last_name = 'Jacobs'
simple
1,347
student_club
[ "zip_code", "member" ]
Tell the hometown county for "Adela O'Gallagher".
SELECT T2.county FROM member AS T1 INNER JOIN zip_code AS T2 ON T1.zip = T2.zip_code WHERE T1.first_name = 'Adela' AND T1.last_name = 'O''Gallagher'
simple
hometown county refers to county
1,348
student_club
[ "event", "budget" ]
For all the budgets for "November Meeting", how many of them had exceeded the budget?
SELECT COUNT(T2.event_id) FROM budget AS T1 INNER JOIN event AS T2 ON T1.link_to_event = T2.event_id WHERE T2.event_name = 'November Meeting' AND T1.remaining < 0
simple
'November Meeting' is an event name; remaining < 0 means the cost had exceeded the budget
1,349
student_club
[ "event", "budget" ]
Provide the total number of the budget amount for "September Speaker" event.
SELECT SUM(T1.amount) FROM budget AS T1 INNER JOIN event AS T2 ON T1.link_to_event = T2.event_id WHERE T2.event_name = 'September Speaker'
simple
'September Speaker' is an event name; total number of budget amount refers to SUM(amount)
1,350
student_club
[ "budget", "expense" ]
What is the status of the event which bought "Post Cards, Posters" on 2019/8/20?
SELECT T1.event_status FROM budget AS T1 INNER JOIN expense AS T2 ON T1.budget_id = T2.link_to_budget WHERE T2.expense_description = 'Post Cards, Posters' AND T2.expense_date = '2019-08-20'
moderate
'Post Cards, Posters' is an expense description; on 2019/8/20 refers to expense_date = '2019-8-20'; status of event refers to event_status
1,351
student_club
[ "major", "member" ]
What was Brent Thomason's major?
SELECT T2.major_name FROM member AS T1 INNER JOIN major AS T2 ON T1.link_to_major = T2.major_id WHERE T1.first_name = 'Brent' AND T1.last_name = 'Thomason'
simple
major refers to major_name
1,352
student_club
[ "major", "member" ]
For all the club members from "Human Development and Family Studies" major, how many of them wear large size t-shirt?
SELECT COUNT(T1.member_id) FROM member AS T1 INNER JOIN major AS T2 ON T1.link_to_major = T2.major_id WHERE T2.major_name = 'Human Development AND Family Studies' AND T1.t_shirt_size = 'Large'
moderate
'Human Development and Family Studies' is a major name; wear large size t-shirt refers to t_shirt_size = 'Large'
1,353
student_club
[ "zip_code", "member" ]
What's Christof Nielson's zip code type?
SELECT T2.type FROM member AS T1 INNER JOIN zip_code AS T2 ON T1.zip = T2.zip_code WHERE T1.first_name = 'Christof' AND T1.last_name = 'Nielson'
simple
1,354
student_club
[ "major", "member" ]
State the major name for the Vice President of the club.
SELECT T2.major_name FROM member AS T1 INNER JOIN major AS T2 ON T1.link_to_major = T2.major_id WHERE T1.position = 'Vice President'
simple
'Vice President' is a position of Student Club
1,355
student_club
[ "zip_code", "member" ]
Where is the hometown state for "Sacha Harrison"?
SELECT T2.state FROM member AS T1 INNER JOIN zip_code AS T2 ON T1.zip = T2.zip_code WHERE T1.first_name = 'Sacha' AND T1.last_name = 'Harrison'
simple
hometown state refers to state;
1,356
student_club
[ "major", "member" ]
Which department was the President of the club in?
SELECT T2.department FROM member AS T1 INNER JOIN major AS T2 ON T1.link_to_major = T2.major_id WHERE T1.position = 'President'
simple
'President' is a position of Student Club
1,357
student_club
[ "member", "income" ]
State the date Connor Hilton paid his/her dues.
SELECT T2.date_received FROM member AS T1 INNER JOIN income AS T2 ON T1.member_id = T2.link_to_member WHERE T1.first_name = 'Connor' AND T1.last_name = 'Hilton' AND T2.source = 'Dues'
simple
date the dues was paid refers to received_date where source = 'Dues'
1,358
student_club
[ "member", "income" ]
Who was the first one paid his/her dues? Tell the full name.
SELECT T1.first_name, T1.last_name FROM member AS T1 INNER JOIN income AS T2 ON T1.member_id = T2.link_to_member WHERE T2.source = 'Dues' ORDER BY T2.date_received LIMIT 1
simple
full name refers to first_name, last_name; first paid dues refers to MIN(received_date) where source = 'Dues'
1,359
student_club
[ "event", "budget" ]
How many times was the budget in Advertisement for "Yearly Kickoff" meeting more than "October Meeting"?
SELECT CAST(SUM(CASE WHEN T2.event_name = 'Yearly Kickoff' THEN T1.amount ELSE 0 END) AS REAL) / SUM(CASE WHEN T2.event_name = 'October Meeting' THEN T1.amount ELSE 0 END) FROM budget AS T1 INNER JOIN event AS T2 ON T1.link_to_event = T2.event_id WHERE T1.category = 'Advertisement' AND T2.type = 'Meeting'
challenging
DIVIDE(SUM(amount where category = 'Advertisement' and event_name = 'Yearly Kickoff'), SUM(amount event_name = 'October Meeting' and category = 'Advertisement'))
1,360
student_club
[ "event", "budget" ]
What percentage was the budget for Parking to the total budget for the "November Speaker"?
SELECT CAST(SUM(CASE WHEN T1.category = 'Parking' THEN T1.amount ELSE 0 END) AS REAL) * 100 / SUM(T1.amount) FROM budget AS T1 INNER JOIN event AS T2 ON T1.link_to_event = T2.event_id WHERE T2.event_name = 'November Speaker'
moderate
DIVDE(SUM( amount where category = 'Parking' and event_name = 'November Speaker'), COUNT(event_name = 'November Speaker)) * 100
1,361
student_club
[ "expense" ]
What is the total cost of the pizzas for all the events?
SELECT SUM(cost) FROM expense WHERE expense_description = 'Pizza'
simple
total cost of the pizzas refers to SUM(cost) where expense_description = 'Pizza'
1,362
student_club
[ "zip_code" ]
How many cities are there in Orange County, Virginia?
SELECT COUNT(city) FROM zip_code WHERE county = 'Orange County' AND state = 'Virginia'
simple
Orange County is the county, Virginia is the state
1,363
student_club
[ "major" ]
List all of the College of Humanities and Social Sciences' departments.
SELECT department FROM major WHERE college = 'College of Humanities and Social Sciences'
simple
1,364
student_club
[ "zip_code", "member" ]
Where is Amy Firth's hometown?
SELECT T2.city, T2.county, T2.state FROM member AS T1 INNER JOIN zip_code AS T2 ON T1.zip = T2.zip_code WHERE T1.first_name = 'Amy' AND T1.last_name = 'Firth'
simple
hometown refers to city, county, state
1,365
student_club
[ "budget", "expense" ]
What are the expenses of the budget with the lowest remaining?
SELECT T2.expense_description FROM budget AS T1 INNER JOIN expense AS T2 ON T1.budget_id = T2.link_to_budget ORDER BY T1.remaining LIMIT 1
simple
expense of budget refers to expense_description; lowest remaining refers to MIN(remaining)
1,366
student_club
[ "member", "attendance", "event" ]
List all the members who attended the event "October Meeting".
SELECT DISTINCT T3.member_id FROM event AS T1 INNER JOIN attendance AS T2 ON T1.event_id = T2.link_to_event INNER JOIN member AS T3 ON T2.link_to_member = T3.member_id WHERE T1.event_name = 'October Meeting'
simple
'October Meeting' is an event name;
1,367
student_club
[ "major", "member" ]
Which college do most of the members go to?
SELECT T2.college FROM member AS T1 INNER JOIN major AS T2 ON T1.link_to_major = T2.major_id GROUP BY T2.major_id ORDER BY COUNT(T2.college) DESC LIMIT 1
simple
college most members go refers to MAX(COUNT(major.college))
1,368
student_club
[ "major", "member" ]
What does the person with the phone number "809-555-3360" major in?
SELECT T2.major_name FROM member AS T1 INNER JOIN major AS T2 ON T1.link_to_major = T2.major_id WHERE T1.phone = '809-555-3360'
simple
major in refers to major_name
1,369
student_club
[ "event", "budget" ]
Which event has the highest budget amount?
SELECT T2.event_name FROM budget AS T1 INNER JOIN event AS T2 ON T1.link_to_event = T2.event_id ORDER BY T1.amount DESC LIMIT 1
simple
event refers to event_name; highest budget amount refers to MAX(amount)
1,370
student_club
[ "member", "expense" ]
List all the expenses incurred by the vice president.
SELECT T2.expense_id, T2.expense_description FROM member AS T1 INNER JOIN expense AS T2 ON T1.member_id = T2.link_to_member WHERE T1.position = 'Vice President'
simple
expense refers to expense_description; 'Vice President' is a position of the Student Club
1,371
student_club
[ "attendance", "event" ]
How many members attended the "Women's Soccer" event?
SELECT COUNT(T2.link_to_member) FROM event AS T1 INNER JOIN attendance AS T2 ON T1.event_id = T2.link_to_event WHERE T1.event_name = 'Women''s Soccer'
simple
'Women's Soccer' is the event name;
1,372
student_club
[ "member", "income" ]
When did the member, Casey Mason, received the income?
SELECT T2.date_received FROM member AS T1 INNER JOIN income AS T2 ON T1.member_id = T2.link_to_member WHERE T1.first_name = 'Casey' AND T1.last_name = 'Mason'
simple
when the income was received refers to date_received
1,373
student_club
[ "zip_code", "member" ]
How many of the members' hometowns are from Maryland state?
SELECT COUNT(T2.member_id) FROM zip_code AS T1 INNER JOIN member AS T2 ON T1.zip_code = T2.zip WHERE T1.state = 'Maryland'
simple
1,374
student_club
[ "attendance", "member" ]
How many events did the member with the phone number "954-555-6240" attend?
SELECT COUNT(T2.link_to_event) FROM member AS T1 INNER JOIN attendance AS T2 ON T1.member_id = T2.link_to_member WHERE T1.phone = '954-555-6240'
simple
1,375
student_club
[ "major", "member" ]
List all the members of the "School of Applied Sciences, Technology and Education" department.
SELECT T1.first_name, T1.last_name FROM member AS T1 INNER JOIN major AS T2 ON T1.link_to_major = T2.major_id WHERE T2.department = 'School of Applied Sciences, Technology and Education'
moderate
list all members means to list all the full name; full name refers to first_name, last_name;
1,376
student_club
[ "event", "budget" ]
Among all the closed events, which event has the highest spend-to-budget ratio?
SELECT T2.event_name FROM budget AS T1 INNER JOIN event AS T2 ON T1.link_to_event = T2.event_id WHERE T2.status = 'Closed' ORDER BY T1.spent / T1.amount DESC LIMIT 1
moderate
closed events refers to event_name where status = 'Closed'; highest spend-to budget ratio refers to MAX(DIVIDE(spent, amount))
1,377
student_club
[ "member" ]
How many student have the position of president?
SELECT COUNT(member_id) FROM member WHERE position = 'President'
simple
'President' is a position of Student Club
1,378
student_club
[ "budget" ]
What is the highest amount of budget spend for an event?
SELECT MAX(spent) FROM budget
simple
highest amount of budget spend refers to MAX(spent)
1,379
student_club
[ "event" ]
How many meeting events were held in 2020?
SELECT COUNT(event_id) FROM event WHERE type = 'Meeting' AND SUBSTR(event_date, 1, 4) = '2020'
simple
meeting events refers to type = 'Meeting'; held in 2020 refers to YEAR(event_date) = 2020
1,380
student_club
[ "budget" ]
What is the total amount of money spent for food?
SELECT SUM(spent) FROM budget WHERE category = 'Food'
simple
total amount of money spent refers to SUM(spent); spent for food refers to category = 'Food'
1,381
student_club
[ "attendance", "member" ]
List the name of students that have attended more than 7 events.
SELECT T1.first_name, T1.last_name FROM member AS T1 INNER JOIN attendance AS T2 ON T1.member_id = T2.link_to_member GROUP BY T2.link_to_member HAVING COUNT(T2.link_to_event) > 7
moderate
name of students means the full name; full name refers to first_name, last_name; attended more than 7 events refers to COUNT(link_to_event) > 7
1,382
student_club
[ "major", "attendance", "member", "event" ]
Among the students majored in interior design, who have attended the Community Theater event?
SELECT T2.first_name, T2.last_name FROM major AS T1 INNER JOIN member AS T2 ON T1.major_id = T2.link_to_major INNER JOIN attendance AS T3 ON T2.member_id = T3.link_to_member INNER JOIN event AS T4 ON T3.link_to_event = T4.event_id WHERE T4.event_name = 'Community Theater' AND T1.major_name = 'Interior Design'
moderate
majored in music refers to major_name = 'Interior Design'; 'Community Theater' is the event name;
1,383
student_club
[ "zip_code", "member" ]
State the name of students from Georgetown, South Carolina.
SELECT T1.first_name, T1.last_name FROM member AS T1 INNER JOIN zip_code AS T2 ON T1.zip = T2.zip_code WHERE T2.city = 'Georgetown' AND T2.state = 'South Carolina'
simple
name of students means the full name; full name refers to first_name, last_name; Georgetown is a city; South Carolina is a state
1,384
student_club
[ "member", "income" ]
How many income generated by Grant Gilmour?
SELECT T2.amount FROM member AS T1 INNER JOIN income AS T2 ON T1.member_id = T2.link_to_member WHERE T1.first_name = 'Grant' AND T1.last_name = 'Gilmour'
simple
income generated refers to income.amount
1,385
student_club
[ "member", "income" ]
Which student was able to generate income more than $40?
SELECT T1.first_name, T1.last_name FROM member AS T1 INNER JOIN income AS T2 ON T1.member_id = T2.link_to_member WHERE T2.amount > 40
simple
name of students means the full name; full name refers to first_name, last_name; generate income more than $50 refers to income.amount > 40
1,386
student_club
[ "event", "budget", "expense" ]
What is the total expense for the Yearly Kickoff?
SELECT SUM(T3.cost) FROM event AS T1 INNER JOIN budget AS T2 ON T1.event_id = T2.link_to_event INNER JOIN expense AS T3 ON T2.budget_id = T3.link_to_budget WHERE T1.event_name = 'Yearly Kickoff'
simple
'Baseball game' is an event name; total expense refers to SUM(cost)
1,387
student_club
[ "member", "event", "budget", "expense" ]
Which student has been entrusted to manage the budget for the Yearly Kickoff?
SELECT T4.first_name, T4.last_name FROM event AS T1 INNER JOIN budget AS T2 ON T1.event_id = T2.link_to_event INNER JOIN expense AS T3 ON T2.budget_id = T3.link_to_budget INNER JOIN member AS T4 ON T3.link_to_member = T4.member_id WHERE T1.event_name = 'Yearly Kickoff'
moderate
'Yearly Kickoff' is an event name;
1,388
student_club
[ "member", "income" ]
Which students manage to generate the highest income. State his/her full name along with the income source.
SELECT T1.first_name, T1.last_name, T2.source FROM member AS T1 INNER JOIN income AS T2 ON T1.member_id = T2.link_to_member GROUP BY T1.first_name, T1.last_name, T2.source ORDER BY SUM(T2.amount) DESC LIMIT 1
moderate
name of students means the full name; full name refers to first_name, last_name; generate the highest income refers to MAX(income.amount);
1,389
student_club
[ "event", "budget", "expense" ]
Which event has the lowest cost?
SELECT T1.event_name FROM event AS T1 INNER JOIN budget AS T2 ON T1.event_id = T2.link_to_event INNER JOIN expense AS T3 ON T2.budget_id = T3.link_to_budget ORDER BY T3.cost LIMIT 1
simple
event refers to event_name where MIN(cost)
1,390
student_club
[ "event", "budget", "expense" ]
Based on the total cost for all event, what is the percentage of cost for Yearly Kickoff event?
SELECT CAST(SUM(CASE WHEN T1.event_name = 'Yearly Kickoff' THEN T3.cost ELSE 0 END) AS REAL) * 100 / SUM(T3.cost) FROM event AS T1 INNER JOIN budget AS T2 ON T1.event_id = T2.link_to_event INNER JOIN expense AS T3 ON T2.budget_id = T3.link_to_budget
moderate
DIVIDE(SUM(cost where event_name = 'Yearly Kickoff'), SUM(cost)) * 100
1,391
student_club
[ "major" ]
What is the ratio between students majored in finance and physics?
SELECT SUM(CASE WHEN major_name = 'Finance' THEN 1 ELSE 0 END) / SUM(CASE WHEN major_name = 'Physics' THEN 1 ELSE 0 END) AS ratio FROM major
simple
DIVDE(SUM(major_name = 'Finance'), SUM(major_name = 'Physics'))
1,392
student_club
[ "income" ]
Indicate the top source of funds received in September 2019 based on their amount.
SELECT source FROM income WHERE date_received BETWEEN '2019-09-01' and '2019-09-30' ORDER BY source DESC LIMIT 1
simple
top source funds refers to MAX(source) where date_received BETWEEN '2019-09-01' and '2019-09-30'
1,393
student_club
[ "member" ]
Provide the full name and email address of the Student_Club's Secretary.
SELECT first_name, last_name, email FROM member WHERE position = 'Secretary'
simple
full name refers to first_name, last_name; 'Secretary' is a position of Student Club
1,394
student_club
[ "major", "member" ]
How many members of the Student_Club have major in 'Physics Teaching'?
SELECT COUNT(T2.member_id) FROM major AS T1 INNER JOIN member AS T2 ON T1.major_id = T2.link_to_major WHERE T1.major_name = 'Physics Teaching'
simple
'Physics Teaching' is the major name;
1,395
student_club
[ "attendance", "event" ]
How many members did attend the event 'Community Theater' in 2019?
SELECT COUNT(T2.link_to_member) FROM event AS T1 INNER JOIN attendance AS T2 ON T1.event_id = T2.link_to_event WHERE T1.event_name = 'Community Theater' AND SUBSTR(T1.event_date, 1, 4) = '2019'
moderate
event 'Community Theater' in 2019 refers to event_name = 'Community Theater' where YEAR(event_date) = 2019
1,396
student_club
[ "major", "attendance", "member" ]
Provide the number of events attended by Luisa Guidi. What is her major?
SELECT COUNT(T3.link_to_event), T1.major_name FROM major AS T1 INNER JOIN member AS T2 ON T1.major_id = T2.link_to_major INNER JOIN attendance AS T3 ON T2.member_id = T3.link_to_member WHERE T2.first_name = 'Luisa' AND T2.last_name = 'Guidi'
simple
major refers to major_name;
1,397
student_club
[ "budget" ]
On average, how much did the Student_Club spend on food for the typical event in the past?
SELECT SUM(spent) / COUNT(spent) FROM budget WHERE category = 'Food' AND event_status = 'Closed'
simple
DIVIDE(SUM(spent), COUNT(spent)) where category = 'Food'; 'event in the past' means event_status = 'Closed'
1,398
student_club
[ "event", "budget" ]
Name the event with the highest amount spent on advertisement.
SELECT T2.event_name FROM budget AS T1 INNER JOIN event AS T2 ON T1.link_to_event = T2.event_id WHERE T1.category = 'Advertisement' ORDER BY T1.spent DESC LIMIT 1
moderate
event refers to event_name; highest amount spent on advertisement refers to MAX(spent) where category = 'Advertisement'
1,399
student_club
[ "attendance", "member", "event" ]
Did Maya Mclean attend the 'Women's Soccer' event?
SELECT CASE WHEN T3.event_name = 'Women''s Soccer' THEN 'YES' END AS result FROM member AS T1 INNER JOIN attendance AS T2 ON T1.member_id = T2.link_to_member INNER JOIN event AS T3 ON T2.link_to_event = T3.event_id WHERE T1.first_name = 'Maya' AND T1.last_name = 'Mclean'
moderate
'Women's Soccer' is an event name