Dludora/Bird-minidev-sqlserver-oracle huggingface dataset:
Database: student_club

Question: What's Angela Sanders's major?
Evidence: Angela Sanders is the full name; full name refers to first_name, last_name; major refers to major_name.
SQL (SQLite): 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'
SQL (SQL Server): 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'
SQL (Oracle): SELECT T2.major_name FROM member T1 INNER JOIN major T2 ON T1.link_to_major = T2.major_id WHERE T1.first_name = 'Angela' AND T1.last_name = 'Sanders'

Question: 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?
Evidence: Women's Soccer is an event name; T-shirt that is in medium size refers to t_shirt_size = 'Medium'
SQL (SQLite): 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'
SQL (SQL Server): SELECT COUNT(T1.event_id) AS _agg1 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'
SQL (Oracle): SELECT COUNT(T1.event_id) FROM event T1 INNER JOIN attendance T2 ON T1.event_id = T2.link_to_event INNER JOIN member T3 ON T2.link_to_member = T3.member_id WHERE T1.event_name = 'Women''s Soccer' AND T3.t_shirt_size = 'Medium'

Question: Among the events attended by more than 10 members of the Student_Club, how many of them are meetings?
Evidence: meetings events refers to type = 'Meeting'; attended by more than 10 members refers to COUNT(event_id) > 10
SQL (SQLite): 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'
SQL (SQL Server): SELECT MIN(T1.event_name) AS 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'
SQL (Oracle): SELECT MIN(T1.event_name) event_name FROM event T1  INNER JOIN attendance 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 T1  WHERE T1."TYPE" = 'Meeting'
Database: student_club

Question: List all the names of events that had an attendance of over 20 students but were not fundraisers.
Evidence: name of events refers to event_name; attendance of over 20 students COUNT(event_id) > 20.
SQL (SQLite): 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'
SQL (SQL Server): SELECT MIN(T1.event_name) AS 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'
SQL (Oracle): SELECT MIN(T1.event_name) event_name FROM event T1 INNER JOIN attendance 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 T1  WHERE T1."TYPE" = 'Fundraiser'

Question: What is the amount of the funds that the Vice President received?
Evidence: 'Vice President' is a position of Student Club; funds received refers to amount.
SQL (SQLite): 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'
SQL (SQL Server): 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'
SQL (Oracle): SELECT T2.amount FROM member T1 INNER JOIN income T2 ON T1.member_id = T2.link_to_member WHERE T1.position = 'Vice President'

Question: List the full name of the Student_Club members that grew up in Illinois state.
Evidence: full name of member refers to first_name, last_name
SQL (SQLite): 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'
SQL (SQL Server): 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'
SQL (Oracle): SELECT T1.first_name, T1.last_name FROM member T1 INNER JOIN zip_code T2 ON T1.zip = T2.zip_code WHERE T2.state = 'Illinois'

Question: Was each expense in October Meeting on October 8, 2019 approved?
Evidence: event_name = 'October Meeting' where event_date = '2019-10-08'; approved = True means expenses was approved; approved = False means expenses was not approved
SQL (SQLite): 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%'
SQL (SQL Server): 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%'
SQL (Oracle): SELECT T3.approved FROM event T1 INNER JOIN budget T2 ON T1.event_id = T2.link_to_event INNER JOIN expense T3 ON T2.budget_id = T3.link_to_budget WHERE T1.event_name = 'October Meeting' AND T1.event_date LIKE '2019-10-08%'
Database: student_club

Question: Calculate the total average cost that Elijah Allen spent in the events on September and October.
Evidence: 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
SQL (SQLite): 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')
SQL (SQL Server): SELECT AVG(TRY_CAST(T2.cost AS FLOAT)) AS _agg1 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 (SUBSTRING(T2.expense_date, 6, 2) = '09' OR SUBSTRING(T2.expense_date, 6, 2) = '10')
SQL (Oracle): SELECT AVG(T2.cost) FROM member T1 INNER JOIN expense 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 difference of the total amount spent in all events by the Student_Club in year 2019 and 2020.
Evidence: 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)
SQL (SQLite): 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
SQL (SQL Server): SELECT SUM(CASE WHEN SUBSTRING(T1.event_date, 1, 4) = '2019' THEN T2.spent ELSE 0 END) - SUM(CASE WHEN SUBSTRING(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
SQL (Oracle): SELECT SUM(CASE WHEN SUBSTR(T1.event_date, 1, 4) = '2019' THEN CAST(T2.spent AS BINARY_DOUBLE) ELSE 0.0 END) - SUM(CASE WHEN SUBSTR(T1.event_date, 1, 4) = '2020' THEN CAST(T2.spent AS BINARY_DOUBLE) ELSE 0.0 END) num FROM event T1 INNER JOIN budget T2 ON T1.event_id = T2.link_to_event

Question: What was the notes of the fundraising on 2019/9/14?
Evidence: fundraising on 2019/9/14 refers to source = 'Fundraising' where date_received = '2019-09-14'
SQL (SQLite): SELECT notes FROM income WHERE source = 'Fundraising' AND date_received = '2019-09-14'
SQL (SQL Server): SELECT notes FROM income WHERE source = 'Fundraising' AND date_received = '2019-09-14'
SQL (Oracle): SELECT notes FROM income WHERE source = 'Fundraising' AND date_received = '2019-09-14'
Database: student_club

Question: Tell the phone number of "Carlo Jacobs".
Evidence: Carlo Jacobs is the full name; full name refers to first_name, last_name;
SQL (SQLite): SELECT phone FROM member WHERE first_name = 'Carlo' AND last_name = 'Jacobs'
SQL (SQL Server): SELECT phone FROM member WHERE first_name = 'Carlo' AND last_name = 'Jacobs'
SQL (Oracle): SELECT phone FROM member WHERE first_name = 'Carlo' AND last_name = 'Jacobs'

Question: What is the status of the event which bought "Post Cards, Posters" on 2019/8/20?
Evidence: '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
SQL (SQLite): 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'
SQL (SQL Server): 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'
SQL (Oracle): SELECT T1.event_status FROM budget T1 INNER JOIN expense 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 was Brent Thomason's major?
Evidence: Brent Thomason is the full name; full name refers to first_name, last_name; major refers to major_name
SQL (SQLite): 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'
SQL (SQL Server): 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'
SQL (Oracle): SELECT T2.major_name FROM member T1 INNER JOIN major T2 ON T1.link_to_major = T2.major_id WHERE T1.first_name = 'Brent' AND T1.last_name = 'Thomason'

Question: For all the club members from "Business" major, how many of them wear medium size t-shirt?
Evidence: 'Business' is a major name; wear medium size t-shirt refers to t_shirt_size = 'Medium'
SQL (SQLite): 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'
SQL (SQL Server): SELECT COUNT(T1.member_id) AS _agg1 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'
SQL (Oracle): SELECT COUNT(T1.member_id) FROM member T1 INNER JOIN major T2 ON T1.link_to_major = T2.major_id WHERE T2.major_name = 'Business' AND T1.t_shirt_size = 'Medium'
Database: student_club

Question: Which department was the President of the club in?
Evidence: 'President' is a position of Student Club
SQL (SQLite): SELECT T2.department FROM member AS T1 INNER JOIN major AS T2 ON T1.link_to_major = T2.major_id WHERE T1.position = 'President'
SQL (SQL Server): SELECT T2.department FROM member AS T1 INNER JOIN major AS T2 ON T1.link_to_major = T2.major_id WHERE T1.position = 'President'
SQL (Oracle): SELECT T2.department FROM member T1 INNER JOIN major T2 ON T1.link_to_major = T2.major_id WHERE T1.position = 'President'

Question: State the date Connor Hilton paid his/her dues.
Evidence: 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';
SQL (SQLite): 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'
SQL (SQL Server): 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'
SQL (Oracle): SELECT T2.date_received FROM member T1 INNER JOIN income T2 ON T1.member_id = T2.link_to_member WHERE T1.first_name = 'Connor' AND T1.last_name = 'Hilton' AND T2.source = 'Dues'

Question: How many times was the budget in Advertisement for "Yearly Kickoff" meeting more than "October Meeting"?
Evidence: 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'))
SQL (SQLite): 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'
SQL (SQL Server): SELECT TRY_CAST(SUM(CASE WHEN T2.event_name = 'Yearly Kickoff' THEN T1.amount ELSE 0 END) AS FLOAT) / SUM(CASE WHEN T2.event_name = 'October Meeting' THEN T1.amount ELSE 0 END) AS _agg1 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'
SQL (Oracle): SELECT CAST(SUM(CASE WHEN T2.event_name = 'Yearly Kickoff' THEN CAST(T1.amount AS BINARY_DOUBLE) ELSE 0.0 END) AS BINARY_DOUBLE) / SUM(CASE WHEN T2.event_name = 'October Meeting' THEN CAST(T1.amount AS BINARY_DOUBLE) ELSE 0.0 END) FROM budget T1 INNER JOIN event T2 ON T1.link_to_event = T2.event_id WHERE T1.category = 'Advertisement' AND T2."TYPE" = 'Meeting'

Question: What is the total cost of the pizzas for all the events?
Evidence: total cost of the pizzas refers to SUM(cost) where expense_description = 'Pizza'
SQL (SQLite): SELECT SUM(cost) FROM expense WHERE expense_description = 'Pizza'
SQL (SQL Server): SELECT SUM(cost) AS _agg1 FROM expense WHERE expense_description = 'Pizza'
SQL (Oracle): SELECT SUM(cost) FROM expense WHERE expense_description = 'Pizza'
Database: student_club

Question: How many cities are there in Orange County, Virginia?
Evidence: Orange County is the county name, Virginia is the state name
SQL (SQLite): SELECT COUNT(city) FROM zip_code WHERE county = 'Orange County' AND state = 'Virginia'
SQL (SQL Server): SELECT COUNT(city) AS _agg1 FROM zip_code WHERE county = 'Orange County' AND state = 'Virginia'
SQL (Oracle): SELECT COUNT(city) FROM zip_code WHERE county = 'Orange County' AND state = 'Virginia'

Question: What does the person with the phone number "809-555-3360" major in?
Evidence: major in refers to major_name
SQL (SQLite): 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'
SQL (SQL Server): 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'
SQL (Oracle): SELECT T2.major_name FROM member T1 INNER JOIN major T2 ON T1.link_to_major = T2.major_id WHERE T1.phone = '809-555-3360'

Question: How many members attended the "Women's Soccer" event?
Evidence: 'Women's Soccer' is the event name;
SQL (SQLite): 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'
SQL (SQL Server): SELECT COUNT(T2.link_to_member) AS _agg1 FROM event AS T1 INNER JOIN attendance AS T2 ON T1.event_id = T2.link_to_event WHERE T1.event_name = 'Women''s Soccer'
SQL (Oracle): SELECT COUNT(T2.link_to_member) FROM event T1 INNER JOIN attendance T2 ON T1.event_id = T2.link_to_event WHERE T1.event_name = 'Women''s Soccer'

Question: List all the members of the "School of Applied Sciences, Technology and Education" department.
Evidence: list all members means to list all the full name; full name refers to first_name, last_name;
SQL (SQLite): 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'
SQL (SQL Server): 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'
SQL (Oracle): SELECT T1.first_name, T1.last_name FROM member T1 INNER JOIN major T2 ON T1.link_to_major = T2.major_id WHERE T2.department = 'School of Applied Sciences, Technology and Education'
Database: student_club

Question: Among all the closed events, which event has the highest spend-to-budget ratio?
Evidence: closed events refers to event_name where status = 'Closed'; highest spend-to budget ratio refers to MAX(DIVIDE(spent, amount))
SQL (SQLite): 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
SQL (SQL Server): 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 / NULLIF(T1.amount, 0) DESC OFFSET 0 ROWS FETCH NEXT 1 ROWS ONLY
SQL (Oracle): SELECT T2.event_name FROM budget T1 INNER JOIN event T2 ON T1.link_to_event = T2.event_id WHERE T2.status = 'Closed' ORDER BY T1.spent / NULLIF(T1.amount, 0) DESC NULLS LAST FETCH FIRST 1 ROWS ONLY

Question: What is the highest amount of budget spend for an event?
Evidence: highest amount of budget spend refers to MAX(spent)
SQL (SQLite): SELECT MAX(spent) FROM budget
SQL (SQL Server): SELECT MAX(spent) AS _agg1 FROM budget
SQL (Oracle): SELECT MAX(spent) FROM budget

Question: What is the total amount of money spent for food?
Evidence: total amount of money spent refers to SUM(spent); spent for food refers to category = 'Food'
SQL (SQLite): SELECT SUM(spent) FROM budget WHERE category = 'Food'
SQL (SQL Server): SELECT SUM(spent) AS _agg1 FROM budget WHERE category = 'Food'
SQL (Oracle): SELECT SUM(spent) FROM budget WHERE category = 'Food'

Question: List the name of students that have attended more than 7 events.
Evidence: 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
SQL (SQLite): 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
SQL (SQL Server): SELECT MIN(T1.first_name) AS first_name, MIN(T1.last_name) AS 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
SQL (Oracle): SELECT MIN(T1.first_name) first_name, MIN(T1.last_name) last_name FROM member T1 INNER JOIN attendance T2 ON T1.member_id = T2.link_to_member GROUP BY T2.link_to_member HAVING COUNT(T2.link_to_event) > 7
Database: student_club

Question: Which student has been entrusted to manage the budget for the Yearly Kickoff?
Evidence: name of students means the full name; full name refers to first_name, last_name;'Yearly Kickoff' is an event name;
SQL (SQLite): 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'
SQL (SQL Server): 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'
SQL (Oracle): SELECT T4.first_name, T4.last_name FROM event T1 INNER JOIN budget T2 ON T1.event_id = T2.link_to_event INNER JOIN expense T3 ON T2.budget_id = T3.link_to_budget INNER JOIN member T4 ON T3.link_to_member = T4.member_id WHERE T1.event_name = 'Yearly Kickoff'

Question: Which event has the lowest cost?
Evidence: event refers to event_name; lowest cost means MIN(cost)
SQL (SQLite): 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
SQL (SQL Server): 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 OFFSET 0 ROWS FETCH NEXT 1 ROWS ONLY
SQL (Oracle): SELECT T1.event_name FROM event T1 INNER JOIN budget T2 ON T1.event_id = T2.link_to_event INNER JOIN expense T3 ON T2.budget_id = T3.link_to_budget ORDER BY T3.cost NULLS FIRST FETCH FIRST 1 ROWS ONLY

Question: Based on the total cost for all event, what is the percentage of cost for Yearly Kickoff event?
Evidence: percentage = DIVIDE(SUM(cost where event_name = 'Yearly Kickoff'), SUM(cost)) * 100
SQL (SQLite): 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
SQL (SQL Server): SELECT TRY_CAST(SUM(CASE WHEN T1.event_name = 'Yearly Kickoff' THEN T3.cost ELSE 0 END) AS FLOAT) * 100 / SUM(T3.cost) AS _agg1 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
SQL (Oracle): SELECT CAST(SUM(CASE WHEN T1.event_name = 'Yearly Kickoff' THEN CAST(T3.cost AS BINARY_DOUBLE) ELSE 0.0 END) AS BINARY_DOUBLE) * 100 / SUM(T3.cost) FROM event T1 INNER JOIN budget T2 ON T1.event_id = T2.link_to_event INNER JOIN expense T3 ON T2.budget_id = T3.link_to_budget