db_id
stringlengths
4
31
SQL
stringlengths
18
1.45k
input_sequence
stringlengths
148
11k
question
stringlengths
16
325
student_club
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%'
Question: was each expense in october meeting on october 8, 2019 approved? | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_event, link_to_member. bu...
was each expense in october meeting on october 8, 2019 approved?
student_club
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')
Question: calculate the total average cost that elijah allen spent in the events on september and october. | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> l...
calculate the total average cost that elijah allen spent in the events on september and october.
student_club
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
Question: calculate the difference of the total amount spent in all events by the student_club in year 2019 and 2020. | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. atte...
calculate the difference of the total amount spent in all events by the student_club in year 2019 and 2020.
student_club
select location from event where event_name = 'spring budget review'
Question: give the location for 'spring budget review'. | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_event, link_to_member. budget -> budget_id, ...
give the location for 'spring budget review'.
student_club
select cost from expense where expense_description = 'posters' and expense_date = '2019-09-04'
Question: what was the cost for the 'posters' on 2019/9/4? | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_event, link_to_member. budget -> budget_i...
what was the cost for the 'posters' on 2019/9/4?
student_club
select remaining from budget where category = 'food' and amount = ( select max(amount) from budget where category = 'food' )
Question: with the biggest budget for the 'food', what was the remaining of it? | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_event, link_to_membe...
with the biggest budget for the 'food', what was the remaining of it?
student_club
select notes from income where source = 'fundraising' and date_received = '2019-09-14'
Question: what was the notes of the fundraising on 2019/9/14? | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_event, link_to_member. budget -> budge...
what was the notes of the fundraising on 2019/9/14?
student_club
select count(major_name) from major where college = 'college of humanities and social sciences'
Question: how many majors are there in 'college of humanities and social sciences'? | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_event, link_to_m...
how many majors are there in 'college of humanities and social sciences'?
student_club
select phone from member where first_name = 'carlo' and last_name = 'jacobs'
Question: tell the phone number of 'carlo jacobs'. | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_event, link_to_member. budget -> budget_id, categ...
tell the phone number of 'carlo jacobs'.
student_club
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'
Question: tell the hometown county for 'adela o'gallagher'. | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_event, link_to_member. budget -> budget_...
tell the hometown county for 'adela o'gallagher'.
student_club
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
Question: for all the budgets for 'november meeting', how many of them had exceeded the budget? | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_even...
for all the budgets for 'november meeting', how many of them had exceeded the budget?
student_club
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'
Question: provide the total number of the budget amount for 'september speaker' event. | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_event, link_t...
provide the total number of the budget amount for 'september speaker' event.
student_club
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'
Question: what is the status of the event which bought 'post cards, posters' on 2019/8/20? | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_event, li...
what is the status of the event which bought 'post cards, posters' on 2019/8/20?
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.first_name = 'brent' and t1.last_name = 'thomason'
Question: what was brent thomason's major? | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_event, link_to_member. budget -> budget_id, category, spe...
what was brent thomason's major?
student_club
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'
Question: for all the club members from 'human development and family studies' major, how many of them wear large size t-shirt? | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_s...
for all the club members from 'human development and family studies' major, how many of them wear large size t-shirt?
student_club
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'
Question: what's christof nielson's zip code type? | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_event, link_to_member. budget -> budget_id, categ...
what's christof nielson's zip code type?
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'
Question: state the major name for the vice president of the club. | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_event, link_to_member. budget -> ...
state the major name for the vice president of the club.
student_club
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'
Question: where is the hometown state for 'sacha harrison'? | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_event, link_to_member. budget -> budget_...
where is the hometown state for 'sacha harrison'?
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'
Question: which department was the president of the club in? | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_event, link_to_member. budget -> budget...
which department was the president of the club in?
student_club
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'
Question: state the date connor hilton paid his/her dues. | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_event, link_to_member. budget -> budget_id...
state the date connor hilton paid his/her dues.
student_club
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
Question: who was the first one paid his/her dues? tell the full name. | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_event, link_to_member. budget...
who was the first one paid his/her dues? tell the full name.
student_club
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'
Question: how many times was the budget in advertisement for 'yearly kickoff' meeting more than 'october meeting'? | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attenda...
how many times was the budget in advertisement for 'yearly kickoff' meeting more than 'october meeting'?
student_club
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'
Question: what percentage was the budget for parking to the total budget for the 'november speaker'? | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to...
what percentage was the budget for parking to the total budget for the 'november speaker'?
student_club
select sum(cost) from expense where expense_description = 'pizza'
Question: what is the total cost of the pizzas for all the events? | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_event, link_to_member. budget -> ...
what is the total cost of the pizzas for all the events?
student_club
select count(city) from zip_code where county = 'orange county' and state = 'virginia'
Question: how many cities are there in orange county, virginia? | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_event, link_to_member. budget -> bud...
how many cities are there in orange county, virginia?
student_club
select department from major where college = 'college of humanities and social sciences'
Question: list all of the college of humanities and social sciences' departments. | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_event, link_to_mem...
list all of the college of humanities and social sciences' departments.
student_club
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'
Question: where is amy firth's hometown? | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_event, link_to_member. budget -> budget_id, category, spent...
where is amy firth's hometown?
student_club
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
Question: what are the expenses of the budget with the lowest remaining? | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_event, link_to_member. budg...
what are the expenses of the budget with the lowest remaining?
student_club
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'
Question: list all the members who attended the event 'october meeting'. | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_event, link_to_member. budg...
list all the members who attended the event 'october meeting'.
student_club
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
Question: which college do most of the members go to? | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_event, link_to_member. budget -> budget_id, ca...
which college do most of the members go to?
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.phone = '809-555-3360'
Question: what does the person with the phone number '809-555-3360' major in? | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_event, link_to_member....
what does the person with the phone number '809-555-3360' major in?
student_club
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
Question: which event has the highest budget amount? | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_event, link_to_member. budget -> budget_id, cat...
which event has the highest budget amount?
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'
Question: list all the expenses incurred by the vice president. | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_event, link_to_member. budget -> bud...
list all the expenses incurred by the vice president.
student_club
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'
Question: how many members attended the 'women's soccer' event? | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_event, link_to_member. budget -> bud...
how many members attended the 'women's soccer' event?
student_club
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'
Question: when did the member, casey mason, received the income? | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_event, link_to_member. budget -> bu...
when did the member, casey mason, received the income?
student_club
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'
Question: how many of the members' hometowns are from maryland state? | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_event, link_to_member. budget ...
how many of the members' hometowns are from maryland state?
student_club
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'
Question: how many events did the member with the phone number '954-555-6240' attend? | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_event, link_to...
how many events did the member with the phone number '954-555-6240' attend?
student_club
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'
Question: list all the members of the 'school of applied sciences, technology and education' department. | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> lin...
list all the members of the 'school of applied sciences, technology and education' department.
student_club
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
Question: among all the closed events, which event has the highest spend-to-budget ratio? | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_event, lin...
among all the closed events, which event has the highest spend-to-budget ratio?
student_club
select count(member_id) from member where position = 'president'
Question: how many student have the position of president? | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_event, link_to_member. budget -> budget_i...
how many student have the position of president?
student_club
select max(spent) from budget
Question: what is the highest amount of budget spend for an event? | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_event, link_to_member. budget -> ...
what is the highest amount of budget spend for an event?
student_club
select count(event_id) from event where type = 'meeting' and substr(event_date, 1, 4) = '2020'
Question: how many meeting events were held in 2020? | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_event, link_to_member. budget -> budget_id, cat...
how many meeting events were held in 2020?
student_club
select sum(spent) from budget where category = 'food'
Question: what is the total amount of money spent for food? | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_event, link_to_member. budget -> budget_...
what is the total amount of money spent for food?
student_club
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
Question: list the name of students that have attended more than 7 events. | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_event, link_to_member. bu...
list the name of students that have attended more than 7 events.
student_club
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'
Question: among the students majored in interior design, who have attended the community theater event? | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link...
among the students majored in interior design, who have attended the community theater event?
student_club
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'
Question: state the name of students from georgetown, south carolina. | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_event, link_to_member. budget ...
state the name of students from georgetown, south carolina.
student_club
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'
Question: how many income generated by grant gilmour? | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_event, link_to_member. budget -> budget_id, ca...
how many income generated by grant gilmour?
student_club
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
Question: which student was able to generate income more than $40? | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_event, link_to_member. budget -> ...
which student was able to generate income more than $40?
student_club
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'
Question: what is the total expense for the yearly kickoff? | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_event, link_to_member. budget -> budget_...
what is the total expense for the yearly kickoff?
student_club
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'
Question: which student has been entrusted to manage the budget for the yearly kickoff? | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_event, link_...
which student has been entrusted to manage the budget for the yearly kickoff?
student_club
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
Question: which students manage to generate the highest income. state his/her full name along with the income source. | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. atte...
which students manage to generate the highest income. state his/her full name along with the income source.
student_club
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
Question: which event has the lowest cost? | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_event, link_to_member. budget -> budget_id, category, spe...
which event has the lowest cost?
student_club
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
Question: based on the total cost for all event, what is the percentage of cost for yearly kickoff event? | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> li...
based on the total cost for all event, what is the percentage of cost for yearly kickoff event?
student_club
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
Question: what is the ratio between students majored in finance and physics? | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_event, link_to_member. ...
what is the ratio between students majored in finance and physics?
student_club
select source from income where date_received between '2019-09-01' and '2019-09-30' order by source desc limit 1
Question: indicate the top source of funds received in september 2019 based on their amount. | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_event, ...
indicate the top source of funds received in september 2019 based on their amount.
student_club
select first_name, last_name, email from member where position = 'secretary'
Question: provide the full name and email address of the student_club's secretary. | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_event, link_to_me...
provide the full name and email address of the student_club's secretary.
student_club
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'
Question: how many members of the student_club have major in 'physics teaching'? | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_event, link_to_memb...
how many members of the student_club have major in 'physics teaching'?
student_club
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'
Question: how many members did attend the event 'community theater' in 2019? | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_event, link_to_member. ...
how many members did attend the event 'community theater' in 2019?
student_club
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'
Question: provide the number of events attended by luisa guidi. what is her major? | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_event, link_to_me...
provide the number of events attended by luisa guidi. what is her major?
student_club
select sum(spent) / count(spent) from budget where category = 'food' and event_status = 'closed'
Question: on average, how much did the student_club spend on food for the typical event in the past? | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to...
on average, how much did the student_club spend on food for the typical event in the past?
student_club
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
Question: name the event with the highest amount spent on advertisement. | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_event, link_to_member. budg...
name the event with the highest amount spent on advertisement.
student_club
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'
Question: did maya mclean attend the 'women's soccer' event? | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_event, link_to_member. budget -> budget...
did maya mclean attend the 'women's soccer' event?
student_club
select cast(sum(case when type = 'community service' then 1 else 0 end) as real) * 100 / count(type) from event where substr(event_date, 1, 4) = '2019'
Question: among all events hold by the student_club in 2019, find the percentage share of events related to 'community service' | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_s...
among all events hold by the student_club in 2019, find the percentage share of events related to 'community service'
student_club
select 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 = 'september speaker' and t3.expense_description = 'posters'
Question: indicate the cost of posters for 'september speaker' event. | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_event, link_to_member. budget ...
indicate the cost of posters for 'september speaker' event.
student_club
select t_shirt_size from member group by t_shirt_size order by count(t_shirt_size) desc limit 1
Question: what is the most popular size of t-shirt ordered by the club members? | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_event, link_to_membe...
what is the most popular size of t-shirt ordered by the club members?
student_club
select t2.event_name from budget as t1 inner join event as t2 on t2.event_id = t1.link_to_event where t1.event_status = 'closed' and t1.remaining < 0 order by t1.remaining limit 1
Question: indicate the name of the closed event whose cost has exceeded the budget the most. | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_event, ...
indicate the name of the closed event whose cost has exceeded the budget the most.
student_club
select t1.type, 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 = 'october meeting'
Question: identify the type of expenses and their total value approved for 'october meeting' event. | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_...
identify the type of expenses and their total value approved for 'october meeting' event.
student_club
select sum(t2.amount), t2.category from event as t1 inner join budget as t2 on t1.event_id = t2.link_to_event where t1.event_name = 'april speaker' order by t2.amount
Question: calculate the amount budgeted for 'april speaker' event. list all the budgeted categories for said event in an ascending order based on their amount. | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, ty...
calculate the amount budgeted for 'april speaker' event. list all the budgeted categories for said event in an ascending order based on their amount.
student_club
select budget_id from budget where category = 'food' and amount = ( select max(amount) from budget )
Question: among the budgets for food, which one has the highest budgeted amount? | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_event, link_to_memb...
among the budgets for food, which one has the highest budgeted amount?
student_club
select budget_id from budget where category = 'advertisement' order by amount desc limit 3
Question: among the budgets for advertising, list out top three which have the most budgeted amount? | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to...
among the budgets for advertising, list out top three which have the most budgeted amount?
student_club
select sum(cost) from expense where expense_description = 'parking'
Question: calculate the total cost spent for parking in the list. | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_event, link_to_member. budget -> b...
calculate the total cost spent for parking in the list.
student_club
select sum(cost) from expense where expense_date = '2019-08-20'
Question: mention the total expense used on 8/20/2019. | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_event, link_to_member. budget -> budget_id, c...
mention the total expense used on 8/20/2019.
student_club
select t1.first_name, t1.last_name, sum(t2.cost) from member as t1 inner join expense as t2 on t1.member_id = t2.link_to_member where t1.member_id = 'rec4bldzhs2blfp4v'
Question: list out the full name and total cost that member id 'rec4bldzhs2blfp4v' incurred? | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_event, ...
list out the full name and total cost that member id 'rec4bldzhs2blfp4v' incurred?
student_club
select t2.expense_description from member as t1 inner join expense as t2 on t1.member_id = t2.link_to_member where t1.first_name = 'sacha' and t1.last_name = 'harrison'
Question: state what kind of expenses that sacha harrison incurred? | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_event, link_to_member. budget ->...
state what kind of expenses that sacha harrison incurred?
student_club
select t2.expense_description from member as t1 inner join expense as t2 on t1.member_id = t2.link_to_member where t1.t_shirt_size = 'x-large'
Question: what kind of expenses incurred by members who have x-large in size of tee shirt? | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_event, li...
what kind of expenses incurred by members who have x-large in size of tee shirt?
student_club
select t1.zip from member as t1 inner join expense as t2 on t1.member_id = t2.link_to_member where t2.cost < 50
Question: mention the zip code of member who incurred less than 50usd. | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_event, link_to_member. budget...
mention the zip code of member who incurred less than 50usd.
student_club
select t1.major_name from major as t1 inner join member as t2 on t1.major_id = t2.link_to_major where t2.first_name = 'phillip' and t2.last_name = 'cullen'
Question: state the name of major that phillip cullen has joined. | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_event, link_to_member. budget -> b...
state the name of major that phillip cullen has joined.
student_club
select t2.position from major as t1 inner join member as t2 on t1.major_id = t2.link_to_major where t1.major_name = 'business'
Question: list out the position of members who joined major of business. | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_event, link_to_member. budg...
list out the position of members who joined major of business.
student_club
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 = 'business' and t2.t_shirt_size = 'medium'
Question: how many members of business have the medium size of tee shirt? | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_event, link_to_member. bud...
how many members of business have the medium size of tee shirt?
student_club
select t1.type from event as t1 inner join budget as t2 on t1.event_id = t2.link_to_event where t2.remaining > 30
Question: list out the type of events which have remaining budget more than 30 usd. | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_event, link_to_m...
list out the type of events which have remaining budget more than 30 usd.
student_club
select t2.category from event as t1 inner join budget as t2 on t1.event_id = t2.link_to_event where t1.location = 'mu 215'
Question: mention the category of events which were held at mu 215. | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_event, link_to_member. budget ->...
mention the category of events which were held at mu 215.
student_club
select t2.category from event as t1 inner join budget as t2 on t1.event_id = t2.link_to_event where t1.event_date = '2020-03-24t12:00:00'
Question: what is the category of event which was taken place in 2020-03-24t12:00:00? | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_event, link_to...
what is the category of event which was taken place in 2020-03-24t12:00:00?
student_club
select t1.major_name from major as t1 inner join member as t2 on t1.major_id = t2.link_to_major where t2.position = 'vice president'
Question: state the name of major that vice president has joined. | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_event, link_to_member. budget -> b...
state the name of major that vice president has joined.
student_club
select cast(sum(case when t2.major_name = 'mathematics' then 1 else 0 end) as real) * 100 / count(t1.member_id) from member as t1 inner join major as t2 on t2.major_id = t1.link_to_major where t1.position = 'member'
Question: calculate the percentage of members who are major mathematics in the list? | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_event, link_to_...
calculate the percentage of members who are major mathematics in the list?
student_club
select t2.category from event as t1 inner join budget as t2 on t1.event_id = t2.link_to_event where t1.location = 'mu 215'
Question: state the category of events were held at mu 215. | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_event, link_to_member. budget -> budget_...
state the category of events were held at mu 215.
student_club
select count(income_id) from income where amount = 50
Question: how many income are received with an amount of 50? | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_event, link_to_member. budget -> budget...
how many income are received with an amount of 50?
student_club
select count(member_id) from member where position = 'member' and t_shirt_size = 'x-large'
Question: among the members, how many of them have an extra large t-shirt size? | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_event, link_to_membe...
among the members, how many of them have an extra large t-shirt size?
student_club
select count(major_id) from major where department = 'school of applied sciences, technology and education' and college = 'college of agriculture and applied sciences'
Question: in the college of agriculture and applied sciences, how many majors are under the department of school of applied sciences, technology and education? | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, ty...
in the college of agriculture and applied sciences, how many majors are under the department of school of applied sciences, technology and education?
student_club
select t2.last_name, t1.department, t1.college from major as t1 inner join member as t2 on t1.major_id = t2.link_to_major where t2.position = 'member' and t1.major_name = 'environmental engineering'
Question: list the last name of members with a major in environmental engineering and include its department and college name. | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_st...
list the last name of members with a major in environmental engineering and include its department and college name.
student_club
select distinct t2.category, t1.type from event as t1 inner join budget as t2 on t1.event_id = t2.link_to_event where t1.location = 'mu 215' and t2.spent = 0 and t1.type = 'guest speaker'
Question: what are the budget category of the events located at mu 215 and a guest speaker type with a 0 budget spent? | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. att...
what are the budget category of the events located at mu 215 and a guest speaker type with a 0 budget spent?
student_club
select city, state from member as t1 inner join major as t2 on t2.major_id = t1.link_to_major inner join zip_code as t3 on t3.zip_code = t1.zip where department = 'electrical and computer engineering department' and position = 'member'
Question: list the city and state of members enrolled under electrical and computer engineering department. | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> ...
list the city and state of members enrolled under electrical and computer engineering department.
student_club
select t2.event_name from attendance as t1 inner join event as t2 on t2.event_id = t1.link_to_event inner join member as t3 on t1.link_to_member = t3.member_id where t3.position = 'vice president' and t2.location = '900 e. washington st.' and t2.type = 'social'
Question: what is the name of the social event that was attended by the vice president of the student_club located at 900 e. washington st.? | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, s...
what is the name of the social event that was attended by the vice president of the student_club located at 900 e. washington st.?
student_club
select t1.last_name, t1.position from member as t1 inner join expense as t2 on t1.member_id = t2.link_to_member where t2.expense_date = '2019-09-10' and t2.expense_description = 'pizza'
Question: what is the last name and position of the student that bought pizza on 09/10/2019? | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_event, ...
what is the last name and position of the student that bought pizza on 09/10/2019?
student_club
select t3.last_name from attendance as t1 inner join event as t2 on t2.event_id = t1.link_to_event inner join member as t3 on t1.link_to_member = t3.member_id where t2.event_name = 'women''s soccer' and t3.position = 'member'
Question: list the last name of the members of the club that attended the women's soccer event. | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_even...
list the last name of the members of the club that attended the women's soccer event.
student_club
select cast(sum(case when t2.amount = 50 then 1.0 else 0 end) as real) * 100 / count(t2.income_id) from member as t1 inner join income as t2 on t1.member_id = t2.link_to_member where t1.position = 'member' and t1.t_shirt_size = 'medium'
Question: among the members with t-shirt size of medium, what is the percentage of the amount 50 received by the student_club? | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_st...
among the members with t-shirt size of medium, what is the percentage of the amount 50 received by the student_club?
student_club
select distinct county from zip_code where type = 'po box' and county is not null
Question: which countries have zip codes with post office boxes? | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_event, link_to_member. budget -> bu...
which countries have zip codes with post office boxes?
student_club
select zip_code from zip_code where type = 'po box' and county = 'san juan municipio' and state = 'puerto rico'
Question: what are the zip codes that have post office boxes in the country of the country of san juan municipio whose state is puerto rico? | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, s...
what are the zip codes that have post office boxes in the country of the country of san juan municipio whose state is puerto rico?
student_club
select distinct event_name from event where type = 'game' and date(substr(event_date, 1, 10)) between '2019-03-15' and '2020-03-20' and status = 'closed'
Question: list the names of closed event as 'game' that was closed from 3/15/2019 to 3/20/2020. | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_even...
list the names of closed event as 'game' that was closed from 3/15/2019 to 3/20/2020.
student_club
select distinct t3.link_to_event from expense as t1 inner join member as t2 on t1.link_to_member = t2.member_id inner join attendance as t3 on t2.member_id = t3.link_to_member where t1.cost > 50
Question: please provide links to events for members who have paid more than 50 dollar. | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city, county, state, short_state. attendance -> link_to_event, link_...
please provide links to events for members who have paid more than 50 dollar.
student_club
select distinct t1.link_to_member, t3.link_to_event from expense as t1 inner join member as t2 on t1.link_to_member = t2.member_id inner join attendance as t3 on t2.member_id = t3.link_to_member where date(substr(t1.expense_date, 1, 10)) between '2019-01-10' and '2019-11-19' and t1.approved = 'true'
Question: which members who were approved from 1/10/2019 to 11/19/2019? please identify the member who attended the event and the link to their event. | Tables: event -> event_id, event_name, event_date, type, notes, location, status. major -> major_id, major_name, department, college. zip_code -> zip_code, type, city,...
which members who were approved from 1/10/2019 to 11/19/2019? please identify the member who attended the event and the link to their event.