Chinastark/bird_dataset huggingface dataset:
Database: simpson_episodes
Question: State the number of votes for episode with rating of 7 and above.
Evidence: rating of 7 and above refers to rating > 7.0
SQL: SELECT votes FROM Episode WHERE rating > 7;
Database: simpson_episodes
Question: How many title's crew members are working from Casting Department?
Evidence: working from Casting Department refers to category = 'Casting Department'
SQL: SELECT COUNT(*) FROM Episode AS T1 INNER JOIN Credit AS T2 ON T1.episode_id = T2.episode_id WHERE T2.category = 'Casting Department';
Database: simpson_episodes
Question: How many additional timers were born in USA?
Evidence: additional timers refers to role = 'additional timer'; born in USA refers to birth_country = 'USA'
SQL: SELECT COUNT(*) FROM Person AS T1 INNER JOIN Credit AS T2 ON T1.name = T2.person WHERE T2.role = 'additional timer' AND T1.birth_country = 'USA';
Database: simpson_episodes
Question: How many people who were born after 1970 are animation executive producer?
Evidence: born after 1980 refers to birthdate > 1970; assistant to the producers refers to role = 'animation executive producer'
SQL: SELECT COUNT(*) FROM Person AS T1 INNER JOIN Credit AS T2 ON T1.name = T2.person WHERE STRFTIME(T1.birthdate) > '1970' AND T2.role = 'animation executive producer';
Database: simpson_episodes
Question: Write down the summary of episode whereby it has crew members that are not included in the credit list.
Evidence: are not included in the credit list refers to credited = ''
SQL: SELECT T1.summary FROM Episode AS T1 INNER JOIN Credit AS T2 ON T1.episode_id = T2.episode_id WHERE T2.credited = 'false';
Database: simpson_episodes
Question: List down the rating of episodes that were produced by Jason Bikowski.
Evidence: produced by Jason Bikowski refers to person = 'Jason Bikowski'
SQL: SELECT T1.rating FROM Episode AS T1 INNER JOIN Credit AS T2 ON T1.episode_id = T2.episode_id WHERE T2.person = 'Jason Bikowski';
Database: simpson_episodes
Question: What is the average heights of crew members from Animation Department?
Evidence: from Animation Department refers to category = 'Animation Department'; AVG(height_meters) where category = 'Animation Department'
SQL: SELECT AVG(T1.height_meters) FROM Person AS T1 INNER JOIN Credit AS T2 ON T1.name = T2.person WHERE T2.category = 'Animation Department';
Database: simpson_episodes
Question: What is the character that won the award in Primetime Emmy 2009?
Evidence: won the award in Primetime Emmy 2009 refers to award_category = 'Primetime Emmy' and year = 2009
SQL: SELECT DISTINCT T2.character FROM Award AS T1 INNER JOIN Character_Award AS T2 ON T1.award_id = T2.award_id WHERE T1.award_category = 'Primetime Emmy' AND T1.year = 2009 AND T1.result = 'Winner';
Database: simpson_episodes
Question: What are the characters that were nominated for Primetime Emmy Award from 2009 to 2010 but did not win?
Evidence: nominated for Primetime Emmy Award but did not win refers to award_category = 'Primetime Emmy' and result = 'Nominee';  from 2009 to 2010 refers to year > = '2009' and  year < = '2010'
SQL: SELECT T2.character FROM Award AS T1 INNER JOIN Character_Award AS T2 ON T1.award_id = T2.award_id WHERE T1.award_category = 'Primetime Emmy' AND T1.year BETWEEN 2009 AND 2010 AND T1.result != 'Winner';
Database: simpson_episodes
Question: Calculate the total votes of episodes that Adam Kuhlman had involved.
Evidence: Adam Kuhlman had involved refers to person = 'Adam Kuhlman'
SQL: SELECT SUM(T1.votes) FROM Episode AS T1 INNER JOIN Credit AS T2 ON T1.episode_id = T2.episode_id WHERE T2.person = 'Adam Kuhlman';
Database: simpson_episodes
Question: List down the keyword and crew member's name for episode id S20-E1.
SQL: SELECT T1.keyword, T2.person FROM Keyword AS T1 INNER JOIN Credit AS T2 ON T1.episode_id = T2.episode_id WHERE T1.episode_id = 'S20-E1';
Database: simpson_episodes
Question: What is the keyword for episodes with stars score of 10 at 30% and above?
Evidence: stars score of 10 at 30% and above refers to stars = 10 and percent > 29
SQL: SELECT T1.keyword FROM Keyword AS T1 INNER JOIN Vote AS T2 ON T1.episode_id = T2.episode_id WHERE T2.stars = 10 AND T2.percent > 29;
Database: simpson_episodes
Question: What is the percentage of star score 5 that was collected by title "Sex, Pies and Idiot Scrapes"?
Evidence: percentage = DIVIDE(SUM(stars = 5), COUNT(stars)) as percentage
SQL: SELECT CAST(SUM(CASE WHEN T2.stars = 5 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM Episode AS T1 INNER JOIN Vote AS T2 ON T2.episode_id = T1.episode_id WHERE T1.title = 'Sex, Pies and Idiot Scrapes';
Database: simpson_episodes
Question: Please check is "limbo dancing" the keyword for title "Dangerous Curves"?
SQL: SELECT CASE WHEN T2.Keyword = 'limbo dancing' THEN 'Yes' ELSE 'No' END AS result FROM Episode AS T1 INNER JOIN Keyword AS T2 ON T1.episode_id = T2.episode_id WHERE T1.title = 'Dangerous Curves';
Database: simpson_episodes
Question: Which title is the winner of Best International TV Series in 2017?
Evidence: winner refers to result = 'Winner'; Best International TV Series in 2017 refers to award = 'Best International TV Series' and year = '2017'


SQL: SELECT T2.title FROM Award AS T1 INNER JOIN Episode AS T2 ON T1.episode_id = T2.episode_id WHERE T1.award = 'Best International TV Series' AND SUBSTR(T1.year, 1, 4) = '2017';
Database: simpson_episodes
Question: Write down all the keywords for winner of "WGA Award (TV)" award.
Evidence: winner of "WGA Award (TV)" award refers to award_category = 'WGA Award (TV)' and result = 'Winner'
SQL: SELECT T2.keyword FROM Award AS T1 INNER JOIN Keyword AS T2 ON T2.episode_id = T1.episode_id WHERE T1.award_category = 'WGA Award (TV)';
Database: simpson_episodes
Question: State the birth place of co-executive producer for nominee of "Outstanding Animated Program (For Programming Less Than One Hour)" award.
Evidence: co-executive producer refers to role = 'co-executive producer'; nominee of "Outstanding Animated Program (For Programming Less Than One Hour)" award refers to award = 'Outstanding Animated Program (For Programming Less Than One Hour)' and result = 'Nominee'
SQL: SELECT T1.birth_place FROM Person AS T1 INNER JOIN Award AS T2 ON T1.name = T2.person WHERE T2.award = 'Outstanding Animated Program (For Programming Less Than One Hour)' AND T2.role = 'co-executive producer';
Database: simpson_episodes
Question: Sum up the votes from star 1 to 5 for all of the contestants in Blimp Award.
Evidence: contestants refers to result = 'Winner' and result = 'Nominee'; in Blimp Award refers to award = 'Blimp Award'; star 1 to 5 refers to 1 < stars < 5
SQL: SELECT T2.stars, SUM(T2.stars) FROM Award AS T1 INNER JOIN Vote AS T2 ON T2.episode_id = T1.episode_id WHERE T1.award_category = 'Blimp Award' AND T2.stars BETWEEN 1 AND 5 GROUP BY T2.stars;
Database: simpson_episodes
Question: Calculate the total rating of winners in OFTA Television Award and WGA Award (TV).
Evidence: winners refers to result = 'Winner'; in OFTA Television Award and WGA Award (TV) refers to award = 'OFTA Television Award' and award = 'WGA Award (TV)'
SQL: SELECT SUM(T2.rating) FROM Award AS T1 INNER JOIN Episode AS T2 ON T1.episode_id = T2.episode_id WHERE T1.award_category IN ('Jupiter Award ', 'WGA Award (TV)');
Database: simpson_episodes
Question: Out of the rating of 6.8 scored by title "No Loan Again, Naturally", how many percent of it consists of scores 5 to 10?
Evidence: scores 5 to 10 refers to TOTAL(percent) where 1 < = stars < 5
SQL: SELECT SUM(T2.percent) FROM Episode AS T1 INNER JOIN Vote AS T2 ON T2.episode_id = T1.episode_id WHERE T1.title = 'No Loan Again, Naturally' AND T1.rating = 6.8 AND T2.stars BETWEEN 5 AND 10;
Database: simpson_episodes
Question: How many episodes have the star score greater than 8?
Evidence: star score greater than 8 refers to stars > 8
SQL: SELECT COUNT(DISTINCT episode_id) FROM Vote WHERE stars > 8;
Database: simpson_episodes
Question: Which episode has the highest number of vote of the star score?
Evidence: highest number of vote of the star score refers to max(votes)
SQL: SELECT episode_id FROM Vote ORDER BY votes DESC LIMIT 1;
Database: simpson_episodes
Question: How many episodes have the keyword "2d animation"?
SQL: SELECT COUNT(episode_id) FROM Keyword WHERE keyword = '2d animation';
Database: simpson_episodes
Question: Name the organization which hold the award id 328.
SQL: SELECT organization FROM Award WHERE award_id = 328;
Database: simpson_episodes
Question: How many awards had been held in 2009?
Evidence: had been held in 2009 refers to year = 2009
SQL: SELECT COUNT(award_id) FROM Award WHERE SUBSTR(year, 1, 4) = '2009';
Database: simpson_episodes
Question: How many awards classified as "Primetime Emmy" category?
Evidence: category refers to award_category
SQL: SELECT COUNT(award_id) FROM Award WHERE award_category = 'Primetime Emmy';
Database: simpson_episodes
Question: List out the birth name of crews who are co-executive producer and higher than 1.60 meters.
Evidence: co-executive producer refers to role = 'co-executive producer'; higher than 1.60 meters refers to height_meters > 1.60
SQL: SELECT T1.birth_name FROM Person AS T1 INNER JOIN Award AS T2 ON T1.name = T2.person WHERE T2.role = 'co-executive producer' AND T1.height_meters > 1.60;
Database: simpson_episodes
Question: Calculate the percentage of the nominees who were born in USA.
Evidence: nominees refers to result = 'Nominee'; born in USA refers to birth_country = 'USA'; percentage = divide(sum(result = 'Nominee' and birth_country = 'USA'), count(Person.name)) * 100%
SQL: SELECT CAST(SUM(CASE WHEN T1.birth_country = 'USA' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM Person AS T1 INNER JOIN Award AS T2 ON T1.name = T2.person WHERE T2.result = 'Nominee';
Database: simpson_episodes
Question: Calculate the percentage of the winners who are higher than 1.75 meters.
Evidence: winners refers to result = 'Winner'; higher than 1.75 meters refers to height_meters > 1.75; percentage = divide(sum(result = 'Winner' and height_meters > 1.75), count(result = 'Winner' )) * 100%

SQL: SELECT CAST(SUM(CASE WHEN T1.height_meters > 1.75 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM Person AS T1 INNER JOIN Award AS T2 ON T1.name = T2.person WHERE T2.result = 'Winner';
Database: simpson_episodes
Question: List out the title of episodes which have star score of 2.
Evidence: star score of 2 refers to stars = 2
SQL: SELECT T1.title FROM Episode AS T1 INNER JOIN Vote AS T2 ON T2.episode_id = T1.episode_id WHERE T2.stars = 2;
Database: simpson_episodes
Question: List out the star scores of episode which has title of "How the Test Was Won".
Evidence: star scores refers to stars
SQL: SELECT T2.stars FROM Episode AS T1 INNER JOIN Vote AS T2 ON T2.episode_id = T1.episode_id WHERE T1.title = 'How the Test Was Won';
Database: simpson_episodes
Question: Among the episodes which have star score greater than 5, how many episodes have air date in 2008?
Evidence: star score greater than 5 refers to stars > 5; have air date in 2008 refers to air_date LIKE '2008%'
SQL: SELECT COUNT(DISTINCT T2.episode_id) FROM Episode AS T1 INNER JOIN Vote AS T2 ON T2.episode_id = T1.episode_id WHERE strftime('%Y', T1.air_date) = '2008' AND T2.stars > 5;
Database: simpson_episodes
Question: List out the names of the awarded character in the awards held in 2009.
Evidence: in 2009 refers to year = 2009; name of awarded character refers to character


SQL: SELECT T2.character FROM Award AS T1 INNER JOIN Character_Award AS T2 ON T1.award_id = T2.award_id WHERE T1.year = 2009;
Database: simpson_episodes
Question: Which are the years that character Mr. Burns won an award?
SQL: SELECT DISTINCT T1.year FROM Award AS T1 INNER JOIN Character_Award AS T2 ON T1.award_id = T2.award_id WHERE T2.character = 'Mr. Burns';
Database: simpson_episodes
Question: What is the awarded category that the awarded character Lenny won?
Evidence: 

awarded category refers to award_category
SQL: SELECT DISTINCT T1.award_category FROM Award AS T1 INNER JOIN Character_Award AS T2 ON T1.award_id = T2.award_id WHERE T2.character = 'Lenny';
Database: simpson_episodes
Question: What is the name of actor who took the role Smithers?
Evidence: name refers to person; the role Smithers refers to character = 'Smithers'
SQL: SELECT DISTINCT T1.person FROM Award AS T1 INNER JOIN Character_Award AS T2 ON T1.award_id = T2.award_id WHERE T2.character = 'Smithers';
Database: simpson_episodes
Question: What are the keywords of the episode which has title as Dangerous Curves?
SQL: SELECT T2.keyword FROM Episode AS T1 INNER JOIN Keyword AS T2 ON T1.episode_id = T2.episode_id WHERE T1.title = 'Dangerous Curves';
Database: simpson_episodes
Question: What are the keywords of the episodes which have the air date in 2008?
Evidence: have air date in 2008 refers to air_date LIKE '2008%'
SQL: SELECT T2.keyword FROM Episode AS T1 INNER JOIN Keyword AS T2 ON T1.episode_id = T2.episode_id WHERE SUBSTR(T1.air_date, 1, 4) = '2008';
Database: simpson_episodes
Question: Among the episodes which have star score less than 8, how many episodes were aired in 2009?
Evidence: star score less than 8 refers to stars < 8; aired in 2009 refers to air_date LIKE '2009%'
SQL: SELECT COUNT(DISTINCT T2.episode_id) FROM Episode AS T1 INNER JOIN Vote AS T2 ON T2.episode_id = T1.episode_id WHERE strftime('%Y', T1.air_date) = '2009' AND T2.stars < 8;
Database: simpson_episodes
Question: State the birth name of crews who are director and have birth country in South Korea.
Evidence: director refers to role = 'director'
SQL: SELECT T1.birth_name FROM Person AS T1 INNER JOIN Award AS T2 ON T1.name = T2.person WHERE T2.role = 'director' AND T1.birth_country = 'South Korea';
Database: simpson_episodes
Question: How many awards did simpson 20 won in 2009?
Evidence: won refers to result = 'Winner'; in 2009 refers to year = 2009
SQL: SELECT COUNT(award_id) FROM Award WHERE SUBSTR(year, 1, 4) = '2009' AND result = 'Winner';
Database: simpson_episodes
Question: What is the total number of episode with a rating below 7?
Evidence: rating below 7 refers to rating < 7
SQL: SELECT COUNT(episode_id) FROM Episode WHERE rating < 7;
Database: simpson_episodes
Question: List down the names of person born in California, USA.
Evidence: California refers to birth_region = 'California'; USA refers to birth_country = 'USA'
SQL: SELECT name FROM Person WHERE birth_region = 'California' AND birth_country = 'USA';
Database: simpson_episodes
Question: In between the episode 5 and10 of season 2, how many of them are credited for casting?
Evidence: between the episode 5 and 10 of season 20 refers to episode_id IN('S20-E5', 'S20-E6', 'S20-E7', 'S20-E8', 'S20-E9', 'S20-E10'); credited refers to credited = 'true'; for casting refers to role = 'casting'
SQL: SELECT COUNT(credited) FROM Credit WHERE episode_id IN ( 'S20-E5',  'S20-E6',  'S20-E7',  'S20-E8',  'S20-E9',  'S20-E10' ) AND credited = 'true' AND role = 'casting';
Database: simpson_episodes
Question: What is the episode ID that received 2 stars and 9 votes?
Evidence: 2 stars refers to stars = 2; 9 votes refers to votes = 9
SQL: SELECT episode_id FROM Vote WHERE stars = 2 AND votes = 9;
Database: simpson_episodes
Question: Give the title of the episode won in Primetime Emmy Awards 2009.
Evidence: won refers to result = 'Winner'; in Primetime Emmy Awards refers to organization = 'Primetime Emmy Awards'; 2009 refers to year = 2009
SQL: SELECT T2.title FROM Award AS T1 INNER JOIN Episode AS T2 ON T1.episode_id = T2.episode_id WHERE T1.organization = 'Primetime Emmy Awards' AND T1.year = 2009 AND T1.result = 'Winner';
Database: simpson_episodes
Question: List down the episode ID of episodes aired in 2008 with 5 stars and below.
Evidence: aired in 2008 refers to air_date LIKE '2008%'; 5 stars and below refers to stars < 5
SQL: SELECT DISTINCT T1.episode_id FROM Episode AS T1 INNER JOIN Vote AS T2 ON T2.episode_id = T1.episode_id WHERE SUBSTR(T1.air_date, 1, 4) = '2008' AND T2.stars < 5;
Database: simpson_episodes
Question: Among the episode with highest votes, what is the category credited to Carlton Batten?
Evidence: highest votes refers to max(votes); to Carlton Batten refers to person = 'Carlton Batten'
SQL: SELECT T2.category FROM Episode AS T1 INNER JOIN Credit AS T2 ON T1.episode_id = T2.episode_id WHERE T2.person = 'Carlton Batten' AND T2.credited = 'true' ORDER BY T1.votes DESC LIMIT 1;
Database: simpson_episodes
Question: Among the episodes aired in 2008 with votes ranges from 920 to 950, list their percent.
Evidence: aired in 2008 refers to air_date LIKE '2008%'; votes ranges from 920 to 950 refers to votes BETWEEN 920 AND 950
SQL: SELECT T2.percent FROM Episode AS T1 INNER JOIN Vote AS T2 ON T2.episode_id = T1.episode_id WHERE SUBSTR(T1.air_date, 1, 4) = '2008' AND T1.votes BETWEEN 950 AND 960;
Database: simpson_episodes
Question: List the episode ID and title of episode where casting was credited to Bonita Pietila.
Evidence: was credited refers to credited = 'true'; to Bonita Pietila refers to person = 'Bonita Pietila'
SQL: SELECT T1.episode_id, T1.title FROM Episode AS T1 INNER JOIN Credit AS T2 ON T1.episode_id = T2.episode_id WHERE T2.credited = 'true' AND T2.person = 'Bonita Pietila' AND T2.role = 'casting';
Database: simpson_episodes
Question: In episode nominated in Annie Awards, how many of the episodes have a percent greater than 6?
Evidence: nominated refers to result = 'Nominee'; Annie Awards refers to organization = 'Annie Awards'; percent greater than 6 refers to percent > 6
SQL: SELECT COUNT(*) FROM Award AS T1 INNER JOIN Vote AS T2 ON T2.episode_id = T1.episode_id WHERE T1.organization = 'Annie Awards' AND T1.result = 'Nominee' AND T2.percent > 6;
Database: simpson_episodes
Question: What is the title of episode nominated for WGA Award (TV) with votes greater than 1000?
Evidence: nominated refers to result = 'Nominee'; WGA Award (TV) refers to award_category = 'WGA Award (TV)'; votes greater than 1000 refers to votes > 1000
SQL: SELECT DISTINCT T2.title FROM Award AS T1 INNER JOIN Episode AS T2 ON T1.episode_id = T2.episode_id WHERE T2.votes > 1000 AND T1.award_category = 'WGA Award (TV)' AND T1.result = 'Nominee';
Database: simpson_episodes
Question: Among the people in Animation Department, who are credited for additional time in the episode titled by "How the Test Was Won"?
Evidence: Animation Department refers to category = 'Animation Department'; credited refers to credited = 'true'; for additional timer refers to role = 'additional timer'
SQL: SELECT T2.person FROM Episode AS T1 INNER JOIN Credit AS T2 ON T1.episode_id = T2.episode_id WHERE T1.title = 'How the Test Was Won' AND T2.role = 'additional timer' AND T2.credited = 'true' AND T2.category = 'Animation Department';
Database: simpson_episodes
Question: List the stars of episodes aired in November 2008.
Evidence: in November 2008 refers to air_date LIKE '2008-11%'
SQL: SELECT T2.stars FROM Episode AS T1 INNER JOIN Vote AS T2 ON T2.episode_id = T1.episode_id WHERE SUBSTR(T1.air_date, 1, 7) = '2008-11';
Database: simpson_episodes
Question: What is the title of episode with 5 stars and nominated for Prism Award which is aired on April 19, 2009?
Evidence: 5 stars refers to stars = 5; nominated refers to result = 'Nominee'; Prism Award refers to award_category = 'Prism Award'; on April 19 2009 refers to air_date = '2009-04-19'
SQL: SELECT T3.title FROM Award AS T1 INNER JOIN Vote AS T2 ON T1.episode_id = T2.episode_id INNER JOIN Episode AS T3 ON T1.episode_id = T3.episode_id WHERE T3.air_date = '2009-04-19' AND T1.award_category = 'Prism Award' AND T2.stars = 5 AND T1.result = 'Nominee';
Database: simpson_episodes
Question: In episode with the highest votes, list the category of awards it is nominated for.
Evidence: highest votes refers to max(votes); nominated refers to result = 'Nominee'
SQL: SELECT T1.award_category FROM Award AS T1 INNER JOIN Episode AS T2 ON T1.episode_id = T2.episode_id WHERE T1.result = 'Nominee' ORDER BY T2.votes DESC LIMIT 1;
Database: simpson_episodes
Question: In episodes aired in 2009, how many of them are credited to Sam Im for additional timer?
Evidence: in 2009 refers to air_date LIKE '2009%'; credited refers to credited = 'true'; Sam Im refers to person = 'Sam Im'; for additional timer refers to role = 'additional timer'
SQL: SELECT COUNT(*) FROM Episode AS T1 INNER JOIN Credit AS T2 ON T1.episode_id = T2.episode_id WHERE T2.credited = 'true' AND T2.person = 'Sam Im' AND SUBSTR(T1.air_date, 1, 4) = '2009' AND T2.role = 'additional timer';
Database: simpson_episodes
Question: List the title of the episode with stars greater than the 70% of average stars of all episodes.
Evidence: stars greater than the 70% of average stars refers to stars > multiply(avg(stars), 0.7)
SQL: SELECT DISTINCT T1.title FROM Episode AS T1 INNER JOIN Vote AS T2 ON T2.episode_id = T1.episode_id WHERE T2.stars > 0.7 * ( SELECT AVG(stars) FROM Vote );
Database: simpson_episodes
Question: In year 2009, what is the percentage of the episode titled by "Gone Maggie Gone" being nominated?
Evidence: being nominated refers to result = 'Nominee'; percentage = divide(count(result = 'Nominee'), count(result)) * 100%
SQL: SELECT CAST((SUM(CASE WHEN T1.result = 'Nominee' THEN 1 ELSE 0 END) - SUM(CASE WHEN T1.result = 'Winner' THEN 1 ELSE 0 END)) AS REAL) * 100 / COUNT(T1.result) FROM Award AS T1 INNER JOIN Episode AS T2 ON T1.episode_id = T2.episode_id WHERE T2.title = 'Gone Maggie Gone' AND T1.year = 2009;
Database: student_loan
Question: How many students have never been absent from school?
Evidence: have never been absent refers to `month` = 0;
SQL: SELECT COUNT(name) FROM longest_absense_from_school WHERE `month` = 0
Database: student_loan
Question: For the students who have been absent from school for the longest time, how many months have they been absent?
Evidence: absent from school for the longest time refers to MAX(month)
SQL: SELECT MAX(month) FROM longest_absense_from_school
Database: student_loan
Question: How many students belong to the navy department?
Evidence: belong to the navy department refers to organ = 'navy';
SQL: SELECT COUNT(name) FROM enlist WHERE organ = 'navy'
Database: student_loan
Question: Among the students that have been absent from school for more than 5 months, how many of them are male?
Evidence: absent from school for more than 5 months refers to `month`  > = 5;
SQL: SELECT COUNT(T1.name) FROM longest_absense_from_school AS T1 INNER JOIN male AS T2 ON T1.`name` = T2.`name` WHERE T1.`month` >= 5
Database: student_loan
Question: Please list the names of the male students that belong to the navy department.
Evidence: belong to the navy department refers to organ = 'navy';
SQL: SELECT T1.name FROM enlist AS T1 INNER JOIN male AS T2 ON T1.`name` = T2.`name` WHERE T1.organ = 'navy'
Database: student_loan
Question: Among the students that have filed for bankruptcy, how many of them have been absent from school for over 5 months?
Evidence: absent from school for over 5 months refers to `month` > 5;
SQL: SELECT COUNT(T1.name) FROM filed_for_bankrupcy AS T1 INNER JOIN longest_absense_from_school AS T2 ON T1.`name` = T2.`name` WHERE T2.`month` > 5
Database: student_loan
Question: Among the students from the navy department, how many of them have payment due?
Evidence: from the navy department refers to organ = 'navy'; have payment due refers to bool = 'pos';
SQL: SELECT COUNT(T1.name) FROM enlist AS T1 INNER JOIN no_payment_due AS T2 ON T1.`name` = T2.`name` WHERE T1.organ = 'navy' AND T2.bool = 'pos'
Database: student_loan
Question: Please list the male students that are disabled and have filed for bankruptcy.
Evidence: male students that are disabled and have filed for bankruptcy refers to name that appeared in all three male, disabled and filed_for_bankrupcy tables.
SQL: SELECT T1.name, T2.name, T3.name FROM disabled AS T1 INNER JOIN male AS T2 ON T1.`name` = T2.`name` INNER JOIN filed_for_bankrupcy AS T3 ON T1.`name` = T3.`name`
Database: student_loan
Question: How many female students are disabled?
Evidence: females students are disabled refers to name that appeared in both disabled and male tables
SQL: SELECT COUNT(name) FROM disabled WHERE name NOT IN ( SELECT name FROM male )