question_id
stringlengths 1
4
| db_id
stringclasses 11
values | question
stringlengths 23
286
| evidence
stringlengths 0
591
| sql
stringlengths 29
1.45k
| difficulty
stringclasses 3
values |
---|---|---|---|---|---|
1300 | thrombosis_prediction | What is the disease name of the patient who has the highest level of triglyceride within the normal range? | disease name referse to Diagnosis; highest level of triglyceride within the normal range refers to MAX(TG < 200); | 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 |
1301 | thrombosis_prediction | Please list the IDs of the patients with no thrombosis and an abnormal level of creatinine phosphokinase. | no thrombosis refers to Thrombosis = 0 ; abnormal level of creatinine phosphokinase refers to CPK < 250; | 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 |
1302 | thrombosis_prediction | For the patients with a normal range of creatinine phosphokinase, how many of them have a positive measure of degree of coagulation? | normal range of creatinine phosphokinase refers to CPK < 250; positive measure of degree of coagulation refers to KCT = '+' or RVVT = '+' or LAC = '+' ; | 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 |
1303 | thrombosis_prediction | When is the birthday of the oldest patient whose blood glucose is abnormal? | oldest patient refers to MIN(Birthday); blood glucose is abnormal refers to GLU > 180; | 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 |
1304 | thrombosis_prediction | Among the patients with a normal blood glucose, how many of them don't have thrombosis? | normal blood glucose refers to GLU < 180; don't have thrombosis refers to Thrombosis = 0; | 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 |
1305 | thrombosis_prediction | How many patients accepted to the hospital have a normal level of white blood cells? | accepted to the hospital refers to Admission = '+'; normal level of white blood cells refers to WBC between 3.5 and 9.0; | 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 |
1306 | thrombosis_prediction | How many patients diagnosed with SLE have a normal white blood cell level? | diagnosed with SLE refers to Diagnosis = 'SLE'; normal white blood cell level refers to WBC between 3.5 and 9.0; | 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 |
1307 | thrombosis_prediction | 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. | 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 = '-'; | 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 |
1308 | thrombosis_prediction | Among the patients who have a normal platelet level, how many of them have other symptoms observed? | normal platelet level refers to PLT > 100 and PLT < 400; have other symptoms refers to Diagnosis is not null; | SELECT COUNT(T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.PLT > 100 AND T2.PLT < 400 AND T1.Diagnosis IS NOT NULL | moderate |
1309 | thrombosis_prediction | Please list a patient's platelet level if it is within the normal range and if he or she is diagnosed with MCTD. | 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'; | 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 |
1310 | thrombosis_prediction | For the male patients that have a normal prothrombin time, what is their average prothrombin time? | male refers to Sex = 'M'; normal prothrombin time refer to PT < 14; average prothrombin time = AVG(PT); | 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 |
1311 | thrombosis_prediction | How many patients with severe thrombosis have a normal prothrombin time? | severe thrombosis refers to Thrombosis = 2 or 1; normal prothrombin time refers to PT < 14; | 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 |
1312 | student_club | What's Angela Sanders's major? | Angela Sanders is the full name; full name refers to first_name, last_name; major refers to major_name. | 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 |
1313 | student_club | 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 |
|
1314 | student_club | Please list the full names of the students in the Student_Club that come from the Art and Design Department. | full name refers to first_name, last_name; | 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 |
1315 | student_club | How many students of the Student_Club have attended the event "Women's Soccer"? | Women's Soccer is an event name | 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 |
1316 | student_club | Please list the phone numbers of the students from the Student_Club that has attended the event "Women's Soccer". | Women's Soccer is an event name; phone numbers refers to phone | 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 |
1317 | student_club | 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? | Women's Soccer is an event name; T-shirt that is in medium size refers to t_shirt_size = 'Medium' | 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 |
1318 | student_club | What is the event that has the highest attendance of the students from the Student_Club? | event with highest attendance refers to MAX(COUNT(link_to_event)) | 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 |
1319 | student_club | Which college is the vice president of the Student_Club from? | Vice President is a position of the Student Club | 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 |
1320 | student_club | 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 |
|
1321 | student_club | How many events of the Student_Club did Sacha Harrison attend in 2019? | events attended in 2019 refers to YEAR(event_date) = 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 |
1322 | student_club | Among the events attended by more than 10 members of the Student_Club, how many of them are meetings? | meetings events refers to type = 'Meeting'; attended by more than 10 members refers to COUNT(event_id) > 10 | 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) > 10 EXCEPT SELECT T1.event_name FROM event AS T1 WHERE T1.type = 'Meeting' | moderate |
1323 | student_club | List all the names of events that had an attendance of over 20 students but were not fundraisers. | name of events refers to event_name; attendance of over 20 students COUNT(event_id) > 20. | 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 EXCEPT SELECT T1.event_name FROM event AS T1 WHERE T1.type = 'Fundraiser' | moderate |
1324 | student_club | What is the average attendance of meetings in 2020? | meetings in 2020 refers to type = 'Meeting' where YEAR(event_date) = 2020; average = DIVIDE(COUNT(event_id), COUNT(DISTINCT event_name)) | 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 |
1325 | student_club | What is the most expensive item that was spent in support of club events? | item in support of club events refers to expense_description; most expensive refers to MAX(cost) | SELECT expense_description FROM expense ORDER BY cost DESC LIMIT 1 | simple |
1326 | student_club | How many members of the Student_Club have majored Environmental Engineering?
| 'Environmental Engineering' is the major name | 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 |
1327 | student_club | List the full name of all the members of the Student_Club who attended the "Laugh Out Loud" event. | full name of members refers to first_name, last_name; 'Laugh Out Loud' is an event name; | 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 |
1328 | student_club | List the last name of all the students who majored Law and Constitutional Studies.
| 'Law and Constitutional Studies' is the major name | 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 |
1329 | student_club | 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 |
|
1330 | student_club | 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 |
|
1331 | student_club | What is the amount of the funds that the Vice President received? | 'Vice President' is a position of Student Club; funds received refers to amount. | 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 |
1332 | student_club | How much did the Student_Club members spend on food in September Meeting? | amount spent refers to spent; spend on food in September Meeting refers to category = 'Food' where event_name = '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 |
1333 | student_club | What city and state did the President of the Student_Club grow up? | 'President' is a position of Student Club; | 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 |
1334 | student_club | List the full name of the Student_Club members that grew up in Illinois state. | full name of member refers to first_name, last_name | 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 |
1335 | student_club | How much did the Student_Club members spend on advertisement in September Meeting? | amount spent refers to spent; spend on food in September Meeting refers to category = 'Advertisement' where event_name = '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 |
1336 | student_club | 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 |
|
1337 | student_club | What is the total budgeted amount for all category in "October Speaker" event? | total budgeted amount refers to SUM(amount) where event_name = 'October Speaker' | 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 |
1338 | student_club | Was each expense in October Meeting on October 8, 2019 approved? | event_name = 'October Meeting' where event_date = '2019-10-08'; approved = True means expenses was approved; approved = False means expenses was not 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 |
1339 | student_club | Calculate the total average cost that Elijah Allen spent in the events on September and October. | Elijah Allen is the full name; full name refers to first_name, last_name; The 5th and 6th string of the expense_date in the expense table can refer to month; events in September and October refers to month(expense_date) = 9 OR month(expense_date) = 10 | 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 |
1340 | student_club | Calculate the difference of the total amount spent in all events by the Student_Club in year 2019 and 2020. | The first 4 strings of the event_date values in the event table can represent year; The difference of the total amount spent = SUBTRACT(spent where YEAR(event_date) = 2019, spent where YEAR(event_date) = 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 |
1341 | student_club | Give the location for "Spring Budget Review". | 'Spring Budget Review' is an event name; | SELECT location FROM event WHERE event_name = 'Spring Budget Review' | simple |
1342 | student_club | What was the cost for the "Posters" on 2019/9/4? | 'Poster' is an event description; on 2019/9/14 refers to event_date = '2019-09-04' | SELECT cost FROM expense WHERE expense_description = 'Posters' AND expense_date = '2019-09-04' | simple |
1343 | student_club | With the biggest budget for the "Food", what was the remaining of it? | remaining of budget refers to remaining, biggest budget for 'Food' refers to MAX(budget.amount) where category = 'Food' | SELECT remaining FROM budget WHERE category = 'Food' AND amount = ( SELECT MAX(amount) FROM budget WHERE category = 'Food' ) | simple |
1344 | student_club | What was the notes of the fundraising on 2019/9/14? | fundraising on 2019/9/14 refers to source = 'Fundraising' where date_received = '2019-09-14' | SELECT notes FROM income WHERE source = 'Fundraising' AND date_received = '2019-09-14' | simple |
1345 | student_club | 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 |
|
1346 | student_club | Tell the phone number of "Carlo Jacobs". | Carlo Jacobs is the full name; full name refers to first_name, last_name; | SELECT phone FROM member WHERE first_name = 'Carlo' AND last_name = 'Jacobs' | simple |
1347 | student_club | Tell the hometown county for "Adela O'Gallagher". | hometown county refers to county | 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 |
1348 | student_club | For all the budgets for "November Meeting", how many of them had exceeded the budget? | 'November Meeting' is an event name; remaining < 0 means the cost 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 |
1349 | student_club | Provide the total number of the budget amount for "September Speaker" event. | 'September Speaker' is an event name; total number of budget amount refers to SUM(amount) | 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 |
1350 | student_club | What is the status of the event which bought "Post Cards, Posters" on 2019/8/20? | '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 | 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 |
1351 | student_club | What was Brent Thomason's major? | Brent Thomason is the full name; full name refers to first_name, last_name; major refers to major_name | 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 |
1352 | student_club | For all the club members from "Business" major, how many of them wear medium size t-shirt? | 'Business' is a major name; wear medium size t-shirt refers to t_shirt_size = 'Medium' | 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 = 'Business' AND T1.t_shirt_size = 'Medium' | moderate |
1353 | student_club | 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 |
|
1354 | student_club | State the major name for the Vice President of the club. | 'Vice President' is a position of Student 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 |
1355 | student_club | Where is the hometown state for "Sacha Harrison"? | hometown state refers to state; | 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 |
1356 | student_club | Which department was the President of the club in? | 'President' is a position of Student Club | 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 |
1357 | student_club | State the date Connor Hilton paid his/her dues. | Connor Hilton is the full name; full name refers to first_name, last_name; date the dues was paid refers to date_received where source = '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 |
1358 | student_club | Who was the first one paid his/her dues? Tell the full name. | full name refers to first_name, last_name; first paid dues refers to MIN(received_date) where source = 'Dues' | 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 |
1359 | student_club | How many times was the budget in Advertisement for "Yearly Kickoff" meeting more than "October Meeting"? | budget in Advertisement refer to category = 'Advertisement' in the budget table; DIVIDE(SUM(amount when event_name = 'Yearly Kickoff'), SUM(amount when event_name = '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 |
1360 | student_club | What percentage was the budget for Parking to the total budget for the "November Speaker"? | DIVDE(SUM( amount where category = 'Parking' and event_name = 'November Speaker'), COUNT(event_name = 'November Speaker)) * 100 | 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 |
1361 | student_club | What is the total cost of the pizzas for all the events? | total cost of the pizzas refers to SUM(cost) where expense_description = 'Pizza' | SELECT SUM(cost) FROM expense WHERE expense_description = 'Pizza' | simple |
1362 | student_club | How many cities are there in Orange County, Virginia? | Orange County is the county name, Virginia is the state name | SELECT COUNT(city) FROM zip_code WHERE county = 'Orange County' AND state = 'Virginia' | simple |
1363 | student_club | List all of the College of Humanities and Social Sciences' departments. | SELECT department FROM major WHERE college = 'College of Humanities and Social Sciences' | simple |
|
1364 | student_club | Where is Amy Firth's hometown? | hometown refers to city, county, state | 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 |
1365 | student_club | What are the expenses of the budget with the lowest remaining? | expense of budget refers to expense_description; lowest remaining refers to MIN(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 |
1366 | student_club | List all the members who attended the event "October Meeting". | 'October Meeting' is an event name; | 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 |
1367 | student_club | Which college do most of the members go to? | college most members go refers to MAX(COUNT(major.college)) | 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 |
1368 | student_club | What does the person with the phone number "809-555-3360" major in? | major in refers to major_name | 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 |
1369 | student_club | Which event has the highest budget amount? | event refers to event_name; highest budget amount refers to MAX(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 |
1370 | student_club | List all the expenses incurred by the vice president. | expense refers to expense_description; 'Vice President' is a position of the Student Club | 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 |
1371 | student_club | How many members attended the "Women's Soccer" event? | 'Women's Soccer' is the event name; | 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 |
1372 | student_club | When did the member, Casey Mason, received the income? | when the income was received refers to date_received | 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 |
1373 | student_club | 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 |
|
1374 | student_club | 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 |
|
1375 | student_club | List all the members of the "School of Applied Sciences, Technology and Education" department. | list all members means to list all the full name; full name refers to first_name, last_name; | 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 |
1376 | student_club | Among all the closed events, which event has the highest spend-to-budget ratio? | closed events refers to event_name where status = 'Closed'; highest spend-to budget ratio refers to MAX(DIVIDE(spent, amount)) | 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 |
1377 | student_club | How many student have the position of president? | 'President' is a position of Student Club | SELECT COUNT(member_id) FROM member WHERE position = 'President' | simple |
1378 | student_club | What is the highest amount of budget spend for an event? | highest amount of budget spend refers to MAX(spent) | SELECT MAX(spent) FROM budget | simple |
1379 | student_club | How many meeting events were held in 2020? | meeting events refers to type = 'Meeting'; held in 2020 refers to YEAR(event_date) = 2020 | SELECT COUNT(event_id) FROM event WHERE type = 'Meeting' AND SUBSTR(event_date, 1, 4) = '2020' | simple |
1380 | student_club | What is the total amount of money spent for food? | total amount of money spent refers to SUM(spent); spent for food refers to category = 'Food' | SELECT SUM(spent) FROM budget WHERE category = 'Food' | simple |
1381 | student_club | List the name of students that have attended more than 7 events. | 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 | 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 |
1382 | student_club | Among the students majored in interior design, who have attended the Community Theater event? | majored in music refers to major_name = 'Interior Design'; 'Community Theater' is the event name; | 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 |
1383 | student_club | State the name of students from Georgetown, South Carolina. | name of students means the full name; full name refers to first_name, last_name; Georgetown is a city; South Carolina is a 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.city = 'Georgetown' AND T2.state = 'South Carolina' | simple |
1384 | student_club | How many income generated by Grant Gilmour? | income generated refers to income.amount | 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 |
1385 | student_club | Which student was able to generate income more than $40? | 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 | 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 |
1386 | student_club | What is the total expense for the Yearly Kickoff? | 'Yearly Kickoff' is an event name; total expense refers to SUM(cost) | 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 |
1387 | student_club | Which student has been entrusted to manage the budget for the Yearly Kickoff? | name of students means the full name; full name refers to first_name, last_name;'Yearly Kickoff' is an event name; | 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 |
1388 | student_club | Which students manage to generate the highest income. State his/her full name along with the income source. | name of students means the full name; full name refers to first_name, last_name; generate the highest income refers to MAX(income.amount); | 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 |
1389 | student_club | Which event has the lowest cost? | event refers to event_name; lowest cost means MIN(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 |
1390 | student_club | Based on the total cost for all event, what is the percentage of cost for Yearly Kickoff event? | percentage = DIVIDE(SUM(cost where event_name = 'Yearly Kickoff'), SUM(cost)) * 100 | 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 |
1391 | student_club | What is the ratio between students majored in finance and physics? | DIVDE(SUM(major_name = 'Finance'), SUM(major_name = '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 |
1392 | student_club | Indicate the top source of funds received in September 2019 based on their amount. | top source funds refers to MAX(source); September 2019 means date_received BETWEEN '2019-09-01' and '2019-09-30' | SELECT source FROM income WHERE date_received BETWEEN '2019-09-01' and '2019-09-30' ORDER BY source DESC LIMIT 1 | simple |
1393 | student_club | Provide the full name and email address of the Student_Club's Secretary. | full name refers to first_name, last_name; 'Secretary' is a position of Student Club | SELECT first_name, last_name, email FROM member WHERE position = 'Secretary' | simple |
1394 | student_club | How many members of the Student_Club have major in 'Physics Teaching'? | 'Physics Teaching' is the major_name; | 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 |
1395 | student_club | How many members did attend the event 'Community Theater' in 2019? | event 'Community Theater' in 2019 refers to event_name = 'Community Theater' where YEAR(event_date) = 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 |
1396 | student_club | Provide the number of events attended by Luisa Guidi. What is her major? | major refers to major_name; | 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 |
1397 | student_club | On average, how much did the Student_Club spend on food for the typical event in the past? | DIVIDE(SUM(spent), COUNT(spent)) where category = 'Food'; 'event in the past' means event_status = 'Closed' | SELECT SUM(spent) / COUNT(spent) FROM budget WHERE category = 'Food' AND event_status = 'Closed' | simple |
1398 | student_club | Name the event with the highest amount spent on advertisement. | Name of event refers to event_name; highest amount spent on advertisement refers to MAX(spent) where category = '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 |
1399 | student_club | Did Maya Mclean attend the 'Women's Soccer' event? | Maya Mclean is the full name; full name refers to first_name, last_name; 'Women's Soccer' is an event_name | 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 |