problem
stringlengths
121
422
db_id
stringclasses
69 values
solution
stringlengths
23
804
Write SQL query to solve given problem: Which school is student829 enrolled in?. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT school FROM enrolled WHERE name = 'student829'
Write SQL query to solve given problem: How many months has student217 been absent?. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT month FROM longest_absense_from_school WHERE name = 'student217'
Write SQL query to solve given problem: List all students that have been absent for 6 months.. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT name FROM longest_absense_from_school WHERE `month` = 6
Write SQL query to solve given problem: Which organization did student285 enlist?. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT organ FROM enlist WHERE name = 'student285'
Write SQL query to solve given problem: Is student281 disabled and which school is the student enrolled in?. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT T2.name, T1.school FROM enrolled AS T1 INNER JOIN disabled AS T2 ON T1.`name` = T2.`name` WHERE T1.name = 'student281'
Write SQL query to solve given problem: List all students in the air force and which school they were enrolled at.. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT T1.name, T1.school FROM enrolled AS T1 INNER JOIN enlist AS T2 ON T1.`name` = T2.`name` WHERE T2.organ = 'air_force'
Write SQL query to solve given problem: List 10 students that have no due payments and are not males.. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT T1.name FROM no_payment_due AS T1 INNER JOIN person AS T2 ON T1.`name` = T2.`name` WHERE T2.`name` NOT IN ( SELECT name FROM male ) AND T1.bool = 'neg'
Write SQL query to solve given problem: Name 5 students with due payments that are enlisted alongside which organization they were enlisted.. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT T2.organ, T1.name FROM no_payment_due AS T1 INNER JOIN enlist AS T2 ON T1.`name` = T2.`name` WHERE T1.bool = 'pos' LIMIT 5
Write SQL query to solve given problem: Name all disabled students that are enrolled in SMC.. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT T2.name FROM enrolled AS T1 INNER JOIN disabled AS T2 ON T1.`name` = T2.`name` WHERE T1.school = 'smc'
Write SQL query to solve given problem: Which students that filed for bankruptcy are also in the foreign legion?. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT T2.name FROM enlist AS T1 INNER JOIN filed_for_bankrupcy AS T2 ON T1.`name` = T2.`name` WHERE T1.organ = 'foreign_legion'
Write SQL query to solve given problem: How many male students have no due payments?. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT COUNT(T1.name) FROM no_payment_due AS T1 INNER JOIN male AS T2 ON T1.name = T2.name WHERE T1.bool = 'neg'
Write SQL query to solve given problem: Which students that are in the marines have been absent for 6 months?. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT T1.name FROM longest_absense_from_school AS T1 INNER JOIN enlist AS T2 ON T1.`name` = T2.`name` WHERE T2.organ = 'marines' AND T1.`month` = 6
Write SQL query to solve given problem: How many students from SMC are unemployed?. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT T2.name FROM enrolled AS T1 INNER JOIN unemployed AS T2 ON T1.`name` = T2.`name` WHERE T1.school = 'smc'
Write SQL query to solve given problem: How many unemployed students are there that have been absent for 6 months?. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT T1.name FROM longest_absense_from_school AS T1 INNER JOIN unemployed AS T2 ON T1.`name` = T2.name WHERE T1.`month` = 6
Write SQL query to solve given problem: Count the number of students from UCSD enlisted in the peace corps.. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT COUNT(T1.name) FROM enlist AS T1 INNER JOIN enrolled AS T2 ON T1.`name` = T2.`name` WHERE T2.school = 'ucsd' AND T1.organ = 'peace_corps'
Write SQL query to solve given problem: Student21 is enlisted in which organization and has the student been absent?. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT T2.month, T1.organ FROM enlist AS T1 INNER JOIN longest_absense_from_school AS T2 ON T1.`name` = T2.`name` WHERE T1.name = 'student21'
Write SQL query to solve given problem: What is the percentage ratio of students who are enlisted in foreign legions that have a due payment?. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT CAST(SUM(IIF(T1.bool = 'pos', 1, 0)) AS REAL) * 100 / SUM(IIF(T1.bool = 'neg', 1, 0)) FROM no_payment_due AS T1 INNER JOIN enlist AS T2 ON T1.`name` = T2.`name` WHERE T2.organ = 'foreign_legion'
Write SQL query to solve given problem: What percentage of students who enlisted in the navy make up the number of students enrolled in OCC?. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT CAST(SUM(IIF(T1.school = 'occ', 1.0, 0)) AS REAL) * 100 / COUNT(T1.name) FROM enrolled AS T1 INNER JOIN enlist AS T2 ON T1.`name` = T2.`name` WHERE T2.organ = 'navy'
Write SQL query to solve given problem: List out student IDs that have the longest absence duration from school.. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT name FROM longest_absense_from_school WHERE `month` = ( SELECT MAX(month) FROM longest_absense_from_school )
Write SQL query to solve given problem: What is the total number of students in the school?. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT COUNT(name) FROM person
Write SQL query to solve given problem: What is the longest students absence duration from school?. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT name, month FROM longest_absense_from_school WHERE `month` = ( SELECT MAX(month) FROM longest_absense_from_school )
Write SQL query to solve given problem: How many students were absence for 4 month?. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT COUNT(name) FROM longest_absense_from_school WHERE month = 4
Write SQL query to solve given problem: What is the number of unemployed and bankrupt students?. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT COUNT(T1.name) FROM unemployed AS T1 INNER JOIN filed_for_bankrupcy AS T2 ON T1.name = T2.name
Write SQL query to solve given problem: Does disable students join organization. If yes, please indicate the organization joined by the students.. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT DISTINCT T2.organ FROM disabled AS T1 INNER JOIN enlist AS T2 ON T1.`name` = T2.`name`
Write SQL query to solve given problem: How many unemployed and bankrupt students that have payment dues?. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT COUNT(T1.name) FROM unemployed AS T1 INNER JOIN filed_for_bankrupcy AS T2 ON T1.name = T2.name INNER JOIN no_payment_due AS T3 ON T2.name = T3.name WHERE T3.bool = 'pos'
Write SQL query to solve given problem: Please check if student 124 is disabled male.. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT IIF(T2.name IS NULL, 'female', 'male') FROM male AS T1 LEFT JOIN disabled AS T2 ON T1.name = T2.name WHERE T1.name = 'student124'
Write SQL query to solve given problem: What is the employment, disability, gender and school debt status for student180 and student117?. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT ( SELECT COUNT(name) FROM disabled WHERE name IN ('student180', 'student117') ), ( SELECT COUNT(name) FROM unemployed WHERE name IN ('student180', 'student117') ), ( SELECT COUNT(name) FROM male WHERE name IN ('student180', 'student117') ), ( SELECT COUNT(name) FROM no_payment_due WHERE name IN ('student180', 'student117'))
Write SQL query to solve given problem: How many female students joined a marines and air force organization?. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT COUNT(name) FROM enlist WHERE organ IN ('marines', 'air_force') AND name NOT IN ( SELECT name FROM male )
Write SQL query to solve given problem: List out the organization joined and school enrolled by student27, student17 and student101?. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT T1.school, T2.organ FROM enrolled AS T1 INNER JOIN enlist AS T2 ON T1.`name` = T2.`name` WHERE T1.`name` IN ('student27,student17,studetn101')
Write SQL query to solve given problem: What is the ratio of disable female to male students?. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT CAST(SUM(IIF(T2.name IS NULL, 1, 0)) AS REAL) * 100 / COUNT(T2.name) FROM disabled AS T1 LEFT JOIN male AS T2 ON T1.`name` = T2.`name`
Write SQL query to solve given problem: How many female students are not joining any of the organization?. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT COUNT(name) FROM person WHERE name NOT IN ( SELECT name FROM male ) AND name NOT IN ( SELECT name FROM enrolled )
Write SQL query to solve given problem: List out all bankrupt students that are able to make payment before due?. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT T1.name FROM filed_for_bankrupcy AS T1 INNER JOIN no_payment_due AS T2 ON T1.name = T2.name WHERE T2.bool = 'neg'
Write SQL query to solve given problem: What is the average absence period of a student?. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT AVG(month) FROM longest_absense_from_school
Write SQL query to solve given problem: What is the average of absence for an employed students?. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT AVG(month) FROM longest_absense_from_school WHERE name NOT IN ( SELECT name FROM unemployed )
Write SQL query to solve given problem: What is the average absence period of a disabled student?. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT AVG(T1.month) FROM longest_absense_from_school AS T1 INNER JOIN disabled AS T2 ON T1.name = T2.name
Write SQL query to solve given problem: Which organization does student 313 belong to?. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT organ FROM enlist WHERE name = 'studenT113'
Write SQL query to solve given problem: How many students enlisted in the fire-department?. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT COUNT(name) FROM enlist WHERE organ = 'fire_department'
Write SQL query to solve given problem: How many students who have never been absent from school?. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT COUNT(name) FROM longest_absense_from_school WHERE month = 0
Write SQL query to solve given problem: How many students have been absent above 2 months?. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT COUNT(name) FROM longest_absense_from_school WHERE month > 2
Write SQL query to solve given problem: State the number of students do not have payment due.. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT COUNT(name) FROM no_payment_due WHERE bool = 'neg'
Write SQL query to solve given problem: Give the number of students who have payment due.. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT COUNT(name) FROM no_payment_due WHERE bool = 'pos'
Write SQL query to solve given problem: Mention the name of disabled students who have never been absent from school.. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT T1.name FROM disabled AS T1 INNER JOIN longest_absense_from_school AS T2 ON T1.name = T2.name WHERE T2.month = 0
Write SQL query to solve given problem: How many unemployed students are enlisted in the navy organization?. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT COUNT(T1.name) FROM unemployed AS T1 INNER JOIN enlist AS T2 ON T1.name = T2.name WHERE T2.organ = 'navy'
Write SQL query to solve given problem: Count the number of male students who belong to foreign legion.. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT COUNT(T1.name) FROM male AS T1 INNER JOIN enlist AS T2 ON T1.name = T2.name WHERE T2.organ = 'foreign_legion'
Write SQL query to solve given problem: List out the number of female students who enlisted in the air force.. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT COUNT(name) FROM enlist WHERE organ = 'air_force' AND name NOT IN ( SELECT name FROM male )
Write SQL query to solve given problem: State name of disabled students who have the longest duration of absense from school.. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT T1.name FROM disabled AS T1 INNER JOIN longest_absense_from_school AS T2 ON T1.name = T2.name ORDER BY T2.month DESC LIMIT 1
Write SQL query to solve given problem: State the unemployed students who enlisted in marines.. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT T1.name FROM unemployed AS T1 INNER JOIN enlist AS T2 ON T1.name = T2.name WHERE T2.organ = 'marines'
Write SQL query to solve given problem: Calculate the average duration of absense of disabled students.. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT AVG(T1.month) FROM longest_absense_from_school AS T1 INNER JOIN disabled AS T2 ON T1.name = T2.name
Write SQL query to solve given problem: What is the percentage of unemployed students who have been absent for 5 months from school?. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT CAST(SUM(IIF(T1.month > 5, 1, 0)) AS REAL) * 100 / COUNT(T1.month) FROM longest_absense_from_school AS T1 INNER JOIN unemployed AS T2 ON T1.name = T2.name
Write SQL query to solve given problem: How many unemployed disabled students have been absent for 8 months from school?. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT COUNT(T1.name) FROM longest_absense_from_school AS T1 INNER JOIN unemployed AS T2 ON T1.name = T2.name INNER JOIN disabled AS T3 ON T2.name = T3.name WHERE T1.month = 8
Write SQL query to solve given problem: State name of unemployed students who have the longest duration of absense from school.. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT T1.name FROM longest_absense_from_school AS T1 INNER JOIN unemployed AS T2 ON T1.name = T2.name ORDER BY T1.month DESC LIMIT 1
Write SQL query to solve given problem: Mention the name of unemployed students who have never been absent from school.. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT T1.name FROM longest_absense_from_school AS T1 INNER JOIN unemployed AS T2 ON T1.name = T2.name WHERE T1.month = 0
Write SQL query to solve given problem: How many disabled students have been absent for 3 months from school?. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT COUNT(T1.name) FROM longest_absense_from_school AS T1 INNER JOIN disabled AS T2 ON T1.name = T2.name WHERE T1.month = 3
Write SQL query to solve given problem: Mention the name of students who filed for bankruptcy and have never been absent from school.. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT T1.name FROM longest_absense_from_school AS T1 INNER JOIN filed_for_bankrupcy AS T2 ON T1.name = T2.name WHERE T1.month = 0
Write SQL query to solve given problem: State name of students who filed for bankruptcy and have the longest duration of absense from school.. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT T1.name FROM longest_absense_from_school AS T1 INNER JOIN filed_for_bankrupcy AS T2 ON T1.name = T2.name ORDER BY T1.month DESC LIMIT 1
Write SQL query to solve given problem: What is the gender of student1000?. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT IIF(T.result = 0, 'female', 'male') AS re FROM ( SELECT COUNT(name) AS result FROM male WHERE name = 'studenT1000' ) T
Write SQL query to solve given problem: How many students are disabled?. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT COUNT(name) FROM disabled
Write SQL query to solve given problem: How many students have been absents for more than 6 months?. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT COUNT(name) FROM longest_absense_from_school WHERE month > 6
Write SQL query to solve given problem: Which students have absents the most?. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT name FROM longest_absense_from_school WHERE month = ( SELECT MAX(month) FROM longest_absense_from_school )
Write SQL query to solve given problem: How many students are enlisted in the army?. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT COUNT(name) FROM enlist WHERE organ = 'army'
Write SQL query to solve given problem: Find the average number of absences for each student.. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT AVG(month) FROM longest_absense_from_school
Write SQL query to solve given problem: Sum up the number of students enlisted in foreign legion, peace corps and army.. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT COUNT(name) FROM enlist WHERE organ IN ('army', 'peace_corps', 'foreign_legion')
Write SQL query to solve given problem: Among the students enlisted in marines, how many of them are disabled?. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT COUNT(T1.name) FROM enlist AS T1 INNER JOIN disabled AS T2 ON T1.name = T2.name WHERE T1.organ = 'marines'
Write SQL query to solve given problem: How many unemployed students still have payment due?. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT COUNT(T1.name) FROM unemployed AS T1 INNER JOIN no_payment_due AS T2 ON T1.name = T2.name WHERE T2.bool = 'pos'
Write SQL query to solve given problem: Which female students had never been absent?. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT T2.name FROM male AS T1 INNER JOIN longest_absense_from_school AS T2 ON T1.name <> T2.name WHERE T2.month = 0
Write SQL query to solve given problem: Which school has the highest number of disabled students?. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT T.school FROM ( SELECT T2.school, COUNT(T2.name) AS num FROM disabled AS T1 INNER JOIN enrolled AS T2 ON T1.name = T2.name GROUP BY T2.school ) T ORDER BY T.num DESC LIMIT 1
Write SQL query to solve given problem: List all the organisations of students who filed for bankcrupcy.. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT T2.organ FROM filed_for_bankrupcy AS T1 INNER JOIN enlist AS T2 ON T1.name = T2.name
Write SQL query to solve given problem: How many male students join more than one organization?. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT COUNT(T.a) FROM ( SELECT COUNT(DISTINCT T1.name) AS a, COUNT(T2.organ) AS num FROM male AS T1 INNER JOIN enlist AS T2 ON T1.name = T2.name GROUP BY T1.name ) T WHERE T.num > 1
Write SQL query to solve given problem: List all the navy students who are disabled.. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT T1.name FROM disabled AS T1 INNER JOIN enlist AS T2 ON T1.name = T2.name WHERE T2.organ = 'navy'
Write SQL query to solve given problem: How many SMC's students that absent for 7 months?. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT COUNT(T1.name) FROM enrolled AS T1 INNER JOIN longest_absense_from_school AS T2 ON T1.name = T2.name WHERE T1.school = 'smc' AND T2.month = 7
Write SQL query to solve given problem: List all the disabled female students.. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT T1.name FROM disabled AS T1 INNER JOIN male AS T2 ON T1.name <> T2.name
Write SQL query to solve given problem: Calculate the ratio between unemployed students and disabled students.. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT CAST(( SELECT COUNT(name) FROM unemployed ) AS REAL ) / ( SELECT COUNT(name) FROM disabled )
Write SQL query to solve given problem: Find the percentage of male students enlisted in the fire department.. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT CAST(COUNT(T2.name) AS REAL) * 100 / COUNT(T1.name) FROM enlist AS T1 LEFT JOIN male AS T2 ON T1.name = T2.name WHERE T1.organ = 'fire_department'
Write SQL query to solve given problem: How many students has the longest absense from school for 5 months?. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT COUNT(name) FROM longest_absense_from_school WHERE month = 5
Write SQL query to solve given problem: How many students are enlisted in the Army organization?. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT COUNT(name) FROM enlist WHERE organ = 'army'
Write SQL query to solve given problem: How many students are enrolled in UCLA school?. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT COUNT(name) FROM enrolled WHERE school = 'ucla'
Write SQL query to solve given problem: List at least 5 students who has the longest absense from schoool?. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT name FROM longest_absense_from_school ORDER BY month DESC LIMIT 5
Write SQL query to solve given problem: How many of the students joined two organization?. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT COUNT(name) FROM enlist WHERE organ >= 2
Write SQL query to solve given problem: How many students are enlisted in the Navy organization?. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT COUNT(name) FROM enlist WHERE organ = 'navy'
Write SQL query to solve given problem: How many male stuents do not have payment due?. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT COUNT(T1.name) FROM male AS T1 INNER JOIN no_payment_due AS T2 ON T1.name = T2.name WHERE T2.bool = 'neg'
Write SQL query to solve given problem: How many students are enlisted in the Peace Corps organization are enrolled in UCSD school?. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT COUNT(T1.name) FROM enlist AS T1 INNER JOIN enrolled AS T2 ON T1.name = T2.name WHERE T1.organ = 'peace_corps' AND T2.school = 'ucsd'
Write SQL query to solve given problem: Among the unemployed students, how many of them have no payment due?. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT COUNT(T1.name) FROM unemployed AS T1 INNER JOIN no_payment_due AS T2 ON T1.name = T2.name WHERE T2.bool = 'neg'
Write SQL query to solve given problem: How many female students have no payment due?. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT COUNT(name) FROM no_payment_due WHERE name NOT IN ( SELECT name FROM male )
Write SQL query to solve given problem: How many unemployed students have never been absent?. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT COUNT(T2.name) FROM longest_absense_from_school AS T1 INNER JOIN unemployed AS T2 ON T2.name = T1.name WHERE T1.month = 0
Write SQL query to solve given problem: List at least 10 students who have no payment due and are enlisted in Fire Department organization.. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT T1.name FROM no_payment_due AS T1 INNER JOIN enlist AS T2 ON T2.name = T1.name WHERE T1.bool = 'neg' AND T2.organ = 'fire_department' LIMIT 10
Write SQL query to solve given problem: How many female students are enlisted in the Navy organization?. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT COUNT(name) FROM enlist WHERE organ = 'navy' AND name NOT IN ( SELECT name FROM male )
Write SQL query to solve given problem: How many unemployed students are enlisted in the Army organization?. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT COUNT(T1.name) FROM enlist AS T1 INNER JOIN unemployed AS T2 ON T2.name = T1.name WHERE T1.organ = 'army'
Write SQL query to solve given problem: How many unemployed students have payment due?. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT COUNT(T1.name) FROM no_payment_due AS T1 INNER JOIN unemployed AS T2 ON T2.name = T1.name WHERE T1.bool = 'pos'
Write SQL query to solve given problem: List at least 5 students who have payment due and are enlisted in Peace Corps organization?. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT T1.name FROM no_payment_due AS T1 INNER JOIN enlist AS T2 ON T2.name = T1.name WHERE T2.organ = 'peace_corps' AND T1.bool = 'pos' LIMIT 5
Write SQL query to solve given problem: How many disabled students are female?. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT COUNT(name) FROM disabled WHERE name NOT IN ( SELECT name FROM male )
Write SQL query to solve given problem: How many disabled students have payment due?. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT COUNT(T1.name) FROM disabled AS T1 INNER JOIN no_payment_due AS T2 ON T2.name = T1.name WHERE T2.bool = 'pos'
Write SQL query to solve given problem: Calculate the average number of female students who are disabled and who joined Foreign Legion organization.. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT CAST(SUM(IIF(T3.name IS NULL, 1, 0)) AS REAL) / COUNT(T1.name) FROM disabled AS T1 INNER JOIN enlist AS T2 ON T1.name = T2.name LEFT JOIN male AS T3 ON T2.name = T3.name WHERE T2.organ = 'foreign_legion'
Write SQL query to solve given problem: Calculate the ratio in percentage between the average number of female and male students who joined Fire Department organization.. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT CAST(SUM(IIF(T2.name IS NULL, 1, 0)) AS REAL) * 100 / COUNT(T1.name), CAST(SUM(IIF(T2.name IS NOT NULL, 1, 0)) AS REAL) * 100 / COUNT(T1.name) FROM enlist AS T1 LEFT JOIN male AS T2 ON T2.name = T1.name WHERE T1.organ = 'fire_department'
Write SQL query to solve given problem: How many students enlisted in the navy?. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT COUNT(name) FROM enlist WHERE organ = 'navy'
Write SQL query to solve given problem: Calculate the percentage of students who have never been absent.. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT CAST(SUM(IIF(month = 0, 1, 0)) AS REAL) * 100 / COUNT(name) FROM longest_absense_from_school
Write SQL query to solve given problem: What is the ratio of students who have payment due and those who do not have payment due?. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT CAST(SUM(IIF(`bool` = 'pos', 1, 0)) AS REAL) / SUM(IIF(`bool` = 'neg', 1, 0)) FROM no_payment_due
Write SQL query to solve given problem: Provide the students' names and schools who enrolled for 15 months.. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT name, school FROM enrolled WHERE month = 15
Write SQL query to solve given problem: Calculate the average enlisted students per organization.. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT CAST(COUNT(NAME) AS REAL) * 100 / COUNT(DISTINCT organ) FROM enlist
Write SQL query to solve given problem: List down the enrolled schools and duration of student214.. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT school, month FROM enrolled WHERE name = 'student214'
Write SQL query to solve given problem: Among all students, calculate the percentage of disabled students.. Keep the solution inside sql tag ```sql [SQL-Query] ```
student_loan
SELECT CAST(COUNT(T2.name) AS REAL) * 100 / COUNT(T1.name) FROM person AS T1 LEFT JOIN disabled AS T2 ON T2.name = T1.name