question
stringlengths 23
286
| sql
stringlengths 29
1.45k
| db_id
stringclasses 11
values | prompt
stringclasses 3
values | question_id
int64 0
1.53k
| difficulty
stringclasses 3
values |
---|---|---|---|---|---|
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 | thrombosis_prediction | 1,300 | moderate |
|
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 | thrombosis_prediction | 1,301 | simple |
|
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 = '+') | thrombosis_prediction | 1,302 | challenging |
|
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 | thrombosis_prediction | 1,303 | simple |
|
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 | thrombosis_prediction | 1,304 | moderate |
|
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 = '+' | thrombosis_prediction | 1,305 | moderate |
|
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 | thrombosis_prediction | 1,306 | simple |
|
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 = '-' | thrombosis_prediction | 1,307 | challenging |
|
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 | thrombosis_prediction | 1,308 | moderate |
|
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 | thrombosis_prediction | 1,309 | moderate |
|
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' | thrombosis_prediction | 1,310 | simple |
|
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 | thrombosis_prediction | 1,311 | moderate |
|
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' | student_club | 1,312 | simple |
|
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' | student_club | 1,313 | simple |
|
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' | student_club | 1,314 | simple |
|
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' | student_club | 1,315 | simple |
|
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' | student_club | 1,316 | moderate |
|
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' | student_club | 1,317 | moderate |
|
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 | student_club | 1,318 | simple |
|
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' | student_club | 1,319 | simple |
|
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' | student_club | 1,320 | simple |
|
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' | student_club | 1,321 | moderate |
|
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 | student_club | 1,322 | moderate |
|
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 | student_club | 1,323 | moderate |
|
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' | student_club | 1,324 | moderate |
|
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 | student_club | 1,325 | simple |
|
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' | student_club | 1,326 | simple |
|
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' | student_club | 1,327 | moderate |
|
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' | student_club | 1,328 | simple |
|
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' | student_club | 1,329 | simple |
|
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' | student_club | 1,330 | simple |
|
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' | student_club | 1,331 | simple |
|
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' | student_club | 1,332 | moderate |
|
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' | student_club | 1,333 | simple |
|
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' | student_club | 1,334 | simple |
|
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' | student_club | 1,335 | moderate |
|
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' | student_club | 1,336 | simple |
|
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' | student_club | 1,337 | simple |
|
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%' | student_club | 1,338 | moderate |
|
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') | student_club | 1,339 | challenging |
|
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 | student_club | 1,340 | moderate |
|
Give the location for "Spring Budget Review". | SELECT location FROM event WHERE event_name = 'Spring Budget Review' | student_club | 1,341 | simple |
|
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' | student_club | 1,342 | simple |
|
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' ) | student_club | 1,343 | simple |
|
What was the notes of the fundraising on 2019/9/14? | SELECT notes FROM income WHERE source = 'Fundraising' AND date_received = '2019-09-14' | student_club | 1,344 | simple |
|
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' | student_club | 1,345 | simple |
|
Tell the phone number of "Carlo Jacobs". | SELECT phone FROM member WHERE first_name = 'Carlo' AND last_name = 'Jacobs' | student_club | 1,346 | simple |
|
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' | student_club | 1,347 | simple |
|
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 | student_club | 1,348 | simple |
|
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' | student_club | 1,349 | simple |
|
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' | student_club | 1,350 | moderate |
|
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' | student_club | 1,351 | simple |
|
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' | student_club | 1,352 | moderate |
|
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' | student_club | 1,353 | simple |
|
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' | student_club | 1,354 | simple |
|
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' | student_club | 1,355 | simple |
|
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' | student_club | 1,356 | simple |
|
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' | student_club | 1,357 | simple |
|
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 | student_club | 1,358 | simple |
|
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' | student_club | 1,359 | challenging |
|
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' | student_club | 1,360 | moderate |
|
What is the total cost of the pizzas for all the events? | SELECT SUM(cost) FROM expense WHERE expense_description = 'Pizza' | student_club | 1,361 | simple |
|
How many cities are there in Orange County, Virginia? | SELECT COUNT(city) FROM zip_code WHERE county = 'Orange County' AND state = 'Virginia' | student_club | 1,362 | simple |
|
List all of the College of Humanities and Social Sciences' departments. | SELECT department FROM major WHERE college = 'College of Humanities and Social Sciences' | student_club | 1,363 | simple |
|
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' | student_club | 1,364 | simple |
|
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 | student_club | 1,365 | simple |
|
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' | student_club | 1,366 | simple |
|
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 | student_club | 1,367 | simple |
|
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' | student_club | 1,368 | simple |
|
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 | student_club | 1,369 | simple |
|
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' | student_club | 1,370 | simple |
|
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' | student_club | 1,371 | simple |
|
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' | student_club | 1,372 | simple |
|
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' | student_club | 1,373 | simple |
|
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' | student_club | 1,374 | simple |
|
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' | student_club | 1,375 | moderate |
|
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 | student_club | 1,376 | moderate |
|
How many student have the position of president? | SELECT COUNT(member_id) FROM member WHERE position = 'President' | student_club | 1,377 | simple |
|
What is the highest amount of budget spend for an event? | SELECT MAX(spent) FROM budget | student_club | 1,378 | simple |
|
How many meeting events were held in 2020? | SELECT COUNT(event_id) FROM event WHERE type = 'Meeting' AND SUBSTR(event_date, 1, 4) = '2020' | student_club | 1,379 | simple |
|
What is the total amount of money spent for food? | SELECT SUM(spent) FROM budget WHERE category = 'Food' | student_club | 1,380 | simple |
|
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 | student_club | 1,381 | moderate |
|
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' | student_club | 1,382 | moderate |
|
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' | student_club | 1,383 | simple |
|
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' | student_club | 1,384 | simple |
|
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 | student_club | 1,385 | simple |
|
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' | student_club | 1,386 | simple |
|
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' | student_club | 1,387 | moderate |
|
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 | student_club | 1,388 | moderate |
|
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 | student_club | 1,389 | simple |
|
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 | student_club | 1,390 | moderate |
|
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 | student_club | 1,391 | simple |
|
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 | student_club | 1,392 | simple |
|
Provide the full name and email address of the Student_Club's Secretary. | SELECT first_name, last_name, email FROM member WHERE position = 'Secretary' | student_club | 1,393 | simple |
|
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' | student_club | 1,394 | simple |
|
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' | student_club | 1,395 | moderate |
|
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' | student_club | 1,396 | simple |
|
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' | student_club | 1,397 | simple |
|
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 | student_club | 1,398 | moderate |
|
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' | student_club | 1,399 | moderate |