db_id stringlengths 4 31 | SQL stringlengths 18 1.45k | input_sequence stringlengths 148 11k | question stringlengths 16 325 |
|---|---|---|---|
mondial_geo | select t2.country from continent as t1 inner join encompasses as t2 on t1.name = t2.continent inner join country as t3 on t2.country = t3.code inner join economy as t4 on t4.country = t3.code where t1.name = 'asia' order by t4.agriculture desc limit 1 | Question: which asian country gave its agricultural sector the largest share of its gross domestic product? | Tables: borders -> Country1, Country2, Length. city -> Name, Country, Province, Population, Longitude, Latitude. continent -> Name, Area. country -> Name, Code, Capital, Province, Area, Population. desert -> Na... | which asian country gave its agricultural sector the largest share of its gross domestic product? |
mondial_geo | select t3.government from country as t1 inner join economy as t2 on t1.code = t2.country inner join politics as t3 on t3.country = t2.country where t2.gdp is not null order by t2.gdp asc limit 1 | Question: what form of governance does the least prosperous nation in the world have? | Tables: borders -> Country1, Country2, Length. city -> Name, Country, Province, Population, Longitude, Latitude. continent -> Name, Area. country -> Name, Code, Capital, Province, Area, Population. desert -> Name, Area, Longitude, L... | what form of governance does the least prosperous nation in the world have? |
mondial_geo | select strftime('%y', t4.established) from continent as t1 inner join encompasses as t2 on t1.name = t2.continent inner join country as t3 on t2.country = t3.code inner join organization as t4 on t4.country = t3.code where t1.name = 'europe' group by strftime('%y', t4.established) order by count(t4.name) desc limit 1 | Question: what year saw the greatest number of organizations created on the european continent? | Tables: borders -> Country1, Country2, Length. city -> Name, Country, Province, Population, Longitude, Latitude. continent -> Name, Area. country -> Name, Code, Capital, Province, Area, Population. desert -> Name, Area, Lo... | what year saw the greatest number of organizations created on the european continent? |
mondial_geo | select t2.country2, t2.length from country as t1 inner join borders as t2 on t1.code = t2.country1 inner join country as t3 on t3.code = t2.country2 where t1.name = ( select name from country order by population desc limit 1 ) | Question: what other country does the most populated nation in the world share a border with and how long is the border between the two nations? | Tables: borders -> Country1, Country2, Length. city -> Name, Country, Province, Population, Longitude, Latitude. continent -> Name, Area. country -> Name, Code, Capital, Pro... | what other country does the most populated nation in the world share a border with and how long is the border between the two nations? |
mondial_geo | select t1.population / t1.area, t2.industry from country as t1 inner join economy as t2 on t1.code = t2.country where t1.province = 'distrito federal' | Question: what is the population density of the nation whose capital city is in the distrito federal province, and what portion of its gross domestic product is devoted to its industries? | Tables: borders -> Country1, Country2, Length. city -> Name, Country, Province, Population, Longitude, Latitude. continent -> Name... | what is the population density of the nation whose capital city is in the distrito federal province, and what portion of its gross domestic product is devoted to its industries? |
mondial_geo | select * from politics where strftime('%y', independence) between '1950' and '1999' and government = 'parliamentary democracy' | Question: lists all governments with a parliamentary democracy that achieved their independence between 01/01/1950 and 12/31/1999. | Tables: borders -> Country1, Country2, Length. city -> Name, Country, Province, Population, Longitude, Latitude. continent -> Name, Area. country -> Name, Code, Capital, Province, Area, P... | lists all governments with a parliamentary democracy that achieved their independence between 01/01/1950 and 12/31/1999. |
mondial_geo | select cast(sum(case when strftime('%y', independence) = '1960' then 1 else 0 end) as real) * 100 / count(country) from politics | Question: what percentage of countries became independent during the year 1960? | Tables: borders -> Country1, Country2, Length. city -> Name, Country, Province, Population, Longitude, Latitude. continent -> Name, Area. country -> Name, Code, Capital, Province, Area, Population. desert -> Name, Area, Longitude, Latitud... | what percentage of countries became independent during the year 1960? |
mondial_geo | select name from desert where latitude < 30 or latitude > 40 | Question: list all deserts that are not between latitudes 30 and 40. | Tables: borders -> Country1, Country2, Length. city -> Name, Country, Province, Population, Longitude, Latitude. continent -> Name, Area. country -> Name, Code, Capital, Province, Area, Population. desert -> Name, Area, Longitude, Latitude. economy ... | list all deserts that are not between latitudes 30 and 40. |
mondial_geo | select t1.latitude, t1.longitude from desert as t1 inner join geo_desert as t2 on t1.name = t2.desert group by t1.name, t1.latitude, t1.longitude having count(t1.name) > 1 | Question: indicate the coordinates of all the deserts whose area is in more than one country. | Tables: borders -> Country1, Country2, Length. city -> Name, Country, Province, Population, Longitude, Latitude. continent -> Name, Area. country -> Name, Code, Capital, Province, Area, Population. desert -> Name, Area, Long... | indicate the coordinates of all the deserts whose area is in more than one country. |
mondial_geo | select capprov from province where population < 80000 order by population / area desc limit 1 | Question: what is the provincial capital of the province with a population of less than 80,000 that has the highest average population per area? | Tables: borders -> Country1, Country2, Length. city -> Name, Country, Province, Population, Longitude, Latitude. continent -> Name, Area. country -> Name, Code, Capital, Pro... | what is the provincial capital of the province with a population of less than 80,000 that has the highest average population per area? |
software_company | select count(id) from customers where marital_status = 'never-married' | Question: how many customers have never married? | Tables: Demog -> GEOID, INHABITANTS_K, INCOME_K, A_VAR1, A_VAR2, A_VAR3, A_VAR4, A_VAR5, A_VAR6, A_VAR7, A_VAR8, A_VAR9, A_VAR10, A_VAR11, A_VAR12, A_VAR13, A_VAR14, A_VAR15, A_VAR16, A_VAR17, A_VAR18. mailings3 -> REFID, REF_DATE, RESPONSE. Customers -> ID, SEX, MARIT... | how many customers have never married? |
software_company | select count(id) from customers where age >= 13 and age <= 19 | Question: among all the customers, how many of them are teenagers? | Tables: Demog -> GEOID, INHABITANTS_K, INCOME_K, A_VAR1, A_VAR2, A_VAR3, A_VAR4, A_VAR5, A_VAR6, A_VAR7, A_VAR8, A_VAR9, A_VAR10, A_VAR11, A_VAR12, A_VAR13, A_VAR14, A_VAR15, A_VAR16, A_VAR17, A_VAR18. mailings3 -> REFID, REF_DATE, RESPONSE. Customers... | among all the customers, how many of them are teenagers? |
software_company | select distinct occupation from customers where educationnum = 11 | Question: please list the occupations of the customers with an education level of 11. | Tables: Demog -> GEOID, INHABITANTS_K, INCOME_K, A_VAR1, A_VAR2, A_VAR3, A_VAR4, A_VAR5, A_VAR6, A_VAR7, A_VAR8, A_VAR9, A_VAR10, A_VAR11, A_VAR12, A_VAR13, A_VAR14, A_VAR15, A_VAR16, A_VAR17, A_VAR18. mailings3 -> REFID, REF_DATE, ... | please list the occupations of the customers with an education level of 11. |
software_company | select count(refid) custmoer_number from mailings1_2 where response = 'true' | Question: of the first 60,000 customers' responses to the incentive mailing sent by the marketing department, how many of them are considered a true response? | Tables: Demog -> GEOID, INHABITANTS_K, INCOME_K, A_VAR1, A_VAR2, A_VAR3, A_VAR4, A_VAR5, A_VAR6, A_VAR7, A_VAR8, A_VAR9, A_VAR10, A_VAR11, A_VAR12, A_VAR13, A_... | of the first 60,000 customers' responses to the incentive mailing sent by the marketing department, how many of them are considered a true response? |
software_company | select count(id) from customers where occupation = 'machine-op-inspct' and age > 30 | Question: among the customers over 30, how many of them are machine-op-inspcts? | Tables: Demog -> GEOID, INHABITANTS_K, INCOME_K, A_VAR1, A_VAR2, A_VAR3, A_VAR4, A_VAR5, A_VAR6, A_VAR7, A_VAR8, A_VAR9, A_VAR10, A_VAR11, A_VAR12, A_VAR13, A_VAR14, A_VAR15, A_VAR16, A_VAR17, A_VAR18. mailings3 -> REFID, REF_DATE, RESPON... | among the customers over 30, how many of them are machine-op-inspcts? |
software_company | select count(id) from customers where educationnum > 11 and sex = 'female' | Question: how many female customers have an education level of over 11? | Tables: Demog -> GEOID, INHABITANTS_K, INCOME_K, A_VAR1, A_VAR2, A_VAR3, A_VAR4, A_VAR5, A_VAR6, A_VAR7, A_VAR8, A_VAR9, A_VAR10, A_VAR11, A_VAR12, A_VAR13, A_VAR14, A_VAR15, A_VAR16, A_VAR17, A_VAR18. mailings3 -> REFID, REF_DATE, RESPONSE. Cust... | how many female customers have an education level of over 11? |
software_company | select count(t1.id) from customers as t1 inner join mailings1_2 as t2 on t1.id = t2.refid where t1.sex = 'female' and t2.response = 'true' | Question: of the first 60,000 customers who sent a true response to the incentive mailing sent by the marketing department, how many of them are female? | Tables: Demog -> GEOID, INHABITANTS_K, INCOME_K, A_VAR1, A_VAR2, A_VAR3, A_VAR4, A_VAR5, A_VAR6, A_VAR7, A_VAR8, A_VAR9, A_VAR10, A_VAR11, A_VAR12, A_VAR13, A_VAR14,... | of the first 60,000 customers who sent a true response to the incentive mailing sent by the marketing department, how many of them are female? |
software_company | select distinct t1.occupation from customers as t1 inner join mailings1_2 as t2 on t1.id = t2.refid where t1.age > 40 and t2.response = 'true' | Question: please list the occupations of the customers over 40 and have sent a true response to the incentive mailing sent by the marketing department. | Tables: Demog -> GEOID, INHABITANTS_K, INCOME_K, A_VAR1, A_VAR2, A_VAR3, A_VAR4, A_VAR5, A_VAR6, A_VAR7, A_VAR8, A_VAR9, A_VAR10, A_VAR11, A_VAR12, A_VAR13, A_VAR14, ... | please list the occupations of the customers over 40 and have sent a true response to the incentive mailing sent by the marketing department. |
software_company | select count(t1.geoid) from customers as t1 inner join demog as t2 on t1.geoid = t2.geoid where t1.sex = 'male' and t2.inhabitants_k > 30 | Question: among the male customers, how many of them come from a place with over 30,000 inhabitants? | Tables: Demog -> GEOID, INHABITANTS_K, INCOME_K, A_VAR1, A_VAR2, A_VAR3, A_VAR4, A_VAR5, A_VAR6, A_VAR7, A_VAR8, A_VAR9, A_VAR10, A_VAR11, A_VAR12, A_VAR13, A_VAR14, A_VAR15, A_VAR16, A_VAR17, A_VAR18. mailings3 -> RE... | among the male customers, how many of them come from a place with over 30,000 inhabitants? |
software_company | select count(t1.id) from customers as t1 inner join demog as t2 on t1.geoid = t2.geoid order by t2.income_k desc limit 1 | Question: how many customers are from the place with the highest average income per month? | Tables: Demog -> GEOID, INHABITANTS_K, INCOME_K, A_VAR1, A_VAR2, A_VAR3, A_VAR4, A_VAR5, A_VAR6, A_VAR7, A_VAR8, A_VAR9, A_VAR10, A_VAR11, A_VAR12, A_VAR13, A_VAR14, A_VAR15, A_VAR16, A_VAR17, A_VAR18. mailings3 -> REFID, REF_D... | how many customers are from the place with the highest average income per month? |
software_company | select count(t1.geoid) from customers as t1 inner join demog as t2 on t1.geoid = t2.geoid where t1.occupation = 'machine-op-inspct' and t2.inhabitants_k > 20 and t2.inhabitants_k < 30 | Question: among the customers from a place with more than 20,000 and less than 30,000 inhabitants, how many of them are machine-op-inspcts? | Tables: Demog -> GEOID, INHABITANTS_K, INCOME_K, A_VAR1, A_VAR2, A_VAR3, A_VAR4, A_VAR5, A_VAR6, A_VAR7, A_VAR8, A_VAR9, A_VAR10, A_VAR11, A_VAR12, A_VAR13, A_VAR14, A_VAR15, A_V... | among the customers from a place with more than 20,000 and less than 30,000 inhabitants, how many of them are machine-op-inspcts? |
software_company | select t1.id from customers as t1 inner join demog as t2 on t1.geoid = t2.geoid where t1.id = 0 or t1.id = 1 order by inhabitants_k desc limit 1 | Question: which customer come from a place with more inhabitants, customer no.0 or customer no.1? | Tables: Demog -> GEOID, INHABITANTS_K, INCOME_K, A_VAR1, A_VAR2, A_VAR3, A_VAR4, A_VAR5, A_VAR6, A_VAR7, A_VAR8, A_VAR9, A_VAR10, A_VAR11, A_VAR12, A_VAR13, A_VAR14, A_VAR15, A_VAR16, A_VAR17, A_VAR18. mailings3 -> REFID... | which customer come from a place with more inhabitants, customer no.0 or customer no.1? |
software_company | select count(t1.id) from customers as t1 inner join mailings1_2 as t2 on t1.id = t2.refid inner join demog as t3 on t1.geoid = t3.geoid where t3.inhabitants_k > 30 and t2.response = 'true' | Question: of the first 60,000 customers who sent a true response to the incentive mailing sent by the marketing department, how many of them are from a place with more than 30,000 inhabitants? | Tables: Demog -> GEOID, INHABITANTS_K, INCOME_K, A_VAR1, A_VAR2, A_VAR3, A_VAR4, A_VAR5, A_VAR6, A_VAR7, A_VAR8, A_VAR9, A_VA... | of the first 60,000 customers who sent a true response to the incentive mailing sent by the marketing department, how many of them are from a place with more than 30,000 inhabitants? |
software_company | select count(t1.id) from customers as t1 inner join mailings1_2 as t2 on t1.id = t2.refid where t1.sex = 'male' and t1.marital_status = 'divorced' and t2.response = 'true' | Question: of the first 60,000 customers who sent a true response to the incentive mailing sent by the marketing department, how many of them are divorced males? | Tables: Demog -> GEOID, INHABITANTS_K, INCOME_K, A_VAR1, A_VAR2, A_VAR3, A_VAR4, A_VAR5, A_VAR6, A_VAR7, A_VAR8, A_VAR9, A_VAR10, A_VAR11, A_VAR12, A_VAR13, ... | of the first 60,000 customers who sent a true response to the incentive mailing sent by the marketing department, how many of them are divorced males? |
software_company | select count(t1.id) from customers as t1 inner join mailings1_2 as t2 on t1.id = t2.refid inner join demog as t3 on t1.geoid = t3.geoid where t2.response = 'true' order by t3.income_k desc limit 1 | Question: how many of the first 60,000 customers from the place with the highest average income per month have sent a true response to the incentive mailing sent by the marketing department? | Tables: Demog -> GEOID, INHABITANTS_K, INCOME_K, A_VAR1, A_VAR2, A_VAR3, A_VAR4, A_VAR5, A_VAR6, A_VAR7, A_VAR8, A_VAR9, A_VAR1... | how many of the first 60,000 customers from the place with the highest average income per month have sent a true response to the incentive mailing sent by the marketing department? |
software_company | select distinct t2.inhabitants_k from customers as t1 inner join demog as t2 on t1.geoid = t2.geoid order by t2.inhabitants_k desc | Question: what is the number of inhabitants of the place the most customers are from? | Tables: Demog -> GEOID, INHABITANTS_K, INCOME_K, A_VAR1, A_VAR2, A_VAR3, A_VAR4, A_VAR5, A_VAR6, A_VAR7, A_VAR8, A_VAR9, A_VAR10, A_VAR11, A_VAR12, A_VAR13, A_VAR14, A_VAR15, A_VAR16, A_VAR17, A_VAR18. mailings3 -> REFID, REF_DATE, ... | what is the number of inhabitants of the place the most customers are from? |
software_company | select count(t1.id) from customers as t1 inner join demog as t2 on t1.geoid = t2.geoid where t2.inhabitants_k = 25.746 and t1.sex = 'male' | Question: among the customers who come from the place with 25746 inhabitants, how many of them are male? | Tables: Demog -> GEOID, INHABITANTS_K, INCOME_K, A_VAR1, A_VAR2, A_VAR3, A_VAR4, A_VAR5, A_VAR6, A_VAR7, A_VAR8, A_VAR9, A_VAR10, A_VAR11, A_VAR12, A_VAR13, A_VAR14, A_VAR15, A_VAR16, A_VAR17, A_VAR18. mailings3 -... | among the customers who come from the place with 25746 inhabitants, how many of them are male? |
software_company | select count(t1.id) from customers as t1 inner join mailings1_2 as t2 on t1.id = t2.refid where t1.age >= 13 and t1.age <= 19 and t2.response = 'true' | Question: of the first 60,000 customers who sent a true response to the incentive mailing sent by the marketing department, how many of them are teenagers? | Tables: Demog -> GEOID, INHABITANTS_K, INCOME_K, A_VAR1, A_VAR2, A_VAR3, A_VAR4, A_VAR5, A_VAR6, A_VAR7, A_VAR8, A_VAR9, A_VAR10, A_VAR11, A_VAR12, A_VAR13, A_VAR... | of the first 60,000 customers who sent a true response to the incentive mailing sent by the marketing department, how many of them are teenagers? |
software_company | select avg(t1.educationnum) from customers as t1 inner join demog as t2 on t1.geoid = t2.geoid order by t2.income_k desc limit 1 | Question: what is the average education level of customers from the place with the highest average income per month? | Tables: Demog -> GEOID, INHABITANTS_K, INCOME_K, A_VAR1, A_VAR2, A_VAR3, A_VAR4, A_VAR5, A_VAR6, A_VAR7, A_VAR8, A_VAR9, A_VAR10, A_VAR11, A_VAR12, A_VAR13, A_VAR14, A_VAR15, A_VAR16, A_VAR17, A_VAR18.... | what is the average education level of customers from the place with the highest average income per month? |
software_company | select avg(t1.age) from customers as t1 inner join mailings1_2 as t2 on t1.id = t2.refid where t2.response = 'true' | Question: what is the average age of first 60,000 customers who sent a true response to the incentive mailing sent by the marketing department? | Tables: Demog -> GEOID, INHABITANTS_K, INCOME_K, A_VAR1, A_VAR2, A_VAR3, A_VAR4, A_VAR5, A_VAR6, A_VAR7, A_VAR8, A_VAR9, A_VAR10, A_VAR11, A_VAR12, A_VAR13, A_VAR14, A_VAR15,... | what is the average age of first 60,000 customers who sent a true response to the incentive mailing sent by the marketing department? |
software_company | select count(id) from customers where sex = 'male' | Question: how many of the customers are male? | Tables: Demog -> GEOID, INHABITANTS_K, INCOME_K, A_VAR1, A_VAR2, A_VAR3, A_VAR4, A_VAR5, A_VAR6, A_VAR7, A_VAR8, A_VAR9, A_VAR10, A_VAR11, A_VAR12, A_VAR13, A_VAR14, A_VAR15, A_VAR16, A_VAR17, A_VAR18. mailings3 -> REFID, REF_DATE, RESPONSE. Customers -> ID, SEX, MARITAL_... | how many of the customers are male? |
software_company | select geoid from customers where occupation = 'handlers-cleaners' | Question: list down the customer's geographic identifier who are handlers or cleaners. | Tables: Demog -> GEOID, INHABITANTS_K, INCOME_K, A_VAR1, A_VAR2, A_VAR3, A_VAR4, A_VAR5, A_VAR6, A_VAR7, A_VAR8, A_VAR9, A_VAR10, A_VAR11, A_VAR12, A_VAR13, A_VAR14, A_VAR15, A_VAR16, A_VAR17, A_VAR18. mailings3 -> REFID, REF_DATE,... | list down the customer's geographic identifier who are handlers or cleaners. |
software_company | select count(id) from customers where age < 30 | Question: what is the total number of customers with an age below 30? | Tables: Demog -> GEOID, INHABITANTS_K, INCOME_K, A_VAR1, A_VAR2, A_VAR3, A_VAR4, A_VAR5, A_VAR6, A_VAR7, A_VAR8, A_VAR9, A_VAR10, A_VAR11, A_VAR12, A_VAR13, A_VAR14, A_VAR15, A_VAR16, A_VAR17, A_VAR18. mailings3 -> REFID, REF_DATE, RESPONSE. Custom... | what is the total number of customers with an age below 30? |
software_company | select geoid from demog where income_k >= 2100 and income_k <= 2500 | Question: list down the geographic identifier with an income that ranges from 2100 to 2500. | Tables: Demog -> GEOID, INHABITANTS_K, INCOME_K, A_VAR1, A_VAR2, A_VAR3, A_VAR4, A_VAR5, A_VAR6, A_VAR7, A_VAR8, A_VAR9, A_VAR10, A_VAR11, A_VAR12, A_VAR13, A_VAR14, A_VAR15, A_VAR16, A_VAR17, A_VAR18. mailings3 -> REFID, REF_... | list down the geographic identifier with an income that ranges from 2100 to 2500. |
software_company | select count(geoid) from demog where inhabitants_k < 20 and geoid >= 20 and geoid <= 50 | Question: in geographic identifier from 20 to 50, how many of them has a number of inhabitants below 20? | Tables: Demog -> GEOID, INHABITANTS_K, INCOME_K, A_VAR1, A_VAR2, A_VAR3, A_VAR4, A_VAR5, A_VAR6, A_VAR7, A_VAR8, A_VAR9, A_VAR10, A_VAR11, A_VAR12, A_VAR13, A_VAR14, A_VAR15, A_VAR16, A_VAR17, A_VAR18. mailings3 -... | in geographic identifier from 20 to 50, how many of them has a number of inhabitants below 20? |
software_company | select inhabitants_k from demog where geoid = 239 | Question: what is the number of inhabitants and income of geographic identifier 239? | Tables: Demog -> GEOID, INHABITANTS_K, INCOME_K, A_VAR1, A_VAR2, A_VAR3, A_VAR4, A_VAR5, A_VAR6, A_VAR7, A_VAR8, A_VAR9, A_VAR10, A_VAR11, A_VAR12, A_VAR13, A_VAR14, A_VAR15, A_VAR16, A_VAR17, A_VAR18. mailings3 -> REFID, REF_DATE, R... | what is the number of inhabitants and income of geographic identifier 239? |
software_company | select t1.educationnum, t1.occupation from customers as t1 inner join demog as t2 on t1.geoid = t2.geoid where t2.income_k < 2000 and t1.age >= 20 and t1.age <= 35 | Question: give the level of education and occupation of customers ages from 20 to 35 with an income k of 2000 and below. | Tables: Demog -> GEOID, INHABITANTS_K, INCOME_K, A_VAR1, A_VAR2, A_VAR3, A_VAR4, A_VAR5, A_VAR6, A_VAR7, A_VAR8, A_VAR9, A_VAR10, A_VAR11, A_VAR12, A_VAR13, A_VAR14, A_VAR15, A_VAR16, A_VAR17, A_VA... | give the level of education and occupation of customers ages from 20 to 35 with an income k of 2000 and below. |
software_company | select count(t1.id) from customers as t1 inner join demog as t2 on t1.geoid = t2.geoid where t1.marital_status = 'divorced' and t1.age < 50 | Question: list down the number of inhabitants of customers with a divorced marital status and older than 50 years old. | Tables: Demog -> GEOID, INHABITANTS_K, INCOME_K, A_VAR1, A_VAR2, A_VAR3, A_VAR4, A_VAR5, A_VAR6, A_VAR7, A_VAR8, A_VAR9, A_VAR10, A_VAR11, A_VAR12, A_VAR13, A_VAR14, A_VAR15, A_VAR16, A_VAR17, A_VAR1... | list down the number of inhabitants of customers with a divorced marital status and older than 50 years old. |
software_company | select t1.geoid, t2.income_k from customers as t1 inner join demog as t2 on t1.geoid = t2.geoid order by t1.age desc limit 1 | Question: what is the geographic identifier and income of the oldest customer? | Tables: Demog -> GEOID, INHABITANTS_K, INCOME_K, A_VAR1, A_VAR2, A_VAR3, A_VAR4, A_VAR5, A_VAR6, A_VAR7, A_VAR8, A_VAR9, A_VAR10, A_VAR11, A_VAR12, A_VAR13, A_VAR14, A_VAR15, A_VAR16, A_VAR17, A_VAR18. mailings3 -> REFID, REF_DATE, RESPONS... | what is the geographic identifier and income of the oldest customer? |
software_company | select income_k from demog where geoid in ( select geoid from customers where educationnum < 4 and sex = 'male' ) | Question: among the male customers with an level of education of 4 and below, list their income k. | Tables: Demog -> GEOID, INHABITANTS_K, INCOME_K, A_VAR1, A_VAR2, A_VAR3, A_VAR4, A_VAR5, A_VAR6, A_VAR7, A_VAR8, A_VAR9, A_VAR10, A_VAR11, A_VAR12, A_VAR13, A_VAR14, A_VAR15, A_VAR16, A_VAR17, A_VAR18. mailings3 -> REFI... | among the male customers with an level of education of 4 and below, list their income k. |
software_company | select t1.occupation, t2.income_k from customers as t1 inner join demog as t2 on t1.geoid = t2.geoid where t1.educationnum >= 4 and t1.educationnum <= 6 and t1.sex = 'male' | Question: list the occupation and income of male customers with an level of education of 4 to 6. | Tables: Demog -> GEOID, INHABITANTS_K, INCOME_K, A_VAR1, A_VAR2, A_VAR3, A_VAR4, A_VAR5, A_VAR6, A_VAR7, A_VAR8, A_VAR9, A_VAR10, A_VAR11, A_VAR12, A_VAR13, A_VAR14, A_VAR15, A_VAR16, A_VAR17, A_VAR18. mailings3 -> REFID,... | list the occupation and income of male customers with an level of education of 4 to 6. |
software_company | select count(t1.id) from customers as t1 inner join demog as t2 on t1.geoid = t2.geoid where t1.age >= 40 and t1.age <= 60 and t1.marital_status = 'widowed' and t1.sex = 'male' and t2.income_k >= 2000 and t2.income_k <= 3000 | Question: in widowed male customers ages from 40 to 60, how many of them has an income ranges from 3000 and above? | Tables: Demog -> GEOID, INHABITANTS_K, INCOME_K, A_VAR1, A_VAR2, A_VAR3, A_VAR4, A_VAR5, A_VAR6, A_VAR7, A_VAR8, A_VAR9, A_VAR10, A_VAR11, A_VAR12, A_VAR13, A_VAR14, A_VAR15, A_VAR16, A_VAR17, A_VAR18. m... | in widowed male customers ages from 40 to 60, how many of them has an income ranges from 3000 and above? |
software_company | select distinct t1.occupation from customers as t1 inner join demog as t2 on t1.geoid = t2.geoid where t2.inhabitants_k >= 30 and t2.inhabitants_k <= 40 | Question: what is the occupation of customers within number of inhabitants ranges of 30 to 40? | Tables: Demog -> GEOID, INHABITANTS_K, INCOME_K, A_VAR1, A_VAR2, A_VAR3, A_VAR4, A_VAR5, A_VAR6, A_VAR7, A_VAR8, A_VAR9, A_VAR10, A_VAR11, A_VAR12, A_VAR13, A_VAR14, A_VAR15, A_VAR16, A_VAR17, A_VAR18. mailings3 -> REFID, R... | what is the occupation of customers within number of inhabitants ranges of 30 to 40? |
software_company | select income_k from demog where geoid in ( select geoid from customers where educationnum < 5 and sex = 'female' and marital_status = 'widowed' ) | Question: among the widowed female customers, give the income of those who has an level of education of 5 and below. | Tables: Demog -> GEOID, INHABITANTS_K, INCOME_K, A_VAR1, A_VAR2, A_VAR3, A_VAR4, A_VAR5, A_VAR6, A_VAR7, A_VAR8, A_VAR9, A_VAR10, A_VAR11, A_VAR12, A_VAR13, A_VAR14, A_VAR15, A_VAR16, A_VAR17, A_VAR18.... | among the widowed female customers, give the income of those who has an level of education of 5 and below. |
software_company | select t1.marital_status from customers as t1 inner join demog as t2 on t1.geoid = t2.geoid where t1.age >= 40 and t1.age <= 60 order by t2.income_k desc limit 1 | Question: list the marital status of customers within the age of 40 to 60 that has the highest income among the group. | Tables: Demog -> GEOID, INHABITANTS_K, INCOME_K, A_VAR1, A_VAR2, A_VAR3, A_VAR4, A_VAR5, A_VAR6, A_VAR7, A_VAR8, A_VAR9, A_VAR10, A_VAR11, A_VAR12, A_VAR13, A_VAR14, A_VAR15, A_VAR16, A_VAR17, A_VAR1... | list the marital status of customers within the age of 40 to 60 that has the highest income among the group. |
software_company | select t2.inhabitants_k from customers as t1 inner join demog as t2 on t1.geoid = t2.geoid where t1.occupation = 'farming-fishing' and t1.sex = 'male' and t1.age >= 20 and t1.age <= 30 | Question: what is the number of inhabitants of male customers ages from 20 to 30 years old who are farming or fishing? | Tables: Demog -> GEOID, INHABITANTS_K, INCOME_K, A_VAR1, A_VAR2, A_VAR3, A_VAR4, A_VAR5, A_VAR6, A_VAR7, A_VAR8, A_VAR9, A_VAR10, A_VAR11, A_VAR12, A_VAR13, A_VAR14, A_VAR15, A_VAR16, A_VAR17, A_VAR1... | what is the number of inhabitants of male customers ages from 20 to 30 years old who are farming or fishing? |
software_company | select t2.inhabitants_k from customers as t1 inner join demog as t2 on t1.geoid = t2.geoid where t1.occupation = 'farming-fishing' and t1.sex = 'male' and t1.age >= 20 and t1.age <= 30 | Question: among the customers with a marital status of married-civ-spouse, list the number of inhabitants and age of those who are machine-op-inspct. | Tables: Demog -> GEOID, INHABITANTS_K, INCOME_K, A_VAR1, A_VAR2, A_VAR3, A_VAR4, A_VAR5, A_VAR6, A_VAR7, A_VAR8, A_VAR9, A_VAR10, A_VAR11, A_VAR12, A_VAR13, A_VAR14, A_... | among the customers with a marital status of married-civ-spouse, list the number of inhabitants and age of those who are machine-op-inspct. |
software_company | select count(t1.id) from customers as t1 inner join demog as t2 on t1.geoid = t2.geoid where t1.sex = 'female' and t1.age >= 50 and t1.age <= 60 and t2.inhabitants_k >= 19 and t2.inhabitants_k <= 24 | Question: in female customers ages from 50 to 60, how many of them has an number of inhabitants ranges from 19 to 24? | Tables: Demog -> GEOID, INHABITANTS_K, INCOME_K, A_VAR1, A_VAR2, A_VAR3, A_VAR4, A_VAR5, A_VAR6, A_VAR7, A_VAR8, A_VAR9, A_VAR10, A_VAR11, A_VAR12, A_VAR13, A_VAR14, A_VAR15, A_VAR16, A_VAR17, A_VAR18... | in female customers ages from 50 to 60, how many of them has an number of inhabitants ranges from 19 to 24? |
software_company | select t2.income_k, t2.inhabitants_k from customers as t1 inner join demog as t2 on t1.geoid = t2.geoid group by t2.income_k, t2.inhabitants_k having t1.age > 0.8 * avg(t1.age) | Question: list the income and number of inhabitants of customers with an age greater than the 80% of average age of all customers? | Tables: Demog -> GEOID, INHABITANTS_K, INCOME_K, A_VAR1, A_VAR2, A_VAR3, A_VAR4, A_VAR5, A_VAR6, A_VAR7, A_VAR8, A_VAR9, A_VAR10, A_VAR11, A_VAR12, A_VAR13, A_VAR14, A_VAR15, A_VAR16, A_V... | list the income and number of inhabitants of customers with an age greater than the 80% of average age of all customers? |
software_company | select cast(sum(case when t2.income_k > 2500 then 1.0 else 0 end) as real) * 100 / count(*) from customers as t1 inner join demog as t2 on t1.geoid = t2.geoid where t1.marital_status = 'never-married' | Question: in customers with marital status of never married, what is the percentage of customers with income of 2500 and above? | Tables: Demog -> GEOID, INHABITANTS_K, INCOME_K, A_VAR1, A_VAR2, A_VAR3, A_VAR4, A_VAR5, A_VAR6, A_VAR7, A_VAR8, A_VAR9, A_VAR10, A_VAR11, A_VAR12, A_VAR13, A_VAR14, A_VAR15, A_VAR16, A_VAR1... | in customers with marital status of never married, what is the percentage of customers with income of 2500 and above? |
software_company | select id, geoid from customers where educationnum < 3 and age > 65 | Question: find and list the id and geographic id of the elderly customers with an education level below 3. | Tables: Demog -> GEOID, INHABITANTS_K, INCOME_K, A_VAR1, A_VAR2, A_VAR3, A_VAR4, A_VAR5, A_VAR6, A_VAR7, A_VAR8, A_VAR9, A_VAR10, A_VAR11, A_VAR12, A_VAR13, A_VAR14, A_VAR15, A_VAR16, A_VAR17, A_VAR18. mailings3... | find and list the id and geographic id of the elderly customers with an education level below 3. |
software_company | select avg(income_k) from demog | Question: list the geographic id of places where the income is above average. | Tables: Demog -> GEOID, INHABITANTS_K, INCOME_K, A_VAR1, A_VAR2, A_VAR3, A_VAR4, A_VAR5, A_VAR6, A_VAR7, A_VAR8, A_VAR9, A_VAR10, A_VAR11, A_VAR12, A_VAR13, A_VAR14, A_VAR15, A_VAR16, A_VAR17, A_VAR18. mailings3 -> REFID, REF_DATE, RESPONSE... | list the geographic id of places where the income is above average. |
software_company | select count(refid) custmoer_number from mailings1_2 where response = 'false' and ref_date between '2007-02-01' and '2007-02-28' | Question: calculate the number of customers who did not respond in february of 2007. | Tables: Demog -> GEOID, INHABITANTS_K, INCOME_K, A_VAR1, A_VAR2, A_VAR3, A_VAR4, A_VAR5, A_VAR6, A_VAR7, A_VAR8, A_VAR9, A_VAR10, A_VAR11, A_VAR12, A_VAR13, A_VAR14, A_VAR15, A_VAR16, A_VAR17, A_VAR18. mailings3 -> REFID, REF_DATE, R... | calculate the number of customers who did not respond in february of 2007. |
software_company | select count(id) teenager_number from customers where occupation = 'machine-op-inspct' and age >= 13 and age <= 19 | Question: how many teenagers are working as machine-op-inspct? | Tables: Demog -> GEOID, INHABITANTS_K, INCOME_K, A_VAR1, A_VAR2, A_VAR3, A_VAR4, A_VAR5, A_VAR6, A_VAR7, A_VAR8, A_VAR9, A_VAR10, A_VAR11, A_VAR12, A_VAR13, A_VAR14, A_VAR15, A_VAR16, A_VAR17, A_VAR18. mailings3 -> REFID, REF_DATE, RESPONSE. Customers -> ... | how many teenagers are working as machine-op-inspct? |
software_company | select count(t2.geoid) from customers as t1 inner join demog as t2 on t1.geoid = t2.geoid where t1.occupation = 'other-service' and t2.inhabitants_k > 20 | Question: of customers who provide other services, how many are from places where inhabitants are more than 20000? | Tables: Demog -> GEOID, INHABITANTS_K, INCOME_K, A_VAR1, A_VAR2, A_VAR3, A_VAR4, A_VAR5, A_VAR6, A_VAR7, A_VAR8, A_VAR9, A_VAR10, A_VAR11, A_VAR12, A_VAR13, A_VAR14, A_VAR15, A_VAR16, A_VAR17, A_VAR18. m... | of customers who provide other services, how many are from places where inhabitants are more than 20000? |
software_company | select count(t2.geoid) from customers as t1 inner join demog as t2 on t1.geoid = t2.geoid where t1.sex = 'male' and t2.income_k > 3000 and t1.age >= 20 and t1.age <= 29 | Question: among the male customer in their twenties, how many are from places where the average income is more than 3000? | Tables: Demog -> GEOID, INHABITANTS_K, INCOME_K, A_VAR1, A_VAR2, A_VAR3, A_VAR4, A_VAR5, A_VAR6, A_VAR7, A_VAR8, A_VAR9, A_VAR10, A_VAR11, A_VAR12, A_VAR13, A_VAR14, A_VAR15, A_VAR16, A_VAR17, A_V... | among the male customer in their twenties, how many are from places where the average income is more than 3000? |
software_company | select cast(sum(case when t1.marital_status = 'never married' then 1.0 else 0 end) as real) * 100 / count(*) from customers as t1 inner join demog as t2 on t1.geoid = t2.geoid where t1.geoid = 24 | Question: what percentage of elderly customers who are never married in the place with geographic id 24? | Tables: Demog -> GEOID, INHABITANTS_K, INCOME_K, A_VAR1, A_VAR2, A_VAR3, A_VAR4, A_VAR5, A_VAR6, A_VAR7, A_VAR8, A_VAR9, A_VAR10, A_VAR11, A_VAR12, A_VAR13, A_VAR14, A_VAR15, A_VAR16, A_VAR17, A_VAR18. mailings3 -... | what percentage of elderly customers who are never married in the place with geographic id 24? |
software_company | select cast(sum(case when t1.age between 80 and 89 then 1 else 0 end) as real) * 100 / count(t1.id) from customers as t1 inner join demog as t2 on t1.geoid = t2.geoid where t2.income_k > 3000 | Question: among the customers with an average income per inhabitant above 3000, what percentage are in their eighties? | Tables: Demog -> GEOID, INHABITANTS_K, INCOME_K, A_VAR1, A_VAR2, A_VAR3, A_VAR4, A_VAR5, A_VAR6, A_VAR7, A_VAR8, A_VAR9, A_VAR10, A_VAR11, A_VAR12, A_VAR13, A_VAR14, A_VAR15, A_VAR16, A_VAR17, A_VAR1... | among the customers with an average income per inhabitant above 3000, what percentage are in their eighties? |
software_company | select count(refid) from mailings1_2 where response = 'true' | Question: how many of the customer's reference id that has a true response? | Tables: Demog -> GEOID, INHABITANTS_K, INCOME_K, A_VAR1, A_VAR2, A_VAR3, A_VAR4, A_VAR5, A_VAR6, A_VAR7, A_VAR8, A_VAR9, A_VAR10, A_VAR11, A_VAR12, A_VAR13, A_VAR14, A_VAR15, A_VAR16, A_VAR17, A_VAR18. mailings3 -> REFID, REF_DATE, RESPONSE. ... | how many of the customer's reference id that has a true response? |
software_company | select refid from mailings1_2 where response = 'true' | Question: list down the customer's reference id with true response. | Tables: Demog -> GEOID, INHABITANTS_K, INCOME_K, A_VAR1, A_VAR2, A_VAR3, A_VAR4, A_VAR5, A_VAR6, A_VAR7, A_VAR8, A_VAR9, A_VAR10, A_VAR11, A_VAR12, A_VAR13, A_VAR14, A_VAR15, A_VAR16, A_VAR17, A_VAR18. mailings3 -> REFID, REF_DATE, RESPONSE. Customer... | list down the customer's reference id with true response. |
software_company | select count(id) from customers where marital_status = 'widowed' and age < 50 | Question: what is the total number of widowed customers with an age below 50? | Tables: Demog -> GEOID, INHABITANTS_K, INCOME_K, A_VAR1, A_VAR2, A_VAR3, A_VAR4, A_VAR5, A_VAR6, A_VAR7, A_VAR8, A_VAR9, A_VAR10, A_VAR11, A_VAR12, A_VAR13, A_VAR14, A_VAR15, A_VAR16, A_VAR17, A_VAR18. mailings3 -> REFID, REF_DATE, RESPONSE... | what is the total number of widowed customers with an age below 50? |
software_company | select geoid from demog where inhabitants_k < 30 | Question: list down the geographic identifier with an number of inhabitants less than 30. | Tables: Demog -> GEOID, INHABITANTS_K, INCOME_K, A_VAR1, A_VAR2, A_VAR3, A_VAR4, A_VAR5, A_VAR6, A_VAR7, A_VAR8, A_VAR9, A_VAR10, A_VAR11, A_VAR12, A_VAR13, A_VAR14, A_VAR15, A_VAR16, A_VAR17, A_VAR18. mailings3 -> REFID, REF_DA... | list down the geographic identifier with an number of inhabitants less than 30. |
software_company | select count(geoid) from demog where income_k < 2000 and geoid >= 10 and geoid <= 30 | Question: in geographic identifier from 10 to 30, how many of them has an income below 2000? | Tables: Demog -> GEOID, INHABITANTS_K, INCOME_K, A_VAR1, A_VAR2, A_VAR3, A_VAR4, A_VAR5, A_VAR6, A_VAR7, A_VAR8, A_VAR9, A_VAR10, A_VAR11, A_VAR12, A_VAR13, A_VAR14, A_VAR15, A_VAR16, A_VAR17, A_VAR18. mailings3 -> REFID, REF... | in geographic identifier from 10 to 30, how many of them has an income below 2000? |
software_company | select distinct marital_status from customers where educationnum = 7 and age = 62 | Question: what is the marital status of the customer ages 62 with an level of education of 7? | Tables: Demog -> GEOID, INHABITANTS_K, INCOME_K, A_VAR1, A_VAR2, A_VAR3, A_VAR4, A_VAR5, A_VAR6, A_VAR7, A_VAR8, A_VAR9, A_VAR10, A_VAR11, A_VAR12, A_VAR13, A_VAR14, A_VAR15, A_VAR16, A_VAR17, A_VAR18. mailings3 -> REFID, RE... | what is the marital status of the customer ages 62 with an level of education of 7? |
software_company | select count(t1.id) from customers as t1 inner join mailings1_2 as t2 on t1.id = t2.refid inner join demog as t3 on t1.geoid = t3.geoid where t1.marital_status = 'widowed' and t2.response = 'true' | Question: list down the number of inhabitants of customers with a widowed marital status and false response . | Tables: Demog -> GEOID, INHABITANTS_K, INCOME_K, A_VAR1, A_VAR2, A_VAR3, A_VAR4, A_VAR5, A_VAR6, A_VAR7, A_VAR8, A_VAR9, A_VAR10, A_VAR11, A_VAR12, A_VAR13, A_VAR14, A_VAR15, A_VAR16, A_VAR17, A_VAR18. mailin... | list down the number of inhabitants of customers with a widowed marital status and false response . |
software_company | select t2.response, t3.inhabitants_k from customers as t1 inner join mailings1_2 as t2 on t1.id = t2.refid inner join demog as t3 on t1.geoid = t3.geoid where t1.sex = 'female' order by t1.age desc limit 1 | Question: what is the response and number of inhabitants of the oldest female customer? | Tables: Demog -> GEOID, INHABITANTS_K, INCOME_K, A_VAR1, A_VAR2, A_VAR3, A_VAR4, A_VAR5, A_VAR6, A_VAR7, A_VAR8, A_VAR9, A_VAR10, A_VAR11, A_VAR12, A_VAR13, A_VAR14, A_VAR15, A_VAR16, A_VAR17, A_VAR18. mailings3 -> REFID, REF_DATE... | what is the response and number of inhabitants of the oldest female customer? |
software_company | select income_k from demog where geoid in ( select geoid from customers where educationnum < 3 and sex = 'female' ) | Question: among the female customers with an level of education of 3 and below, list their income. | Tables: Demog -> GEOID, INHABITANTS_K, INCOME_K, A_VAR1, A_VAR2, A_VAR3, A_VAR4, A_VAR5, A_VAR6, A_VAR7, A_VAR8, A_VAR9, A_VAR10, A_VAR11, A_VAR12, A_VAR13, A_VAR14, A_VAR15, A_VAR16, A_VAR17, A_VAR18. mailings3 -> REFI... | among the female customers with an level of education of 3 and below, list their income. |
software_company | select t1.educationnum, t3.income_k from customers as t1 inner join mailings1_2 as t2 on t1.id = t2.refid inner join demog as t3 on t1.geoid = t3.geoid where t1.age >= 30 and t1.age <= 55 and t2.response = 'true' | Question: list the level of education and income of customers ages from 30 to 55 with a true response. | Tables: Demog -> GEOID, INHABITANTS_K, INCOME_K, A_VAR1, A_VAR2, A_VAR3, A_VAR4, A_VAR5, A_VAR6, A_VAR7, A_VAR8, A_VAR9, A_VAR10, A_VAR11, A_VAR12, A_VAR13, A_VAR14, A_VAR15, A_VAR16, A_VAR17, A_VAR18. mailings3 -> ... | list the level of education and income of customers ages from 30 to 55 with a true response. |
software_company | select count(t1.id) from customers as t1 inner join demog as t2 on t1.geoid = t2.geoid where t1.sex = 'male' and t1.age >= 30 and t1.age <= 50 and t2.income_k >= 2000 and t2.income_k <= 2300 | Question: in male customers ages from 30 to 50, how many of them has an income ranges from 2000 to 2300? | Tables: Demog -> GEOID, INHABITANTS_K, INCOME_K, A_VAR1, A_VAR2, A_VAR3, A_VAR4, A_VAR5, A_VAR6, A_VAR7, A_VAR8, A_VAR9, A_VAR10, A_VAR11, A_VAR12, A_VAR13, A_VAR14, A_VAR15, A_VAR16, A_VAR17, A_VAR18. mailings3 -... | in male customers ages from 30 to 50, how many of them has an income ranges from 2000 to 2300? |
software_company | select t1.educationnum, t2.response from customers as t1 inner join mailings1_2 as t2 on t1.id = t2.refid inner join demog as t3 on t1.geoid = t3.geoid where t1.age >= 20 and t1.age <= 30 order by t3.inhabitants_k desc limit 1 | Question: list the educationnum and response of customers within the age of 20 to 30 that has the highest number of inhabitants among the group. | Tables: Demog -> GEOID, INHABITANTS_K, INCOME_K, A_VAR1, A_VAR2, A_VAR3, A_VAR4, A_VAR5, A_VAR6, A_VAR7, A_VAR8, A_VAR9, A_VAR10, A_VAR11, A_VAR12, A_VAR13, A_VAR14, A_VAR15... | list the educationnum and response of customers within the age of 20 to 30 that has the highest number of inhabitants among the group. |
software_company | select t2.income_k from customers as t1 inner join demog as t2 on t1.geoid = t2.geoid where t1.sex = 'female' and t1.age >= 30 and t1.age <= 55 and t1.occupation = 'machine-op-inspct' | Question: what is the income of female customers ages from 30 to 55 years old and has an occupation of machine-op-inspct? | Tables: Demog -> GEOID, INHABITANTS_K, INCOME_K, A_VAR1, A_VAR2, A_VAR3, A_VAR4, A_VAR5, A_VAR6, A_VAR7, A_VAR8, A_VAR9, A_VAR10, A_VAR11, A_VAR12, A_VAR13, A_VAR14, A_VAR15, A_VAR16, A_VAR17, A_V... | what is the income of female customers ages from 30 to 55 years old and has an occupation of machine-op-inspct? |
software_company | select distinct t1.marital_status, t2.response from customers as t1 inner join mailings1_2 as t2 on t1.id = t2.refid where t1.educationnum > 8 and t1.sex = 'female' | Question: list the marital status and response of female customers with an level of education of 8 and above. | Tables: Demog -> GEOID, INHABITANTS_K, INCOME_K, A_VAR1, A_VAR2, A_VAR3, A_VAR4, A_VAR5, A_VAR6, A_VAR7, A_VAR8, A_VAR9, A_VAR10, A_VAR11, A_VAR12, A_VAR13, A_VAR14, A_VAR15, A_VAR16, A_VAR17, A_VAR18. mailin... | list the marital status and response of female customers with an level of education of 8 and above. |
software_company | select age from customers where geoid in ( select geoid from demog where inhabitants_k < 30 ) and sex = 'female' | Question: what is the age of female customers within the number of inhabitants below 30? | Tables: Demog -> GEOID, INHABITANTS_K, INCOME_K, A_VAR1, A_VAR2, A_VAR3, A_VAR4, A_VAR5, A_VAR6, A_VAR7, A_VAR8, A_VAR9, A_VAR10, A_VAR11, A_VAR12, A_VAR13, A_VAR14, A_VAR15, A_VAR16, A_VAR17, A_VAR18. mailings3 -> REFID, REF_DAT... | what is the age of female customers within the number of inhabitants below 30? |
software_company | select distinct t3.income_k, t2.response from customers as t1 inner join mailings1_2 as t2 on t1.id = t2.refid inner join demog as t3 on t1.geoid = t3.geoid where t1.educationnum > 6 and t1.sex = 'male' and t1.marital_status = 'divorced' | Question: among the divorced male customers, give the income and response of those who has an level of education of 6 and above. | Tables: Demog -> GEOID, INHABITANTS_K, INCOME_K, A_VAR1, A_VAR2, A_VAR3, A_VAR4, A_VAR5, A_VAR6, A_VAR7, A_VAR8, A_VAR9, A_VAR10, A_VAR11, A_VAR12, A_VAR13, A_VAR14, A_VAR15, A_VAR16, A_VAR... | among the divorced male customers, give the income and response of those who has an level of education of 6 and above. |
software_company | select distinct t1.occupation, t2.response from customers as t1 inner join mailings1_2 as t2 on t1.id = t2.refid inner join demog as t3 on t1.geoid = t3.geoid where t1.sex = 'female' and t3.inhabitants_k >= 20 and t3.inhabitants_k <= 25 | Question: what is the occupation and response of female customers within the number of inhabitants range of 20 to 25? | Tables: Demog -> GEOID, INHABITANTS_K, INCOME_K, A_VAR1, A_VAR2, A_VAR3, A_VAR4, A_VAR5, A_VAR6, A_VAR7, A_VAR8, A_VAR9, A_VAR10, A_VAR11, A_VAR12, A_VAR13, A_VAR14, A_VAR15, A_VAR16, A_VAR17, A_VAR18... | what is the occupation and response of female customers within the number of inhabitants range of 20 to 25? |
software_company | select cast(sum(case when t2.response = 'true' then 1.0 else 0 end) as real) * 100 / count(t2.refid) from customers as t1 inner join mailings1_2 as t2 on t1.id = t2.refid where t1.occupation = 'handlers-cleaners' and t1.sex = 'male' | Question: in male customers with an occupation handlers or cleaners, what is the percentage of customers with a true response? | Tables: Demog -> GEOID, INHABITANTS_K, INCOME_K, A_VAR1, A_VAR2, A_VAR3, A_VAR4, A_VAR5, A_VAR6, A_VAR7, A_VAR8, A_VAR9, A_VAR10, A_VAR11, A_VAR12, A_VAR13, A_VAR14, A_VAR15, A_VAR16, A_VAR17... | in male customers with an occupation handlers or cleaners, what is the percentage of customers with a true response? |
software_company | select t2.income_k, t2.inhabitants_k from customers as t1 inner join demog as t2 on t1.geoid = t2.geoid inner join mailings1_2 as t3 on t1.id = t3.refid where t3.refid > ( select 0.5 * count(case when response = 'false' then 1 else null end) / count(response) from mailings1_2 ) | Question: list the income and number of inhabitants of customers with a reference id greater than the 50% of average of number of false response? | Tables: Demog -> GEOID, INHABITANTS_K, INCOME_K, A_VAR1, A_VAR2, A_VAR3, A_VAR4, A_VAR5, A_VAR6, A_VAR7, A_VAR8, A_VAR9, A_VAR10, A_VAR11, A_VAR12, A_VAR13, A_VAR14, A_VAR1... | list the income and number of inhabitants of customers with a reference id greater than the 50% of average of number of false response? |
software_company | select cast(sum(case when sex = 'male' then 1 else 0 end) as real) / sum(case when sex = 'female' then 1 else 0 end) from customers where age between 13 and 19 and educationnum > 10 | Question: what is the ratio of male and female among the age of teenager when the education is above 10? | Tables: Demog -> GEOID, INHABITANTS_K, INCOME_K, A_VAR1, A_VAR2, A_VAR3, A_VAR4, A_VAR5, A_VAR6, A_VAR7, A_VAR8, A_VAR9, A_VAR10, A_VAR11, A_VAR12, A_VAR13, A_VAR14, A_VAR15, A_VAR16, A_VAR17, A_VAR18. mailings3 -... | what is the ratio of male and female among the age of teenager when the education is above 10? |
software_company | select geoid, inhabitants_k * income_k * 12 from demog where income_k > 3300 | Question: what is the geographic id and total income per year when the average income is above 3300 dollar. | Tables: Demog -> GEOID, INHABITANTS_K, INCOME_K, A_VAR1, A_VAR2, A_VAR3, A_VAR4, A_VAR5, A_VAR6, A_VAR7, A_VAR8, A_VAR9, A_VAR10, A_VAR11, A_VAR12, A_VAR13, A_VAR14, A_VAR15, A_VAR16, A_VAR17, A_VAR18. mailings... | what is the geographic id and total income per year when the average income is above 3300 dollar. |
software_company | select response from mailings1_2 group by response order by count(response) desc limit 1 | Question: point out the greater one between the number of actual responding and not responding to mailing. | Tables: Demog -> GEOID, INHABITANTS_K, INCOME_K, A_VAR1, A_VAR2, A_VAR3, A_VAR4, A_VAR5, A_VAR6, A_VAR7, A_VAR8, A_VAR9, A_VAR10, A_VAR11, A_VAR12, A_VAR13, A_VAR14, A_VAR15, A_VAR16, A_VAR17, A_VAR18. mailings3... | point out the greater one between the number of actual responding and not responding to mailing. |
software_company | select t2.inhabitants_k * t2.income_k * 12 from customers as t1 inner join demog as t2 on t1.geoid = t2.geoid where t1.sex = 'female' and t1.occupation = 'sales' | Question: find out the yearly income of geographic id when the customer is female and occupation as sales. | Tables: Demog -> GEOID, INHABITANTS_K, INCOME_K, A_VAR1, A_VAR2, A_VAR3, A_VAR4, A_VAR5, A_VAR6, A_VAR7, A_VAR8, A_VAR9, A_VAR10, A_VAR11, A_VAR12, A_VAR13, A_VAR14, A_VAR15, A_VAR16, A_VAR17, A_VAR18. mailings3... | find out the yearly income of geographic id when the customer is female and occupation as sales. |
software_company | select t1.educationnum, t1.occupation, t1.age from customers as t1 inner join demog as t2 on t1.geoid = t2.geoid where t2.inhabitants_k = 33.658 and t1.sex = 'female' and t1.marital_status = 'widowed' | Question: among the geographic id which has 33.658k of inhabitants, describe the education, occupation and age of female widow. | Tables: Demog -> GEOID, INHABITANTS_K, INCOME_K, A_VAR1, A_VAR2, A_VAR3, A_VAR4, A_VAR5, A_VAR6, A_VAR7, A_VAR8, A_VAR9, A_VAR10, A_VAR11, A_VAR12, A_VAR13, A_VAR14, A_VAR15, A_VAR16, A_VAR1... | among the geographic id which has 33.658k of inhabitants, describe the education, occupation and age of female widow. |
software_company | select t2.response from customers as t1 inner join mailings3 as t2 on t1.id = t2.refid where t1.geoid = 134 | Question: find the response status to customer whose geographic id of 134. | Tables: Demog -> GEOID, INHABITANTS_K, INCOME_K, A_VAR1, A_VAR2, A_VAR3, A_VAR4, A_VAR5, A_VAR6, A_VAR7, A_VAR8, A_VAR9, A_VAR10, A_VAR11, A_VAR12, A_VAR13, A_VAR14, A_VAR15, A_VAR16, A_VAR17, A_VAR18. mailings3 -> REFID, REF_DATE, RESPONSE. C... | find the response status to customer whose geographic id of 134. |
software_company | select t2.income_k, t2.inhabitants_k * t2.income_k * 12 from customers as t1 inner join demog as t2 on t1.geoid = t2.geoid where t1.id = 209556 or t1.id = 290135 | Question: describe the average income per month and yearly income of the geographic id in which customer of id '209556' and '290135'. | Tables: Demog -> GEOID, INHABITANTS_K, INCOME_K, A_VAR1, A_VAR2, A_VAR3, A_VAR4, A_VAR5, A_VAR6, A_VAR7, A_VAR8, A_VAR9, A_VAR10, A_VAR11, A_VAR12, A_VAR13, A_VAR14, A_VAR15, A_VAR16, ... | describe the average income per month and yearly income of the geographic id in which customer of id '209556' and '290135'. |
software_company | select t1.educationnum from customers as t1 inner join mailings1_2 as t2 on t1.id = t2.refid where t2.refid < 10 and t2.response = 'true' | Question: among the reference id of under 10 who got response by marketing department, compare their education status. | Tables: Demog -> GEOID, INHABITANTS_K, INCOME_K, A_VAR1, A_VAR2, A_VAR3, A_VAR4, A_VAR5, A_VAR6, A_VAR7, A_VAR8, A_VAR9, A_VAR10, A_VAR11, A_VAR12, A_VAR13, A_VAR14, A_VAR15, A_VAR16, A_VAR17, A_VAR1... | among the reference id of under 10 who got response by marketing department, compare their education status. |
chicago_crime | select count(*) from community_area where side = 'central' | Question: how many community areas are there in central chicago? | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fbi_code_no, title, description, crime_against. IUCR -... | how many community areas are there in central chicago? |
chicago_crime | select side from community_area where community_area_name = 'lincoln square' | Question: which district is the community area lincoln square grouped into? | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fbi_code_no, title, description, crime_agai... | which district is the community area lincoln square grouped into? |
chicago_crime | select side from community_area group by side order by count(side) desc limit 1 | Question: which district in chicago has the most community areas? | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fbi_code_no, title, description, crime_against. IUCR ... | which district in chicago has the most community areas? |
chicago_crime | select community_area_name from community_area order by population asc limit 1 | Question: which community area has the least population? | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fbi_code_no, title, description, crime_against. IUCR -> iucr_n... | which community area has the least population? |
chicago_crime | select commander from district where district_name = 'central' | Question: who is the person responsible for the crime cases in central chicago? | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fbi_code_no, title, description, crime_... | who is the person responsible for the crime cases in central chicago? |
chicago_crime | select email from district where district_name = 'central' | Question: what is the email address to contact the administrator of central chicago? | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fbi_code_no, title, description, c... | what is the email address to contact the administrator of central chicago? |
chicago_crime | select t2.community_area_name from neighborhood as t1 inner join community_area as t2 on t1.community_area_no = t2.community_area_no where t1.neighborhood_name = 'albany park' | Question: to which community area does the neighborhood albany park belong? | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fbi_code_no, title, description, crime_agai... | to which community area does the neighborhood albany park belong? |
chicago_crime | select count(t3.community_area_no) from ( select t1.community_area_no from community_area as t1 inner join neighborhood as t2 on t1.community_area_no = t2.community_area_no where community_area_name = 'lincoln square' group by t1.community_area_no ) t3 | Question: how many neighborhoods are there in the community area of lincoln square? | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fbi_code_no, title, description, cr... | how many neighborhoods are there in the community area of lincoln square? |
chicago_crime | select t1.neighborhood_name from neighborhood as t1 inner join community_area as t2 on t2.community_area_no = t2.community_area_no order by t2.population desc limit 1 | Question: please list the names of all the neighborhoods in the community area with the most population. | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fbi_code_no, t... | please list the names of all the neighborhoods in the community area with the most population. |
chicago_crime | select t2.neighborhood_name from community_area as t1 inner join neighborhood as t2 on t1.community_area_no = t2.community_area_no where t1.side = 'central' | Question: please list the names of all the neighborhoods in central chicago. | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fbi_code_no, title, description, crime_aga... | please list the names of all the neighborhoods in central chicago. |
chicago_crime | select t2.latitude, t2.longitude from district as t1 inner join crime as t2 on t1.district_no = t2.district_no where t1.district_name = 'central' | Question: please list the precise location coordinates of all the crimes in central chicago. | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fbi_code_no, title, descri... | please list the precise location coordinates of all the crimes in central chicago. |
chicago_crime | select count(*) from crime as t1 inner join district as t2 on t1.district_no = t2.district_no where t2.district_name = 'central' | Question: how many crimes had happened in central chicago? | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fbi_code_no, title, description, crime_against. IUCR -> iucr... | how many crimes had happened in central chicago? |
chicago_crime | select count(*) from crime as t1 inner join district as t2 on t1.district_no = t2.district_no where t2.district_name = 'central' and t1.domestic = 'true' | Question: among all the crimes that had happened in central chicago, how many of them were cases of domestic violence? | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> ... | among all the crimes that had happened in central chicago, how many of them were cases of domestic violence? |
chicago_crime | select count(*) from crime as t1 inner join district as t2 on t1.district_no = t2.district_no where t2.district_name = 'central' and t1.arrest = 'false' | Question: please list the case numbers of all the crimes with no arrest made in central chicago. | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fbi_code_no, title, de... | please list the case numbers of all the crimes with no arrest made in central chicago. |
chicago_crime | select count(t2.report_no) from community_area as t1 inner join crime as t2 on t1.community_area_no = t2.community_area_no group by t1.community_area_name order by t1.population desc limit 1 | Question: how many crimes had happened in the community area with the most population? | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fbi_code_no, title, description,... | how many crimes had happened in the community area with the most population? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.