db_id
stringlengths
4
31
SQL
stringlengths
18
1.45k
input_sequence
stringlengths
148
11k
question
stringlengths
16
325
california_schools
select t2.website from satscores as t1 inner join schools as t2 on t1.cds = t2.cdscode where t1.numtsttakr between 2000 and 3000 and t2.county = 'los angeles'
Question: what are the webpages for the los angeles county school that has between 2,000 and 3,000 test takers? | Tables: frpm -> CDSCode, Academic Year, County Code, District Code, School Code, County Name, District Name, School Name, District Type, School Type, Educational Option Type, NSLP Provision Status, Charter ...
what are the webpages for the los angeles county school that has between 2,000 and 3,000 test takers?
california_schools
select avg(t1.numtsttakr) from satscores as t1 inner join schools as t2 on t1.cds = t2.cdscode where strftime('%y', t2.opendate) = '1980' and t2.county = 'fresno'
Question: what is the average number of test takers from fresno schools that opened between 1/1/1980 and 12/31/1980? | Tables: frpm -> CDSCode, Academic Year, County Code, District Code, School Code, County Name, District Name, School Name, District Type, School Type, Educational Option Type, NSLP Provision Status, Cha...
what is the average number of test takers from fresno schools that opened between 1/1/1980 and 12/31/1980?
california_schools
select t2.phone from satscores as t1 inner join schools as t2 on t1.cds = t2.cdscode where t2.district = 'fresno unified' and t1.avgscrread is not null order by t1.avgscrread asc limit 1
Question: what is the telephone number for the school with the lowest average score in reading in fresno unified? | Tables: frpm -> CDSCode, Academic Year, County Code, District Code, School Code, County Name, District Name, School Name, District Type, School Type, Educational Option Type, NSLP Provision Status, Charte...
what is the telephone number for the school with the lowest average score in reading in fresno unified?
california_schools
select t2.school from satscores as t1 inner join schools as t2 on t1.cds = t2.cdscode where t2.virtual = 'f' order by t1.avgscrread desc limit 5
Question: which exclusively virtual schools have the top 5 highest average reading scores? | Tables: frpm -> CDSCode, Academic Year, County Code, District Code, School Code, County Name, District Name, School Name, District Type, School Type, Educational Option Type, NSLP Provision Status, Charter School (Y/N), Charter...
which exclusively virtual schools have the top 5 highest average reading scores?
california_schools
select t2.edopsname from satscores as t1 inner join schools as t2 on t1.cds = t2.cdscode order by t1.avgscrmath desc limit 1
Question: what is the type of education offered in the school who scored the highest average in math? | Tables: frpm -> CDSCode, Academic Year, County Code, District Code, School Code, County Name, District Name, School Name, District Type, School Type, Educational Option Type, NSLP Provision Status, Charter School (Y/...
what is the type of education offered in the school who scored the highest average in math?
california_schools
select t1.avgscrmath, t2.county from satscores as t1 inner join schools as t2 on t1.cds = t2.cdscode where t1.avgscrmath is not null order by t1.avgscrmath + t1.avgscrread + t1.avgscrwrite asc limit 1
Question: what is the average math score of the school with the lowest average score for all subjects, and in which county is it located? | Tables: frpm -> CDSCode, Academic Year, County Code, District Code, School Code, County Name, District Name, School Name, District Type, School Type, Educational Option Type, NSLP ...
what is the average math score of the school with the lowest average score for all subjects, and in which county is it located?
california_schools
select t1.avgscrwrite, t2.city from satscores as t1 inner join schools as t2 on t1.cds = t2.cdscode order by t1.numge1500 desc limit 1
Question: what is the average writing score of the school who has the highest number of test takers whose total sat sscores are greater or equal to 1500? indicate the city to where the school is situated. | Tables: frpm -> CDSCode, Academic Year, County Code, District Code, School Code, County Name, District Name, Scho...
what is the average writing score of the school who has the highest number of test takers whose total sat sscores are greater or equal to 1500? indicate the city to where the school is situated.
california_schools
select t2.school, t1.avgscrwrite from satscores as t1 inner join schools as t2 on t1.cds = t2.cdscode where t2.admfname1 = 'ricci' and t2.admlname1 = 'ulrich'
Question: what is the average writing score of each of the schools managed by ricci ulrich? list the schools and the corresponding average writing scores. | Tables: frpm -> CDSCode, Academic Year, County Code, District Code, School Code, County Name, District Name, School Name, District Type, School Type, Educational O...
what is the average writing score of each of the schools managed by ricci ulrich? list the schools and the corresponding average writing scores.
california_schools
select t2.school from frpm as t1 inner join schools as t2 on t1.cdscode = t2.cdscode where t2.doc = 31 order by t1.`enrollment (k-12)` desc limit 1
Question: which state special schools have the highest number of enrollees from grades 1 through 12? | Tables: frpm -> CDSCode, Academic Year, County Code, District Code, School Code, County Name, District Name, School Name, District Type, School Type, Educational Option Type, NSLP Provision Status, Charter School (Y/N...
which state special schools have the highest number of enrollees from grades 1 through 12?
california_schools
select cast(count(school) as real) / 12 from schools where doc = 52 and county = 'alameda' and strftime('%y', opendate) = '1980'
Question: what is the monthly average number of schools that opened in alameda county under the jurisdiction of the elementary school district in 1980? | Tables: frpm -> CDSCode, Academic Year, County Code, District Code, School Code, County Name, District Name, School Name, District Type, School Type, Educational Opti...
what is the monthly average number of schools that opened in alameda county under the jurisdiction of the elementary school district in 1980?
california_schools
select cast(sum(case when doc = 54 then 1 else 0 end) as real) / sum(case when doc = 52 then 1 else 0 end) from schools where statustype = 'merged' and county = 'orange'
Question: what is the ratio of merged unified school district schools in orange county to merged elementary school district schools? | Tables: frpm -> CDSCode, Academic Year, County Code, District Code, School Code, County Name, District Name, School Name, District Type, School Type, Educational Option Type, NSLP Provi...
what is the ratio of merged unified school district schools in orange county to merged elementary school district schools?
california_schools
select distinct county, school, closeddate from schools where county = ( select county from schools where statustype = 'closed' group by county order by count(school) desc limit 1 ) and statustype = 'closed' and school is not null
Question: which different county has the most number of closed schools? please provide the name of each school as well as the closure date. | Tables: frpm -> CDSCode, Academic Year, County Code, District Code, School Code, County Name, District Name, School Name, District Type, School Type, Educational Option Type, NSL...
which different county has the most number of closed schools? please provide the name of each school as well as the closure date.
california_schools
select t2.mailstreet, t2.school from satscores as t1 inner join schools as t2 on t1.cds = t2.cdscode order by t1.avgscrmath desc limit 5, 1
Question: what is the postal street address for the school with the 6th highest math average? indicate the school's name. | Tables: frpm -> CDSCode, Academic Year, County Code, District Code, School Code, County Name, District Name, School Name, District Type, School Type, Educational Option Type, NSLP Provision Status...
what is the postal street address for the school with the 6th highest math average? indicate the school's name.
california_schools
select t2.mailstreet, t2.school from satscores as t1 inner join schools as t2 on t1.cds = t2.cdscode where t1.avgscrread is not null order by t1.avgscrread asc limit 1
Question: in which mailing street address can you find the school that has the lowest average score in reading? also give the school's name. | Tables: frpm -> CDSCode, Academic Year, County Code, District Code, School Code, County Name, District Name, School Name, District Type, School Type, Educational Option Type, NS...
in which mailing street address can you find the school that has the lowest average score in reading? also give the school's name.
california_schools
select count(t1.cds) from satscores as t1 inner join schools as t2 on t1.cds = t2.cdscode where t2.mailcity = 'lakeport' and (t1.avgscrread + t1.avgscrmath + t1.avgscrwrite) >= 1500
Question: what is the total number of schools whose total sat scores are greater or equal to 1500 whose mailing city is lakeport? | Tables: frpm -> CDSCode, Academic Year, County Code, District Code, School Code, County Name, District Name, School Name, District Type, School Type, Educational Option Type, NSLP Provisio...
what is the total number of schools whose total sat scores are greater or equal to 1500 whose mailing city is lakeport?
california_schools
select t1.numtsttakr from satscores as t1 inner join schools as t2 on t1.cds = t2.cdscode where t2.mailcity = 'fresno'
Question: how many test takers are there at the school/s whose mailing city address is in fresno? | Tables: frpm -> CDSCode, Academic Year, County Code, District Code, School Code, County Name, District Name, School Name, District Type, School Type, Educational Option Type, NSLP Provision Status, Charter School (Y/N), ...
how many test takers are there at the school/s whose mailing city address is in fresno?
california_schools
select school, mailzip from schools where admfname1 = 'avetik' and admlname1 = 'atoian'
Question: please specify all of the schools and their related mailing zip codes that are under avetik atoian's administration. | Tables: frpm -> CDSCode, Academic Year, County Code, District Code, School Code, County Name, District Name, School Name, District Type, School Type, Educational Option Type, NSLP Provision S...
please specify all of the schools and their related mailing zip codes that are under avetik atoian's administration.
california_schools
select cast(sum(case when county = 'colusa' then 1 else 0 end) as real) / sum(case when county = 'humboldt' then 1 else 0 end) from schools where mailstate = 'ca'
Question: of the schools with a mailing state address in california, what is the ratio of the schools located in the county of colusa against the school located in the county of humboldt? | Tables: frpm -> CDSCode, Academic Year, County Code, District Code, School Code, County Name, District Name, School Name, District...
of the schools with a mailing state address in california, what is the ratio of the schools located in the county of colusa against the school located in the county of humboldt?
california_schools
select count(cdscode) from schools where city = 'san joaquin' and mailstate = 'ca' and statustype = 'active'
Question: of all the schools with a mailing state address in california, how many are active in san joaquin? | Tables: frpm -> CDSCode, Academic Year, County Code, District Code, School Code, County Name, District Name, School Name, District Type, School Type, Educational Option Type, NSLP Provision Status, Charter Sch...
of all the schools with a mailing state address in california, how many are active in san joaquin?
california_schools
select t2.phone, t2.ext from satscores as t1 inner join schools as t2 on t1.cds = t2.cdscode order by t1.avgscrwrite desc limit 332, 1
Question: what is the phone number and extension number for the school that had the 333rd highest average writing score? | Tables: frpm -> CDSCode, Academic Year, County Code, District Code, School Code, County Name, District Name, School Name, District Type, School Type, Educational Option Type, NSLP Provision Status,...
what is the phone number and extension number for the school that had the 333rd highest average writing score?
california_schools
select phone, ext, school from schools where zip = '95203-3704'
Question: what is the phone number and extension number for the school with the zip code 95203-3704? indicate the school's name. | Tables: frpm -> CDSCode, Academic Year, County Code, District Code, School Code, County Name, District Name, School Name, District Type, School Type, Educational Option Type, NSLP Provision...
what is the phone number and extension number for the school with the zip code 95203-3704? indicate the school's name.
california_schools
select website from schools where (admfname1 = 'mike' and admlname1 = 'larson') or (admfname1 = 'dante' and admlname1 = 'alvarez')
Question: what is the website for the schools under the administrations of mike larson and dante alvarez? | Tables: frpm -> CDSCode, Academic Year, County Code, District Code, School Code, County Name, District Name, School Name, District Type, School Type, Educational Option Type, NSLP Provision Status, Charter School...
what is the website for the schools under the administrations of mike larson and dante alvarez?
california_schools
select website from schools where county = 'san joaquin' and virtual = 'p' and charter = 1
Question: what are the websites for all the partially virtual chartered schools located in san joaquin? | Tables: frpm -> CDSCode, Academic Year, County Code, District Code, School Code, County Name, District Name, School Name, District Type, School Type, Educational Option Type, NSLP Provision Status, Charter School (...
what are the websites for all the partially virtual chartered schools located in san joaquin?
california_schools
select count(school) from schools where doc = 52 and charter = 1 and city = 'hickman'
Question: how many chartered schools located in the city of hickman are owned by the elementary school district? | Tables: frpm -> CDSCode, Academic Year, County Code, District Code, School Code, County Name, District Name, School Name, District Type, School Type, Educational Option Type, NSLP Provision Status, Charter...
how many chartered schools located in the city of hickman are owned by the elementary school district?
california_schools
select count(t2.school) from frpm as t1 inner join schools as t2 on t1.cdscode = t2.cdscode where t2.county = 'los angeles' and t2.charter = 0 and cast(t1.`free meal count (k-12)` as real) * 100 / t1.`enrollment (k-12)` < 0.18
Question: what is the total number of non-chartered schools in the county of los angeles with a percent (%) of eligible free meals for grades 1 through 12 that is less than 0.18%? | Tables: frpm -> CDSCode, Academic Year, County Code, District Code, School Code, County Name, District Name, School Name, District Type, S...
what is the total number of non-chartered schools in the county of los angeles with a percent (%) of eligible free meals for grades 1 through 12 that is less than 0.18%?
california_schools
select admfname1, admlname1, school, city from schools where charter = 1 and charternum = '00d2'
Question: in chartered schools with charter number 00d2, what are the names of all the administrators? include the name of the school and the city to which it belongs | Tables: frpm -> CDSCode, Academic Year, County Code, District Code, School Code, County Name, District Name, School Name, District Type, School Type, E...
in chartered schools with charter number 00d2, what are the names of all the administrators? include the name of the school and the city to which it belongs
california_schools
select count(*) from schools where charternum = '00d4' and mailcity = 'hickman'
Question: what is the total number of schools with a mailing city in hickman belonging to the charter number 00d4? | Tables: frpm -> CDSCode, Academic Year, County Code, District Code, School Code, County Name, District Name, School Name, District Type, School Type, Educational Option Type, NSLP Provision Status, Chart...
what is the total number of schools with a mailing city in hickman belonging to the charter number 00d4?
california_schools
select cast(sum(case when fundingtype = 'locally funded' then 1 else 0 end) as real) * 100 / sum(case when fundingtype != 'locally funded' then 1 else 0 end) from schools where county = 'santa clara' and charter = 1
Question: what is the ratio in percentage of santa clara county schools that are locally funded compared to all other types of charter school funding? | Tables: frpm -> CDSCode, Academic Year, County Code, District Code, School Code, County Name, District Name, School Name, District Type, School Type, Educational Optio...
what is the ratio in percentage of santa clara county schools that are locally funded compared to all other types of charter school funding?
california_schools
select count(school) from schools where strftime('%y', opendate) between '2000' and '2005' and county = 'stanislaus' and fundingtype = 'directly funded'
Question: between 1/1/2000 to 12/31/2005, how many directly funded schools opened in the county of stanislaus? | Tables: frpm -> CDSCode, Academic Year, County Code, District Code, School Code, County Name, District Name, School Name, District Type, School Type, Educational Option Type, NSLP Provision Status, Charter S...
between 1/1/2000 to 12/31/2005, how many directly funded schools opened in the county of stanislaus?
california_schools
select count(school) from schools where strftime('%y', closeddate) = '1989' and city = 'san francisco' and doctype = 'community college district'
Question: what is the total amount of community college district closure in 1989 in the city of san francisco? | Tables: frpm -> CDSCode, Academic Year, County Code, District Code, School Code, County Name, District Name, School Name, District Type, School Type, Educational Option Type, NSLP Provision Status, Charter S...
what is the total amount of community college district closure in 1989 in the city of san francisco?
california_schools
select county from schools where strftime('%y', closeddate) between '1980' and '1989' and statustype = 'closed' and soc = 11 group by county order by count(school) desc limit 1
Question: which county reported the most number of school closure in the 1980s with school wonership code belonging to youth authority facilities (cea)? | Tables: frpm -> CDSCode, Academic Year, County Code, District Code, School Code, County Name, District Name, School Name, District Type, School Type, Educational Opt...
which county reported the most number of school closure in the 1980s with school wonership code belonging to youth authority facilities (cea)?
california_schools
select ncesdist from schools where soc = 31
Question: please provide the national center for educational statistics school district identification number for all schools with a school ownership code that are part of the state special schools. | Tables: frpm -> CDSCode, Academic Year, County Code, District Code, School Code, County Name, District Name, School Nam...
please provide the national center for educational statistics school district identification number for all schools with a school ownership code that are part of the state special schools.
california_schools
select count(school) from schools where (statustype = 'closed' or statustype = 'active') and county = 'alpine'
Question: how many active and closed district community day schools are there in the county of alpine? | Tables: frpm -> CDSCode, Academic Year, County Code, District Code, School Code, County Name, District Name, School Name, District Type, School Type, Educational Option Type, NSLP Provision Status, Charter School (Y...
how many active and closed district community day schools are there in the county of alpine?
california_schools
select t1.`district code` from frpm as t1 inner join schools as t2 on t1.cdscode = t2.cdscode where t2.city = 'fresno' and t2.magnet = 0
Question: what is the district code for the school that does not offer a magnet program in the city of fresno? | Tables: frpm -> CDSCode, Academic Year, County Code, District Code, School Code, County Name, District Name, School Name, District Type, School Type, Educational Option Type, NSLP Provision Status, Charter S...
what is the district code for the school that does not offer a magnet program in the city of fresno?
california_schools
select t1.`enrollment (ages 5-17)` from frpm as t1 inner join schools as t2 on t1.cdscode = t2.cdscode where t2.edopscode = 'sss' and t2.city = 'fremont' and t1.`academic year` between 2014 and 2015
Question: how many students from the ages of 5 to 17 are enrolled at the state special school school in fremont for the 2014-2015 academic year? | Tables: frpm -> CDSCode, Academic Year, County Code, District Code, School Code, County Name, District Name, School Name, District Type, School Type, Educational Option Type...
how many students from the ages of 5 to 17 are enrolled at the state special school school in fremont for the 2014-2015 academic year?
california_schools
select t1.`frpm count (ages 5-17)` from frpm as t1 inner join schools as t2 on t1.cdscode = t2.cdscode where t2.mailstreet = 'po box 1040' and t2.soctype = 'youth authority facilities'
Question: what is the free or reduced price meal count for ages 5 to 17 in the youth authority school with a mailing street address of po box 1040? | Tables: frpm -> CDSCode, Academic Year, County Code, District Code, School Code, County Name, District Name, School Name, District Type, School Type, Educational Option T...
what is the free or reduced price meal count for ages 5 to 17 in the youth authority school with a mailing street address of po box 1040?
california_schools
select min(t1.`low grade`) from frpm as t1 inner join schools as t2 on t1.cdscode = t2.cdscode where t2.ncesdist = 613360 and t2.edopscode = 'specon'
Question: what is the lowest grade for the district special education consortia school with national center for educational statistics school district identification number of 613360? | Tables: frpm -> CDSCode, Academic Year, County Code, District Code, School Code, County Name, District Name, School Name, District Typ...
what is the lowest grade for the district special education consortia school with national center for educational statistics school district identification number of 613360?
california_schools
select t2.eilname, t2.school from frpm as t1 inner join schools as t2 on t1.cdscode = t2.cdscode where t1.`nslp provision status` = 'breakfast provision 2' and t1.`county code` = 37
Question: what is the educational level name for the schools with breakfast provision 2 in county code 37? indicate the name of the school. | Tables: frpm -> CDSCode, Academic Year, County Code, District Code, School Code, County Name, District Name, School Name, District Type, School Type, Educational Option Type, NSL...
what is the educational level name for the schools with breakfast provision 2 in county code 37? indicate the name of the school.
california_schools
select t2.city from frpm as t1 inner join schools as t2 on t1.cdscode = t2.cdscode where t1.`nslp provision status` = 'lunch provision 2' and t2.county = 'merced' and t1.`low grade` = 9 and t1.`high grade` = 12 and t2.eilcode = 'hs'
Question: what is the city location of the high school level school with lunch provision 2 whose lowest grade is 9 and the highest grade is 12 in the county of merced? | Tables: frpm -> CDSCode, Academic Year, County Code, District Code, School Code, County Name, District Name, School Name, District Type, School Type, ...
what is the city location of the high school level school with lunch provision 2 whose lowest grade is 9 and the highest grade is 12 in the county of merced?
california_schools
select t2.school, t1.`frpm count (ages 5-17)` * 100 / t1.`enrollment (ages 5-17)` from frpm as t1 inner join schools as t2 on t1.cdscode = t2.cdscode where t2.county = 'los angeles' and t2.gsserved = 'k-9'
Question: which schools served a grade span of kindergarten to 9th grade in the county of los angeles and what is its percent (%) eligible frpm (ages 5-17)? | Tables: frpm -> CDSCode, Academic Year, County Code, District Code, School Code, County Name, District Name, School Name, District Type, School Type, Educational...
which schools served a grade span of kindergarten to 9th grade in the county of los angeles and what is its percent (%) eligible frpm (ages 5-17)?
california_schools
select gsserved from schools where city = 'adelanto' group by gsserved order by count(gsserved) desc limit 1
Question: what is the most common type of grade span served in the city of adelanto? | Tables: frpm -> CDSCode, Academic Year, County Code, District Code, School Code, County Name, District Name, School Name, District Type, School Type, Educational Option Type, NSLP Provision Status, Charter School (Y/N), Charter Schoo...
what is the most common type of grade span served in the city of adelanto?
california_schools
select county, count(virtual) from schools where (county = 'san diego' or county = 'santa barbara') and virtual = 'f' group by county order by count(virtual) desc limit 1
Question: between san diego and santa barbara, which county offers the most number of schools that does not offer physical building? indicate the amount. | Tables: frpm -> CDSCode, Academic Year, County Code, District Code, School Code, County Name, District Name, School Name, District Type, School Type, Educational Op...
between san diego and santa barbara, which county offers the most number of schools that does not offer physical building? indicate the amount.
california_schools
select t1.`school type`, t1.`school name`, t2.latitude from frpm as t1 inner join schools as t2 on t1.cdscode = t2.cdscode order by t2.latitude desc limit 1
Question: what is the school type of the school with the highest latitude? indicate the name of the school as well as the latitude coordinates. | Tables: frpm -> CDSCode, Academic Year, County Code, District Code, School Code, County Name, District Name, School Name, District Type, School Type, Educational Option Type,...
what is the school type of the school with the highest latitude? indicate the name of the school as well as the latitude coordinates.
california_schools
select t2.city, t1.`low grade`, t1.`school name` from frpm as t1 inner join schools as t2 on t1.cdscode = t2.cdscode where t2.state = 'ca' order by t2.latitude asc limit 1
Question: in which city can you find the school in the state of california with the lowest latitude coordinates and what is its lowest grade? indicate the school name. | Tables: frpm -> CDSCode, Academic Year, County Code, District Code, School Code, County Name, District Name, School Name, District Type, School Type, ...
in which city can you find the school in the state of california with the lowest latitude coordinates and what is its lowest grade? indicate the school name.
california_schools
select gsoffered from schools order by abs(longitude) desc limit 1
Question: what is the grade span offered in the school with the highest longitude? | Tables: frpm -> CDSCode, Academic Year, County Code, District Code, School Code, County Name, District Name, School Name, District Type, School Type, Educational Option Type, NSLP Provision Status, Charter School (Y/N), Charter School ...
what is the grade span offered in the school with the highest longitude?
california_schools
select t2.city, count(t2.cdscode) from frpm as t1 inner join schools as t2 on t1.cdscode = t2.cdscode where t2.magnet = 1 and t2.gsoffered = 'k-8' and t1.`nslp provision status` = 'multiple provision types' group by t2.city
Question: of the schools that offers a magnet program serving a grade span of kindergarten to 8th grade, how many offers multiple provision types? list the number of cities that offers a kindergarten to 8th grade span and indicate how many schools are there serving such grade span for each city. | Tables: frpm -> CDSCo...
of the schools that offers a magnet program serving a grade span of kindergarten to 8th grade, how many offers multiple provision types? list the number of cities that offers a kindergarten to 8th grade span and indicate how many schools are there serving such grade span for each city.
california_schools
select distinct t1.admfname1, t1.district from schools as t1 inner join ( select admfname1 from schools group by admfname1 order by count(admfname1) desc limit 2 ) as t2 on t1.admfname1 = t2.admfname1
Question: what are the two most common first names among the school administrators? indicate the district to which they administer. | Tables: frpm -> CDSCode, Academic Year, County Code, District Code, School Code, County Name, District Name, School Name, District Type, School Type, Educational Option Type, NSLP Provis...
what are the two most common first names among the school administrators? indicate the district to which they administer.
california_schools
select t1.`free meal count (k-12)` * 100 / t1.`enrollment (k-12)`, t1.`district code` from frpm as t1 inner join schools as t2 on t1.cdscode = t2.cdscode where t2.admfname1 = 'alusine'
Question: what is the percent (%) eligible free (k-12) in the school administered by an administrator whose first name is alusine. list the district code of the school. | Tables: frpm -> CDSCode, Academic Year, County Code, District Code, School Code, County Name, District Name, School Name, District Type, School Type,...
what is the percent (%) eligible free (k-12) in the school administered by an administrator whose first name is alusine. list the district code of the school.
california_schools
select admlname1, district, county, school from schools where charternum = '0040'
Question: what is the administrator's last name that oversees the school with charter number 40? indicate the district, the county where the school is situated, and the name of the school. | Tables: frpm -> CDSCode, Academic Year, County Code, District Code, School Code, County Name, District Name, School Name, Distric...
what is the administrator's last name that oversees the school with charter number 40? indicate the district, the county where the school is situated, and the name of the school.
california_schools
select t2.admemail1 from frpm as t1 inner join schools as t2 on t1.cdscode = t2.cdscode where t2.county = 'san bernardino' and t2.city = 'san bernardino' and t2.doc = 54 and strftime('%y', t2.opendate) between '2009' and '2010' and t2.soc = 62
Question: what is the e-mail address of the administrator of the school located in the san bernardino county, district of san bernardino city unified that opened between 1/1/2009 to 12/31/2010 whose school types are public intermediate/middle schools and unified scools? | Tables: frpm -> CDSCode, Academic Year, County ...
what is the e-mail address of the administrator of the school located in the san bernardino county, district of san bernardino city unified that opened between 1/1/2009 to 12/31/2010 whose school types are public intermediate/middle schools and unified scools?
california_schools
select t2.admemail1, t2.school from satscores as t1 inner join schools as t2 on t1.cds = t2.cdscode order by t1.numge1500 desc limit 1
Question: what is the administrator's email address for the school with the highest number of test takers who received sat scores of at least 1500?provide the name of the school. | Tables: frpm -> CDSCode, Academic Year, County Code, District Code, School Code, County Name, District Name, School Name, District Type, Sc...
what is the administrator's email address for the school with the highest number of test takers who received sat scores of at least 1500?provide the name of the school.
financial
select count(t1.district_id) from district as t1 inner join account as t2 on t1.district_id = t2.district_id where t1.a3 = 'east bohemia' and t2.frequency = 'poplatek po obratu'
Question: how many accounts who choose issuance after transaction are staying in east bohemia region? | Tables: account -> account_id, district_id, frequency, date. card -> card_id, disp_id, type, issued. client -> client_id, gender, birth_date, district_id. disp -> disp_id, client_id, account_id, type. district -> dis...
how many accounts who choose issuance after transaction are staying in east bohemia region?
financial
select count(t1.account_id) from account as t1 inner join loan as t2 on t1.account_id = t2.account_id inner join district as t3 on t1.district_id = t3.district_id where t3.a3 = 'prague'
Question: how many accounts who have region in prague are eligible for loans? | Tables: account -> account_id, district_id, frequency, date. card -> card_id, disp_id, type, issued. client -> client_id, gender, birth_date, district_id. disp -> disp_id, client_id, account_id, type. district -> district_id, A2, A3, A4, A5...
how many accounts who have region in prague are eligible for loans?
financial
select distinct iif(avg(a13) > avg(a12), '1996', '1995') from district
Question: the average unemployment ratio of 1995 and 1996, which one has higher percentage? | Tables: account -> account_id, district_id, frequency, date. card -> card_id, disp_id, type, issued. client -> client_id, gender, birth_date, district_id. disp -> disp_id, client_id, account_id, type. district -> district_id, ...
the average unemployment ratio of 1995 and 1996, which one has higher percentage?
financial
select distinct t2.district_id from client as t1 inner join district as t2 on t1.district_id = t2.district_id where t1.gender = 'f' and t2.a11 between 6000 and 10000
Question: list out the no. of districts that have female average salary is more than 6000 but less than 10000? | Tables: account -> account_id, district_id, frequency, date. card -> card_id, disp_id, type, issued. client -> client_id, gender, birth_date, district_id. disp -> disp_id, client_id, account_id, type. distri...
list out the no. of districts that have female average salary is more than 6000 but less than 10000?
financial
select count(t1.client_id) from client as t1 inner join district as t2 on t1.district_id = t2.district_id where t1.gender = 'm' and t2.a3 = 'north bohemia' and t2.a11 > 8000
Question: how many male customers who are living in north bohemia have average salary greater than 8000? | Tables: account -> account_id, district_id, frequency, date. card -> card_id, disp_id, type, issued. client -> client_id, gender, birth_date, district_id. disp -> disp_id, client_id, account_id, type. district -> ...
how many male customers who are living in north bohemia have average salary greater than 8000?
financial
select t1.account_id , ( select max(a11) - min(a11) from district ) from account as t1 inner join district as t2 on t1.district_id = t2.district_id where t2.district_id = ( select district_id from client where gender = 'f' order by birth_date asc limit 1 ) order by t2.a11 desc limit 1
Question: list out the account numbers of female clients who are oldest and has lowest average salary, calculate the gap between this lowest average salary with the highest average salary? | Tables: account -> account_id, district_id, frequency, date. card -> card_id, disp_id, type, issued. client -> client_id, gender,...
list out the account numbers of female clients who are oldest and has lowest average salary, calculate the gap between this lowest average salary with the highest average salary?
financial
select t1.account_id from account as t1 inner join district as t2 on t1.district_id = t2.district_id where t2.district_id = ( select district_id from client order by birth_date desc limit 1 ) order by t2.a11 desc limit 1
Question: list out the account numbers of clients who are youngest and have highest average salary? | Tables: account -> account_id, district_id, frequency, date. card -> card_id, disp_id, type, issued. client -> client_id, gender, birth_date, district_id. disp -> disp_id, client_id, account_id, type. district -> distr...
list out the account numbers of clients who are youngest and have highest average salary?
financial
select count(t1.account_id) from account as t1 inner join disp as t2 on t1.account_id = t2.account_id where t2.type = 'owner' and t1.frequency = 'poplatek tydne'
Question: how many customers who choose statement of weekly issuance are owner? | Tables: account -> account_id, district_id, frequency, date. card -> card_id, disp_id, type, issued. client -> client_id, gender, birth_date, district_id. disp -> disp_id, client_id, account_id, type. district -> district_id, A2, A3, A4, ...
how many customers who choose statement of weekly issuance are owner?
financial
select t2.client_id from account as t1 inner join disp as t2 on t1.account_id = t2.account_id where t1.frequency = 'poplatek po obratu' and t2.type = 'disponent'
Question: list out the clients who choose statement of issuance after transaction are disponent? | Tables: account -> account_id, district_id, frequency, date. card -> card_id, disp_id, type, issued. client -> client_id, gender, birth_date, district_id. disp -> disp_id, client_id, account_id, type. district -> district...
list out the clients who choose statement of issuance after transaction are disponent?
financial
select t2.account_id from loan as t1 inner join account as t2 on t1.account_id = t2.account_id where strftime('%y', t1.date) = '1997' and t2.frequency = 'poplatek tydne' order by t1.amount limit 1
Question: among the accounts who have approved loan date in 1997, list out the accounts that have the lowest approved amount and choose weekly issuance statement. | Tables: account -> account_id, district_id, frequency, date. card -> card_id, disp_id, type, issued. client -> client_id, gender, birth_date, district_id. ...
among the accounts who have approved loan date in 1997, list out the accounts that have the lowest approved amount and choose weekly issuance statement.
financial
select t1.account_id from loan as t1 inner join disp as t2 on t1.account_id = t2.account_id where strftime('%y', t1.date) = '1993' and t1.duration = 12 order by t1.amount desc limit 1
Question: among the accounts who have loan validity more than 12 months, list out the accounts that have the highest approved amount and have account opening date in 1993. | Tables: account -> account_id, district_id, frequency, date. card -> card_id, disp_id, type, issued. client -> client_id, gender, birth_date, dist...
among the accounts who have loan validity more than 12 months, list out the accounts that have the highest approved amount and have account opening date in 1993.
financial
select count(t2.client_id) from district as t1 inner join client as t2 on t1.district_id = t2.district_id where t2.gender = 'f' and strftime('%y', t2.birth_date) < '1950' and t1.a2 = 'slokolov'
Question: among the account opened, how many female customers who were born before 1950 and stayed in slokolov? | Tables: account -> account_id, district_id, frequency, date. card -> card_id, disp_id, type, issued. client -> client_id, gender, birth_date, district_id. disp -> disp_id, client_id, account_id, type. distr...
among the account opened, how many female customers who were born before 1950 and stayed in slokolov?
financial
select account_id from trans where strftime('%y', date) = '1995' order by date asc limit 1
Question: list out the accounts who have the earliest trading date in 1995 ? | Tables: account -> account_id, district_id, frequency, date. card -> card_id, disp_id, type, issued. client -> client_id, gender, birth_date, district_id. disp -> disp_id, client_id, account_id, type. district -> district_id, A2, A3, A4, A5,...
list out the accounts who have the earliest trading date in 1995 ?
financial
select distinct t2.account_id from trans as t1 inner join account as t2 on t1.account_id = t2.account_id where strftime('%y', t2.date) < '1997' and t1.amount > 3000
Question: state different accounts who have account opening date before 1997 and own an amount of money greater than 3000usd | Tables: account -> account_id, district_id, frequency, date. card -> card_id, disp_id, type, issued. client -> client_id, gender, birth_date, district_id. disp -> disp_id, client_id, account_id...
state different accounts who have account opening date before 1997 and own an amount of money greater than 3000usd
financial
select t2.client_id from client as t1 inner join disp as t2 on t1.client_id = t2.client_id inner join card as t3 on t2.disp_id = t3.disp_id where t3.issued = '1994-03-03'
Question: which client issued his/her card in 1994/3/3, give his/her client id. | Tables: account -> account_id, district_id, frequency, date. card -> card_id, disp_id, type, issued. client -> client_id, gender, birth_date, district_id. disp -> disp_id, client_id, account_id, type. district -> district_id, A2, A3, A4, ...
which client issued his/her card in 1994/3/3, give his/her client id.
financial
select t1.date from account as t1 inner join trans as t2 on t1.account_id = t2.account_id where t2.amount = 840 and t2.date = '1998-10-14'
Question: the transaction of 840 usd happened in 1998/10/14, when was this account opened? | Tables: account -> account_id, district_id, frequency, date. card -> card_id, disp_id, type, issued. client -> client_id, gender, birth_date, district_id. disp -> disp_id, client_id, account_id, type. district -> district_id, A...
the transaction of 840 usd happened in 1998/10/14, when was this account opened?
financial
select t1.district_id from account as t1 inner join loan as t2 on t1.account_id = t2.account_id where t2.date = '1994-08-25'
Question: there was a loan approved in 1994/8/25, where was that account opened, give the district id of the branch. | Tables: account -> account_id, district_id, frequency, date. card -> card_id, disp_id, type, issued. client -> client_id, gender, birth_date, district_id. disp -> disp_id, client_id, account_id, type. ...
there was a loan approved in 1994/8/25, where was that account opened, give the district id of the branch.
financial
select t2.amount from account as t1 inner join trans as t2 on t1.account_id = t2.account_id where t1.date = '1996-10-21' order by t2.amount desc limit 1
Question: what is the biggest amount of transaction that the client whose card was opened in 1996/10/21 made? | Tables: account -> account_id, district_id, frequency, date. card -> card_id, disp_id, type, issued. client -> client_id, gender, birth_date, district_id. disp -> disp_id, client_id, account_id, type. distric...
what is the biggest amount of transaction that the client whose card was opened in 1996/10/21 made?
financial
select t2.gender from district as t1 inner join client as t2 on t1.district_id = t2.district_id order by t1.a11 desc, t2.birth_date asc limit 1
Question: what is the gender of the oldest client who opened his/her account in the highest average salary branch? | Tables: account -> account_id, district_id, frequency, date. card -> card_id, disp_id, type, issued. client -> client_id, gender, birth_date, district_id. disp -> disp_id, client_id, account_id, type. di...
what is the gender of the oldest client who opened his/her account in the highest average salary branch?
financial
select t2.amount from loan as t1 inner join trans as t2 on t1.account_id = t2.account_id order by t1.amount desc, t2.date asc limit 1
Question: for the client who applied the biggest loan, what was his/her first amount of transaction after opened the account? | Tables: account -> account_id, district_id, frequency, date. card -> card_id, disp_id, type, issued. client -> client_id, gender, birth_date, district_id. disp -> disp_id, client_id, account_i...
for the client who applied the biggest loan, what was his/her first amount of transaction after opened the account?
financial
select count(t1.client_id) from client as t1 inner join district as t2 on t1.district_id = t2.district_id where t1.gender = 'f' and t2.a2 = 'jesenik'
Question: how many clients opened their accounts in jesenik branch were women? | Tables: account -> account_id, district_id, frequency, date. card -> card_id, disp_id, type, issued. client -> client_id, gender, birth_date, district_id. disp -> disp_id, client_id, account_id, type. district -> district_id, A2, A3, A4, A...
how many clients opened their accounts in jesenik branch were women?
financial
select t1.disp_id from disp as t1 inner join trans as t2 on t1.account_id = t2.account_id where t2.date = '1998-09-02' and t2.amount = 5100
Question: what is the disposition id of the client who made 5100 usd transaction in 1998/9/2? | Tables: account -> account_id, district_id, frequency, date. card -> card_id, disp_id, type, issued. client -> client_id, gender, birth_date, district_id. disp -> disp_id, client_id, account_id, type. district -> district_id...
what is the disposition id of the client who made 5100 usd transaction in 1998/9/2?
financial
select count(t2.account_id) from district as t1 inner join account as t2 on t1.district_id = t2.district_id where strftime('%y', t2.date) = '1996' and t1.a2 = 'litomerice'
Question: how many accounts were opened in litomerice in 1996? | Tables: account -> account_id, district_id, frequency, date. card -> card_id, disp_id, type, issued. client -> client_id, gender, birth_date, district_id. disp -> disp_id, client_id, account_id, type. district -> district_id, A2, A3, A4, A5, A6, A7, A8, A...
how many accounts were opened in litomerice in 1996?
financial
select t1.a2 from district as t1 inner join client as t2 on t1.district_id = t2.district_id where t2.birth_date = '1976-01-29' and t2.gender = 'f'
Question: for the female client who was born in 1976/1/29, which district did she opened her account? | Tables: account -> account_id, district_id, frequency, date. card -> card_id, disp_id, type, issued. client -> client_id, gender, birth_date, district_id. disp -> disp_id, client_id, account_id, type. district -> dis...
for the female client who was born in 1976/1/29, which district did she opened her account?
financial
select t3.birth_date from loan as t1 inner join account as t2 on t1.account_id = t2.account_id inner join client as t3 on t2.district_id = t3.district_id where t1.date = '1996-01-03' and t1.amount = 98832
Question: for the client who applied 98832 usd loan in 1996/1/3, when was his/her birthday? | Tables: account -> account_id, district_id, frequency, date. card -> card_id, disp_id, type, issued. client -> client_id, gender, birth_date, district_id. disp -> disp_id, client_id, account_id, type. district -> district_id, ...
for the client who applied 98832 usd loan in 1996/1/3, when was his/her birthday?
financial
select t1.account_id from account as t1 inner join district as t2 on t1.district_id = t2.district_id where t2.a3 = 'prague' order by t1.date asc limit 1
Question: for the first client who opened his/her account in prague, what is his/her account id? | Tables: account -> account_id, district_id, frequency, date. card -> card_id, disp_id, type, issued. client -> client_id, gender, birth_date, district_id. disp -> disp_id, client_id, account_id, type. district -> district...
for the first client who opened his/her account in prague, what is his/her account id?
financial
select cast(sum(t1.gender = 'm') as real) * 100 / count(t1.client_id) from client as t1 inner join district as t2 on t1.district_id = t2.district_id where t2.a3 = 'south bohemia' group by t2.a4 order by t2.a4 desc limit 1
Question: for the branch which located in the south bohemia with biggest number of inhabitants, what is the percentage of the male clients? | Tables: account -> account_id, district_id, frequency, date. card -> card_id, disp_id, type, issued. client -> client_id, gender, birth_date, district_id. disp -> disp_id, client...
for the branch which located in the south bohemia with biggest number of inhabitants, what is the percentage of the male clients?
financial
select cast((sum(iif(t3.date = '1998-12-27', t3.balance, 0)) - sum(iif(t3.date = '1993-03-22', t3.balance, 0))) as real) * 100 / sum(iif(t3.date = '1993-03-22', t3.balance, 0)) from loan as t1 inner join account as t2 on t1.account_id = t2.account_id inner join trans as t3 on t3.account_id = t2.account_id where t1.date...
Question: for the client who first applied the loan in 1993/7/5, what is the increase rate of his/her account balance from 1993/3/22 to 1998/12/27? | Tables: account -> account_id, district_id, frequency, date. card -> card_id, disp_id, type, issued. client -> client_id, gender, birth_date, district_id. disp -> disp_id...
for the client who first applied the loan in 1993/7/5, what is the increase rate of his/her account balance from 1993/3/22 to 1998/12/27?
financial
select (cast(sum(case when status = 'a' then amount else 0 end) as real) * 100) / sum(amount) from loan
Question: what is the percentage of loan amount that has been fully paid with no issue. | Tables: account -> account_id, district_id, frequency, date. card -> card_id, disp_id, type, issued. client -> client_id, gender, birth_date, district_id. disp -> disp_id, client_id, account_id, type. district -> district_id, A2, ...
what is the percentage of loan amount that has been fully paid with no issue.
financial
select cast(sum(status = 'c') as real) * 100 / count(amount) from loan where amount < 100000
Question: for loan amount less than usd100,000, what is the percentage of accounts that is still running with no issue. | Tables: account -> account_id, district_id, frequency, date. card -> card_id, disp_id, type, issued. client -> client_id, gender, birth_date, district_id. disp -> disp_id, client_id, account_id, typ...
for loan amount less than usd100,000, what is the percentage of accounts that is still running with no issue.
financial
select t1.account_id, t2.a2, t2.a3 from account as t1 inner join district as t2 on t1.district_id = t2.district_id where t1.frequency = 'poplatek po obratu' and strftime('%y', t1.date)= '1993'
Question: for accounts in 1993 with statement issued after transaction, list the account id, district name and district region. | Tables: account -> account_id, district_id, frequency, date. card -> card_id, disp_id, type, issued. client -> client_id, gender, birth_date, district_id. disp -> disp_id, client_id, account...
for accounts in 1993 with statement issued after transaction, list the account id, district name and district region.
financial
select t1.account_id, t1.frequency from account as t1 inner join district as t2 on t1.district_id = t2.district_id where t2.a3 = 'east bohemia' and strftime('%y', t1.date) between '1995' and '2000'
Question: from year 1995 to 2000, who are the accounts holders from 'east bohemia'. state the account id the frequency of statement issuance. | Tables: account -> account_id, district_id, frequency, date. card -> card_id, disp_id, type, issued. client -> client_id, gender, birth_date, district_id. disp -> disp_id, clie...
from year 1995 to 2000, who are the accounts holders from 'east bohemia'. state the account id the frequency of statement issuance.
financial
select t1.account_id, t1.date from account as t1 inner join district as t2 on t1.district_id = t2.district_id where t2.a2 = 'prachatice'
Question: list account id and account opening date for accounts from 'prachatice'. | Tables: account -> account_id, district_id, frequency, date. card -> card_id, disp_id, type, issued. client -> client_id, gender, birth_date, district_id. disp -> disp_id, client_id, account_id, type. district -> district_id, A2, A3, A...
list account id and account opening date for accounts from 'prachatice'.
financial
select t2.a2, t2.a3 from account as t1 inner join district as t2 on t1.district_id = t2.district_id inner join loan as t3 on t1.account_id = t3.account_id where t3.loan_id = 4990
Question: state the district and region for loan id '4990'. | Tables: account -> account_id, district_id, frequency, date. card -> card_id, disp_id, type, issued. client -> client_id, gender, birth_date, district_id. disp -> disp_id, client_id, account_id, type. district -> district_id, A2, A3, A4, A5, A6, A7, A8, A9, ...
state the district and region for loan id '4990'.
financial
select t1.account_id, t2.a2, t2.a3 from account as t1 inner join district as t2 on t1.district_id = t2.district_id inner join loan as t3 on t1.account_id = t3.account_id where t3.amount > 300000
Question: provide the account id, district and region for loan amount greater than usd300,000. | Tables: account -> account_id, district_id, frequency, date. card -> card_id, disp_id, type, issued. client -> client_id, gender, birth_date, district_id. disp -> disp_id, client_id, account_id, type. district -> district_i...
provide the account id, district and region for loan amount greater than usd300,000.
financial
select t3.loan_id, t2.a2, t2.a11 from account as t1 inner join district as t2 on t1.district_id = t2.district_id inner join loan as t3 on t1.account_id = t3.account_id where t3.duration = 60
Question: list the loan id, district and average salary for loan with duration of 60 months. | Tables: account -> account_id, district_id, frequency, date. card -> card_id, disp_id, type, issued. client -> client_id, gender, birth_date, district_id. disp -> disp_id, client_id, account_id, type. district -> district_id,...
list the loan id, district and average salary for loan with duration of 60 months.
financial
select cast((t3.a13 - t3.a12) as real) * 100 / t3.a12 from loan as t1 inner join account as t2 on t1.account_id = t2.account_id inner join district as t3 on t2.district_id = t3.district_id where t1.status = 'd'
Question: for loans contracts which are still running where client are in debt, list the district of the and the state the percentage unemployment rate increment from year 1995 to 1996. | Tables: account -> account_id, district_id, frequency, date. card -> card_id, disp_id, type, issued. client -> client_id, gender, bi...
for loans contracts which are still running where client are in debt, list the district of the and the state the percentage unemployment rate increment from year 1995 to 1996.
financial
select cast(sum(t1.a2 = 'decin') as real) * 100 / count(account_id) from district as t1 inner join account as t2 on t1.district_id = t2.district_id where strftime('%y', t2.date) = '1993'
Question: calculate the percentage of account from 'decin' district for all accounts are opened in 1993. | Tables: account -> account_id, district_id, frequency, date. card -> card_id, disp_id, type, issued. client -> client_id, gender, birth_date, district_id. disp -> disp_id, client_id, account_id, type. district -> ...
calculate the percentage of account from 'decin' district for all accounts are opened in 1993.
financial
select account_id from account where frequency = 'poplatek mesicne'
Question: list the account ids with monthly issuance of statements. | Tables: account -> account_id, district_id, frequency, date. card -> card_id, disp_id, type, issued. client -> client_id, gender, birth_date, district_id. disp -> disp_id, client_id, account_id, type. district -> district_id, A2, A3, A4, A5, A6, A7, ...
list the account ids with monthly issuance of statements.
financial
select t2.a2, count(t1.client_id) from client as t1 inner join district as t2 on t1.district_id = t2.district_id where t1.gender = 'f' group by t2.district_id, t2.a2 order by count(t1.client_id) desc limit 10
Question: list the top ten districts, by descending order, from the highest to the lowest, the number of female account holders. | Tables: account -> account_id, district_id, frequency, date. card -> card_id, disp_id, type, issued. client -> client_id, gender, birth_date, district_id. disp -> disp_id, client_id, accoun...
list the top ten districts, by descending order, from the highest to the lowest, the number of female account holders.
financial
select t1.district_id from district as t1 inner join account as t2 on t1.district_id = t2.district_id inner join trans as t3 on t2.account_id = t3.account_id where t3.type = 'vydaj' and t2.date like '1996-01%' order by a2 asc limit 10
Question: which are the top ten withdrawals (non-credit card) by district names for the month of january 1996? | Tables: account -> account_id, district_id, frequency, date. card -> card_id, disp_id, type, issued. client -> client_id, gender, birth_date, district_id. disp -> disp_id, client_id, account_id, type. distri...
which are the top ten withdrawals (non-credit card) by district names for the month of january 1996?
financial
select count(t3.account_id) from district as t1 inner join client as t2 on t1.district_id = t2.district_id inner join disp as t3 on t2.client_id = t3.client_id where t1.a3 = 'south bohemia' and t3.type != 'owner'
Question: how many of the account holders in south bohemia still do not own credit cards? | Tables: account -> account_id, district_id, frequency, date. card -> card_id, disp_id, type, issued. client -> client_id, gender, birth_date, district_id. disp -> disp_id, client_id, account_id, type. district -> district_id, A2...
how many of the account holders in south bohemia still do not own credit cards?
financial
select t2.a3 from account as t1 inner join district as t2 on t1.district_id = t2.district_id inner join loan as t3 on t1.account_id = t3.account_id where t3.status in ('c', 'd') group by t2.a3 order by sum(t3.amount) desc limit 1
Question: which district has highest active loan? | Tables: account -> account_id, district_id, frequency, date. card -> card_id, disp_id, type, issued. client -> client_id, gender, birth_date, district_id. disp -> disp_id, client_id, account_id, type. district -> district_id, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, ...
which district has highest active loan?
financial
select avg(t3.amount) from client as t1 inner join account as t2 on t1.district_id = t2.district_id inner join loan as t3 on t2.account_id = t3.account_id where t1.gender = 'm'
Question: what is the average loan amount by male borrowers? | Tables: account -> account_id, district_id, frequency, date. card -> card_id, disp_id, type, issued. client -> client_id, gender, birth_date, district_id. disp -> disp_id, client_id, account_id, type. district -> district_id, A2, A3, A4, A5, A6, A7, A8, A9,...
what is the average loan amount by male borrowers?
financial
select district_id, a2 from district order by a13 desc limit 1
Question: in 1996, which districts have the highest unemployment rate? list their branch location and district name. | Tables: account -> account_id, district_id, frequency, date. card -> card_id, disp_id, type, issued. client -> client_id, gender, birth_date, district_id. disp -> disp_id, client_id, account_id, type. ...
in 1996, which districts have the highest unemployment rate? list their branch location and district name.
financial
select count(t2.account_id) from district as t1 inner join account as t2 on t1.district_id = t2.district_id group by t1.a16 order by t1.a16 desc limit 1
Question: in the branch where the largest number of crimes were committed in 1996, how many accounts were opened? | Tables: account -> account_id, district_id, frequency, date. card -> card_id, disp_id, type, issued. client -> client_id, gender, birth_date, district_id. disp -> disp_id, client_id, account_id, type. dis...
in the branch where the largest number of crimes were committed in 1996, how many accounts were opened?
financial
select count(t1.account_id) from trans as t1 inner join account as t2 on t1.account_id = t2.account_id where t1.balance < 0 and t1.operation = 'vyber kartou' and t2.frequency = 'poplatek mesicne'
Question: after making a credit card withdrawal, how many account/s with monthly issuance has a negative balance? | Tables: account -> account_id, district_id, frequency, date. card -> card_id, disp_id, type, issued. client -> client_id, gender, birth_date, district_id. disp -> disp_id, client_id, account_id, type. dis...
after making a credit card withdrawal, how many account/s with monthly issuance has a negative balance?
financial
select count(t1.account_id) from account as t1 inner join loan as t2 on t1.account_id = t2.account_id where t2.date between '1995-01-01' and '1997-12-31' and t1.frequency = 'poplatek mesicne' and t2.amount > 250000
Question: between 1/1/1995 and 12/31/1997, how many loans in the amount of at least 250,000 per account that chose monthly statement issuance were approved? | Tables: account -> account_id, district_id, frequency, date. card -> card_id, disp_id, type, issued. client -> client_id, gender, birth_date, district_id. disp -...
between 1/1/1995 and 12/31/1997, how many loans in the amount of at least 250,000 per account that chose monthly statement issuance were approved?
financial
select count(t1.account_id) from account as t1 inner join district as t2 on t1.district_id = t2.district_id inner join loan as t3 on t1.account_id = t3.account_id where t1.district_id = 1 and (t3.status = 'c' or t3.status = 'd')
Question: how many accounts have running contracts in branch location 1? | Tables: account -> account_id, district_id, frequency, date. card -> card_id, disp_id, type, issued. client -> client_id, gender, birth_date, district_id. disp -> disp_id, client_id, account_id, type. district -> district_id, A2, A3, A4, A5, A6,...
how many accounts have running contracts in branch location 1?