db_id
stringlengths
4
31
SQL
stringlengths
18
1.45k
input_sequence
stringlengths
148
11k
question
stringlengths
16
325
retail_complains
select t1.last from client as t1 inner join callcenterlogs as t2 on t1.client_id = t2.`rand client` where t2.type = 'ps' and t2.server = 'tova'
Question: lists the last name of all clients who made a ps-type complaint and were served by tova. | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_start, ser_exit, ser_time. client -> client_id, ...
lists the last name of all clients who made a ps-type complaint and were served by tova.
retail_complains
select count(t2.age) from reviews as t1 inner join client as t2 on t1.district_id = t2.district_id where t1.product = 'eagle national mortgage' and t1.stars = 1 and t2.age < 35
Question: how many clients under the age of 35 gave eagle national mortgage 1 star? | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_start, ser_exit, ser_time. client -> client_id, sex, day, month...
how many clients under the age of 35 gave eagle national mortgage 1 star?
retail_complains
select count(t1.sex) from client as t1 inner join callcenterlogs as t2 on t1.client_id = t2.`rand client` where t1.sex = 'male' and t2.priority = 0 and t1.year = 1997
Question: how many male clients born in the year 1977 were given priority 0 in their complaints? | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_start, ser_exit, ser_time. client -> client_id, se...
how many male clients born in the year 1977 were given priority 0 in their complaints?
retail_complains
select t1.first, t1.middle, t1.last from client as t1 inner join events as t2 on t1.client_id = t2.client_id where t2.tags = 'older american' and t2.`consumer consent provided?` != 'n/a' and t2.`consumer consent provided?` is not null and t2.`consumer consent provided?` != ''
Question: list by name all customers who provided consent for the tag older american. | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_start, ser_exit, ser_time. client -> client_id, sex, day, mon...
list by name all customers who provided consent for the tag older american.
retail_complains
select t2.state from callcenterlogs as t1 inner join client as t2 on t1.`rand client` = t2.client_id inner join district as t3 on t2.district_id = t3.district_id inner join state as t4 on t3.state_abbrev = t4.statecode where t1.priority = 0 group by t2.state order by count(t2.state) desc limit 1
Question: what is the name of the state in which there have been the largest number of complaints with priority 0? | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_start, ser_exit, ser_time. clien...
what is the name of the state in which there have been the largest number of complaints with priority 0?
retail_complains
select count(t1.`complaint id`) from callcenterlogs as t1 inner join client as t2 on t1.`rand client` = t2.client_id inner join events as t3 on t1.`complaint id` = t3.`complaint id` where t2.sex = 'female' and t1.ser_start between '15:00:01' and '23:59:59' and t3.`timely response?` = 'yes'
Question: how many complaints made by women and served after 3 pm received a timely response from the company? | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_start, ser_exit, ser_time. client ->...
how many complaints made by women and served after 3 pm received a timely response from the company?
retail_complains
select count(t1.`complaint id`) from callcenterlogs as t1 inner join events as t2 on t1.`complaint id` = t2.`complaint id` where t1.ser_time < '00:05:00' and t1.server = 'dorit' and t2.`submitted via` = 'phone' and t2.`company response to consumer` = 'closed with explanation'
Question: how many complaints were served in 5 minutes or less by dorit and responded to the customer with an explanation, were made by phone? | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_star...
how many complaints were served in 5 minutes or less by dorit and responded to the customer with an explanation, were made by phone?
retail_complains
select count(t2.client_id) from district as t1 inner join client as t2 on t1.district_id = t2.district_id inner join state as t3 on t1.state_abbrev = t3.statecode where t2.last = 'alvarado' and t2.state = 'md'
Question: how many clients with the last name alvarado are from maryland? | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_start, ser_exit, ser_time. client -> client_id, sex, day, month, year, ag...
how many clients with the last name alvarado are from maryland?
retail_complains
select count(t1.reviews) from reviews as t1 inner join client as t2 on t1.district_id = t2.district_id where t2.age between 30 and 50 and t1.reviews like '%great%'
Question: how many reviews by people between 30 and 50 years include the word 'great'? | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_start, ser_exit, ser_time. client -> client_id, sex, day, mo...
how many reviews by people between 30 and 50 years include the word 'great'?
retail_complains
select t1.address_1, t1.address_2 from client as t1 inner join events as t2 on t1.client_id = t2.client_id where t2.`timely response?` = 'yes' and t2.`consumer disputed?` = 'yes'
Question: what is the full address of the customers who, having received a timely response from the company, have dispute about that response? | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_star...
what is the full address of the customers who, having received a timely response from the company, have dispute about that response?
retail_complains
select count(t2.`submitted via`) from client as t1 inner join events as t2 on t1.client_id = t2.client_id where t1.sex = 'female' and t1.year = 2000 and t2.`submitted via` != 'web'
Question: how many complaints from female clients born in the year 2000 were not sent through the web? | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_start, ser_exit, ser_time. client -> client_...
how many complaints from female clients born in the year 2000 were not sent through the web?
retail_complains
select t2.`consumer complaint narrative` from client as t1 inner join events as t2 on t1.client_id = t2.client_id where t1.first = 'brenda' and t1.last = 'mayer'
Question: list all the complaints narratives made by the customer named brenda and last name mayer. | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_start, ser_exit, ser_time. client -> client_id,...
list all the complaints narratives made by the customer named brenda and last name mayer.
retail_complains
select count(t1.email) from client as t1 inner join callcenterlogs as t2 on t1.client_id = t2.`rand client` where (t2.`date received` like '2017-02%' or t2.`date received` like '2017-01%') and t1.email like '%@gmail.com'
Question: how many complaints from customers with a gmail.com email were received by the company in february 2017? | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_start, ser_exit, ser_time. clien...
how many complaints from customers with a gmail.com email were received by the company in february 2017?
retail_complains
select cast(sum(t3.stars) as real) / count(t3.stars) as average from state as t1 inner join district as t2 on t1.statecode = t2.state_abbrev inner join reviews as t3 on t2.district_id = t3.district_id where t1.state = 'oregon'
Question: what is the average number of stars given by oregon clients in their reviews? | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_start, ser_exit, ser_time. client -> client_id, sex, day, m...
what is the average number of stars given by oregon clients in their reviews?
retail_complains
select cast(sum(case when t1.age > 50 then 1 else 0 end) as real) * 100 / count(t2.`submitted via`) from client as t1 inner join events as t2 on t1.client_id = t2.client_id where t2.`submitted via` = 'postal mail'
Question: what percentage of clients who sent their complaints by postal mail are age 50 and older? | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_start, ser_exit, ser_time. client -> client_id,...
what percentage of clients who sent their complaints by postal mail are age 50 and older?
retail_complains
select cast(sum(t1.age) as real) / count(t1.age) as average from client as t1 inner join district as t2 on t1.district_id = t2.district_id where t2.city = 'norwalk'
Question: what is the average age of norwalk clients? | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_start, ser_exit, ser_time. client -> client_id, sex, day, month, year, age, social, first, mi...
what is the average age of norwalk clients?
retail_complains
select count(t1.stars) from reviews as t1 inner join district as t2 on t1.district_id = t2.district_id where t2.city = 'kansas city' and t1.stars = 1
Question: how many clients who live in kansas city provided a 1-star review? | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_start, ser_exit, ser_time. client -> client_id, sex, day, month, year,...
how many clients who live in kansas city provided a 1-star review?
retail_complains
select t2.state_abbrev from reviews as t1 inner join district as t2 on t1.district_id = t2.district_id where t1.stars = 5 group by t2.state_abbrev order by count(t2.state_abbrev) desc limit 1
Question: which state has the highest number of clients who gave a 5-star review? | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_start, ser_exit, ser_time. client -> client_id, sex, day, month, ...
which state has the highest number of clients who gave a 5-star review?
retail_complains
select t2.division from client as t1 inner join district as t2 on t1.district_id = t2.district_id where t1.first = 'noah' and t1.last = 'thompson'
Question: which region does noah thompson live in? | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_start, ser_exit, ser_time. client -> client_id, sex, day, month, year, age, social, first, middl...
which region does noah thompson live in?
retail_complains
select distinct t2.`submitted via` from client as t1 inner join events as t2 on t1.client_id = t2.client_id where t1.first = 'kyran' and t1.last = 'muller'
Question: how did kyran muller submit his complaint? | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_start, ser_exit, ser_time. client -> client_id, sex, day, month, year, age, social, first, mid...
how did kyran muller submit his complaint?
retail_complains
select distinct t2.product from client as t1 inner join events as t2 on t1.client_id = t2.client_id where t1.year > 2005
Question: what are the products that people who were born after 2005 complain about? | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_start, ser_exit, ser_time. client -> client_id, sex, day, mont...
what are the products that people who were born after 2005 complain about?
retail_complains
select t3.ser_time from events as t1 inner join client as t2 on t1.client_id = t2.client_id inner join callcenterlogs as t3 on t1.`complaint id` = t3.`complaint id` where t2.first = 'kendall' and t2.last = 'allen' and t2.sex = 'female' and t1.product = 'credit card'
Question: how long was kendall allen's complaint about her credit card? | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_start, ser_exit, ser_time. client -> client_id, sex, day, month, year, age,...
how long was kendall allen's complaint about her credit card?
retail_complains
select t2.issue from callcenterlogs as t1 inner join events as t2 on t1.`complaint id` = t2.`complaint id` where t1.ser_time = ( select max(ser_time) from callcenterlogs )
Question: what was the issue that the client with the longest server time faced? | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_start, ser_exit, ser_time. client -> client_id, sex, day, month, y...
what was the issue that the client with the longest server time faced?
retail_complains
select count(t1.client_id) from client as t1 inner join events as t2 on t1.client_id = t2.client_id where t1.city = 'new york city' and t2.`submitted via` = 'fax'
Question: how many clients who live in new york city submitted their complaints via fax? | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_start, ser_exit, ser_time. client -> client_id, sex, day, ...
how many clients who live in new york city submitted their complaints via fax?
retail_complains
select cast(sum(case when t1.sex = 'male' then 1 else 0 end) as real) * 100 / count(t1.sex) from client as t1 inner join events as t2 on t1.client_id = t2.client_id where t2.product = 'credit card'
Question: what is the percentage of male clients complaining about their credit cards? | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_start, ser_exit, ser_time. client -> client_id, sex, day, mo...
what is the percentage of male clients complaining about their credit cards?
retail_complains
select t1.first, t1.middle, t1.last from client as t1 inner join events as t2 on t1.client_id = t2.client_id where t2.tags = 'older american' and t2.`consumer consent provided?` in (null, 'n/a', '') limit 2
Question: please list any two clients with their full names who have been tagged as 'older american' by the company without seeking their permission. | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, s...
please list any two clients with their full names who have been tagged as 'older american' by the company without seeking their permission.
retail_complains
select day, month, year from client order by year desc, month desc, day desc limit 1
Question: what is the birth date of the youngest client? | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_start, ser_exit, ser_time. client -> client_id, sex, day, month, year, age, social, first,...
what is the birth date of the youngest client?
retail_complains
select count(`timely response?`) from events where `timely response?` = 'no' and `consumer disputed?` = 'no'
Question: how many times does the consumer have no dispute over a non-timely response from the company? | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_start, ser_exit, ser_time. client -> client...
how many times does the consumer have no dispute over a non-timely response from the company?
retail_complains
select count(ser_time) from callcenterlogs where strftime('%m', ser_time) > '15'
Question: how many of the complaints are longer than 15 minutes? | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_start, ser_exit, ser_time. client -> client_id, sex, day, month, year, age, social...
how many of the complaints are longer than 15 minutes?
retail_complains
select t1.issue from events as t1 inner join callcenterlogs as t2 on t1.`complaint id` = t2.`complaint id` where t2.priority = 2 group by t1.issue order by count(t1.issue) desc limit 1
Question: what is the most common issue for the highest priority complaints? | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_start, ser_exit, ser_time. client -> client_id, sex, day, month, year,...
what is the most common issue for the highest priority complaints?
retail_complains
select t2.first, t2.middle, t2.last from district as t1 inner join client as t2 on t1.district_id = t2.district_id where t1.division = 'pacific'
Question: list the full names of all clients who live in the pacific division. | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_start, ser_exit, ser_time. client -> client_id, sex, day, month, yea...
list the full names of all clients who live in the pacific division.
retail_complains
select t1.social from client as t1 inner join events as t2 on t1.client_id = t2.client_id group by t1.client_id order by count(t1.client_id) desc limit 1
Question: what is the social number of the person who made the most complaints? | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_start, ser_exit, ser_time. client -> client_id, sex, day, month, ye...
what is the social number of the person who made the most complaints?
retail_complains
select t2.city from reviews as t1 inner join district as t2 on t1.district_id = t2.district_id where t1.stars = 1 group by t2.city order by count(t2.city) desc limit 1
Question: which is the city where most of the 1 star reviews come from? | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_start, ser_exit, ser_time. client -> client_id, sex, day, month, year, age,...
which is the city where most of the 1 star reviews come from?
retail_complains
select t1.address_1, t1.address_2 from client as t1 inner join events as t2 on t1.client_id = t2.client_id where t2.`date received` = '2012-03-14' and t2.`submitted via` = 'postal mail'
Question: what is the address of the client who made a complaint via postal mail on march 14, 2012? | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_start, ser_exit, ser_time. client -> client_id,...
what is the address of the client who made a complaint via postal mail on march 14, 2012?
retail_complains
select count(t1.client_id) from client as t1 inner join callcenterlogs as t2 on t1.client_id = t2.`rand client` where t1.sex = 'female' and t2.priority = 1
Question: among the female clients, how many of them have a complaint with a priority of 1? | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_start, ser_exit, ser_time. client -> client_id, sex, da...
among the female clients, how many of them have a complaint with a priority of 1?
retail_complains
select distinct t2.server from events as t1 inner join callcenterlogs as t2 on t1.`complaint id` = t2.`complaint id` where t1.`submitted via` = 'phone' and t1.`timely response?` = 'no'
Question: list all the server of the phone complaints with a late response from the company. | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_start, ser_exit, ser_time. client -> client_id, sex, d...
list all the server of the phone complaints with a late response from the company.
retail_complains
select distinct t2.issue from client as t1 inner join events as t2 on t1.client_id = t2.client_id where t1.first = 'kaitlyn' and t1.middle = 'eliza' and t1.last = 'elliott'
Question: list all the issues of the complaints made by kaitlyn eliza elliott. | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_start, ser_exit, ser_time. client -> client_id, sex, day, month, yea...
list all the issues of the complaints made by kaitlyn eliza elliott.
retail_complains
select t3.state from state as t1 inner join district as t2 on t1.statecode = t2.state_abbrev inner join client as t3 on t2.district_id = t3.district_id where t3.email = 'skylar.ramirez@gmail.com'
Question: what is the name of the state that the client with the email 'skylar.ramirez@gmail.com' lives in? | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_start, ser_exit, ser_time. client -> cl...
what is the name of the state that the client with the email 'skylar.ramirez@gmail.com' lives in?
retail_complains
select t2.division from client as t1 inner join district as t2 on t1.district_id = t2.district_id group by t2.division order by count(t2.division) desc limit 1, 1
Question: which region has the second most clients? | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_start, ser_exit, ser_time. client -> client_id, sex, day, month, year, age, social, first, midd...
which region has the second most clients?
retail_complains
select t1.first, t1.middle, t1.last from client as t1 inner join callcenterlogs as t2 on t1.client_id = t2.`rand client` where t2.server = 'moriah' and t2.`date received` = '2013-09-11'
Question: who is the owner of the final phone number for the complaints on server 'moriah' on 9/11/2013? | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_start, ser_exit, ser_time. client -> clien...
who is the owner of the final phone number for the complaints on server 'moriah' on 9/11/2013?
retail_complains
select cast(sum(case when t1.age > 13 and t1.age <= 19 then 60 * strftime('%h', ser_time) + strftime('%m', ser_time) + strftime('%s', ser_time) / 60 else 0 end) as real) / sum(case when t1.age > 13 and t1.age <= 19 then 1 else 0 end) as teenageraveragemins, cast(sum(case when t1.age > 19 and t1.age <= 65 then 60 * strf...
Question: compute the average time in minute for each age group | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_start, ser_exit, ser_time. client -> client_id, sex, day, month, year, age, social,...
compute the average time in minute for each age group
retail_complains
select cast(sum(case when t1.age > 65 then 1 else 0 end) as real) * 100 / count(t1.age) from client as t1 inner join events as t2 on t1.client_id = t2.client_id
Question: what percentage of complaints are from the elderly? | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_start, ser_exit, ser_time. client -> client_id, sex, day, month, year, age, social, f...
what percentage of complaints are from the elderly?
retail_complains
select cast(sum(case when sex = 'male' then 1 else 0 end) as real) * 100 / count(client_id) from client where city = 'indianapolis'
Question: calculate the percentage of male clients from indianapolis city. | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_start, ser_exit, ser_time. client -> client_id, sex, day, month, year, a...
calculate the percentage of male clients from indianapolis city.
retail_complains
select case when sum(case when email like '%@gmail.com' then 1 else 0 end) > sum(case when email like '%@outlook.com' then 1 else 0 end) then 'google account' else 'microsoft account' end from client where age between 13 and 19
Question: among the teenager clients who use google account and microsoft account, which group of client is more than the other? | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_start, ser_exit, s...
among the teenager clients who use google account and microsoft account, which group of client is more than the other?
retail_complains
select first, middle, last from client where email = 'emily.garcia43@outlook.com'
Question: what is the full name of client whose email address is emily.garcia43@outlook.com? | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_start, ser_exit, ser_time. client -> client_id, sex, d...
what is the full name of client whose email address is emily.garcia43@outlook.com?
retail_complains
select t1.first from client as t1 inner join callcenterlogs as t2 on t1.client_id = t2.`rand client` where t2.priority = ( select max(priority) from callcenterlogs )
Question: what is the first name of clients who have the highest priority? | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_start, ser_exit, ser_time. client -> client_id, sex, day, month, year, a...
what is the first name of clients who have the highest priority?
retail_complains
select t1.email from client as t1 inner join callcenterlogs as t2 on t1.client_id = t2.`rand client` where t2.type = 'ps'
Question: list down the email of client whose complaint is type 'ps'. | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_start, ser_exit, ser_time. client -> client_id, sex, day, month, year, age, s...
list down the email of client whose complaint is type 'ps'.
retail_complains
select t1.last from client as t1 inner join callcenterlogs as t2 on t1.client_id = t2.`rand client` where t1.age > 65 and t2.server = 'yifat'
Question: among the elderlies, state the last name of whose complaint is handled in server yifat? | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_start, ser_exit, ser_time. client -> client_id, s...
among the elderlies, state the last name of whose complaint is handled in server yifat?
retail_complains
select count(t2.`rand client`) from client as t1 inner join callcenterlogs as t2 on t1.client_id = t2.`rand client` where t1.city = 'new york city' and t2.outcome = 'agent'
Question: how many clients who live in new york city have the complaint outcome as 'agent'? | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_start, ser_exit, ser_time. client -> client_id, sex, da...
how many clients who live in new york city have the complaint outcome as 'agent'?
retail_complains
select t1.first, t1.middle, t1.last from client as t1 inner join events as t2 on t1.client_id = t2.client_id where t2.`consumer disputed?` = 'yes'
Question: list down the full name of clients who have disputed the response from company. | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_start, ser_exit, ser_time. client -> client_id, sex, day,...
list down the full name of clients who have disputed the response from company.
retail_complains
select t2.`complaint id` from client as t1 inner join callcenterlogs as t2 on t1.client_id = t2.`rand client` where t1.year = 1931
Question: what are the complaint id of client who were born in 1931? | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_start, ser_exit, ser_time. client -> client_id, sex, day, month, year, age, so...
what are the complaint id of client who were born in 1931?
retail_complains
select cast(sum(case when t1.email like '%@gmail.com' then 1 else 0 end) as real) * 100 / count(t1.email) from client as t1 inner join callcenterlogs as t2 on t1.client_id = t2.`rand client` where t2.server = 'zohari'
Question: calculate the percentage of complaints made by google account client in server zohari. | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_start, ser_exit, ser_time. client -> client_id, se...
calculate the percentage of complaints made by google account client in server zohari.
retail_complains
select t1.first, t1.middle, t1.last from client as t1 inner join callcenterlogs as t2 on t1.client_id = t2.`rand client` where strftime('%m', t2.ser_time) > '20'
Question: state the full name of clients with server time of 20 minutes and above. | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_start, ser_exit, ser_time. client -> client_id, sex, day, month,...
state the full name of clients with server time of 20 minutes and above.
retail_complains
select t1.last from client as t1 inner join callcenterlogs as t2 on t1.client_id = t2.`rand client` where t2.priority = 0 limit 5
Question: pick 5 clients with 0 priority and write down their last name. | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_start, ser_exit, ser_time. client -> client_id, sex, day, month, year, age...
pick 5 clients with 0 priority and write down their last name.
retail_complains
select t2.call_id from client as t1 inner join callcenterlogs as t2 on t1.client_id = t2.`rand client` where t1.first like 'b%'
Question: write down the call id of clients whose first name start with alphabet 'b'. | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_start, ser_exit, ser_time. client -> client_id, sex, day, mon...
write down the call id of clients whose first name start with alphabet 'b'.
retail_complains
select distinct t2.product from client as t1 inner join events as t2 on t1.client_id = t2.client_id where t1.first = 'alexander' and t1.middle = 'bronx' and t1.last = 'lewis'
Question: what is the product complained by alexander bronx lewis? | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_start, ser_exit, ser_time. client -> client_id, sex, day, month, year, age, soci...
what is the product complained by alexander bronx lewis?
retail_complains
select t1.first from client as t1 inner join events as t2 on t1.client_id = t2.client_id where t2.`timely response?` = 'no' and t1.sex = 'male'
Question: state the first name of male clients who did not receive timely response from the call center. | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_start, ser_exit, ser_time. client -> clien...
state the first name of male clients who did not receive timely response from the call center.
retail_complains
select t2.product from client as t1 inner join events as t2 on t1.client_id = t2.client_id where t1.age > 65 order by t1.client_id desc limit 1
Question: which product received the most complaints from elder clients? | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_start, ser_exit, ser_time. client -> client_id, sex, day, month, year, age...
which product received the most complaints from elder clients?
retail_complains
select sum(case when t1.age > 13 and t1.age <= 19 then 1 else 0 end), sum(case when t1.age > 19 and t1.age <= 65 then 1 else 0 end) as adult , sum(case when t1.age > 65 then 1 else 0 end) as elder from client as t1 inner join events as t2 on t1.client_id = t2.client_id where t2.product = 'credit card'
Question: complaint about credit card mostly came from clients of which age group? | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_start, ser_exit, ser_time. client -> client_id, sex, day, month,...
complaint about credit card mostly came from clients of which age group?
retail_complains
select t2.issue from callcenterlogs as t1 inner join events as t2 on t1.`complaint id` = t2.`complaint id` where strftime('%m', t1.ser_time) < '10'
Question: list down the issues for complaint with server time of below 10 minutes. | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_start, ser_exit, ser_time. client -> client_id, sex, day, month,...
list down the issues for complaint with server time of below 10 minutes.
retail_complains
select t1.`date received` from callcenterlogs as t1 inner join events as t2 on t1.`complaint id` = t2.`complaint id` where t2.`submitted via` = 'fax'
Question: write down the date received of complaints sent via fax. | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_start, ser_exit, ser_time. client -> client_id, sex, day, month, year, age, soci...
write down the date received of complaints sent via fax.
retail_complains
select t1.first, t1.middle, t1.last from client as t1 inner join events as t2 on t1.client_id = t2.client_id where t2.issue = 'balance transfer'
Question: what is the full name of clients who have issue about balance transfer? | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_start, ser_exit, ser_time. client -> client_id, sex, day, month, ...
what is the full name of clients who have issue about balance transfer?
retail_complains
select t1.email from client as t1 inner join events as t2 on t1.client_id = t2.client_id where t2.`submitted via` = 'postal mail'
Question: what is the email address of clients who submitted their complaints via postal mail? | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_start, ser_exit, ser_time. client -> client_id, sex,...
what is the email address of clients who submitted their complaints via postal mail?
retail_complains
select avg(t1.age) from client as t1 inner join events as t2 on t1.client_id = t2.client_id where t2.`company response to consumer` = 'closed with relief'
Question: calculate the average age of clients whose response is 'closed with relief'. | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_start, ser_exit, ser_time. client -> client_id, sex, day, mo...
calculate the average age of clients whose response is 'closed with relief'.
retail_complains
select avg(t1.age) from client as t1 inner join callcenterlogs as t2 on t1.client_id = t2.`rand client` where t2.type = 'tt'
Question: what is the average age of clients whose complaint type is 'tt'? | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_start, ser_exit, ser_time. client -> client_id, sex, day, month, year, a...
what is the average age of clients whose complaint type is 'tt'?
retail_complains
select `complaint id`, call_id, phonefinal from callcenterlogs where strftime('%y', `date received`) = '2014' and server = 'avidan'
Question: write the complaint id, call id, and final phone number of complaints through avidan server from 1/1/2014 to 12/30/2014. | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_start, ser_exit,...
write the complaint id, call id, and final phone number of complaints through avidan server from 1/1/2014 to 12/30/2014.
retail_complains
select avg(cast(substr(ser_time, 4, 2) as real)) from callcenterlogs where `date received` between '2017-01-01' and '2017-04-01'
Question: between 1/1/2017 and 4/1/2017, what is the average server time of calls under the server darmon? | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_start, ser_exit, ser_time. client -> cli...
between 1/1/2017 and 4/1/2017, what is the average server time of calls under the server darmon?
retail_complains
select strftime('%y', `date received`), count(`date received`) from events where product = 'credit card' and issue = 'overlimit fee' group by strftime('%y', `date received`) having count(`date received`)
Question: how many times per year does a credit card customer complain about overlimit fees? | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_start, ser_exit, ser_time. client -> client_id, sex, d...
how many times per year does a credit card customer complain about overlimit fees?
retail_complains
select count(t1.sex) from client as t1 inner join district as t2 on t1.district_id = t2.district_id where t2.division = 'middle atlantic' and t1.sex = 'female' and t1.age < 18
Question: among the clients in middle atlantic, how many are them are female and no more than 18 years old? | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_start, ser_exit, ser_time. client -> cl...
among the clients in middle atlantic, how many are them are female and no more than 18 years old?
retail_complains
select t1.year, t1.month, t1.day, t1.email, t1.phone from client as t1 inner join district as t2 on t1.district_id = t2.district_id where t2.city = 'indianapolis' order by t1.year desc, t1.month desc, t1.day desc limit 1
Question: give me the full birthdate, email and phone number of the youngest client in indianapolis . | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_start, ser_exit, ser_time. client -> client_i...
give me the full birthdate, email and phone number of the youngest client in indianapolis .
retail_complains
select t2.city from reviews as t1 inner join district as t2 on t1.district_id = t2.district_id where t1.stars = 5 and t1.date like '2016%' order by t1.date desc limit 5
Question: list the top five cities in terms of the number of 5-star ratings in 2016 reviews, in descending order. | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_start, ser_exit, ser_time. client...
list the top five cities in terms of the number of 5-star ratings in 2016 reviews, in descending order.
retail_complains
select max(t1.ser_time) from callcenterlogs as t1 inner join events as t2 on t1.`complaint id` = t2.`complaint id` where t2.issue = 'arbitration'
Question: what is the longest server time when the call is about the issue of arbitration? | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_start, ser_exit, ser_time. client -> client_id, sex, day...
what is the longest server time when the call is about the issue of arbitration?
retail_complains
select t1.social, t1.state from client as t1 inner join district as t2 on t1.district_id = t2.district_id inner join state as t3 on t2.state_abbrev = t3.statecode where t1.phone = '100-121-8371'
Question: give me the social number and state of the client whose phone number is 100-121-8371. | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_start, ser_exit, ser_time. client -> client_id, sex...
give me the social number and state of the client whose phone number is 100-121-8371.
retail_complains
select t1.first, t1.middle, t1.last, t1.phone from client as t1 inner join district as t2 on t1.district_id = t2.district_id where t2.division = 'pacific'
Question: list the full names and phone numbers of clients that were from the pacific. | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_start, ser_exit, ser_time. client -> client_id, sex, day, mo...
list the full names and phone numbers of clients that were from the pacific.
retail_complains
select t1.social , 365 * (strftime('%y', t2.`date sent to company`) - strftime('%y', t2.`date received`)) + 30 * (strftime('%m', t2.`date sent to company`) - strftime('%m', t2.`date received`)) + (strftime('%d', t2.`date sent to company`) - strftime('%d', t2.`date received`)), t2.`company response to consumer` from cli...
Question: what is the social number of the client who has the longest delay in his/her complaint? calculate the days of delay and state the company's response to the consumer. | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority...
what is the social number of the client who has the longest delay in his/her complaint? calculate the days of delay and state the company's response to the consumer.
retail_complains
select count(sex) from client where sex = 'female' and age > 30
Question: how many female clients are there older than 30? | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_start, ser_exit, ser_time. client -> client_id, sex, day, month, year, age, social, firs...
how many female clients are there older than 30?
retail_complains
select first, last from client where city = 'new york city'
Question: please list all first and last names of clients who live in new york city. | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_start, ser_exit, ser_time. client -> client_id, sex, day, mont...
please list all first and last names of clients who live in new york city.
retail_complains
select max(age) from client where sex = 'male'
Question: what is the oldest age of male clients? | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_start, ser_exit, ser_time. client -> client_id, sex, day, month, year, age, social, first, middle...
what is the oldest age of male clients?
retail_complains
select t2.division, count(t2.division) from client as t1 inner join district as t2 on t1.district_id = t2.district_id group by t2.division
Question: please calculate the number of clients by each division. | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_start, ser_exit, ser_time. client -> client_id, sex, day, month, year, age, soci...
please calculate the number of clients by each division.
retail_complains
select cast(sum(case when t1.sex = 'female' then 1 else 0 end) as real) * 100 / count(t1.sex) from client as t1 inner join district as t2 on t1.district_id = t2.district_id where t2.division = 'south atlantic'
Question: what is the percentage of female clients in the middle atlantic? | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_start, ser_exit, ser_time. client -> client_id, sex, day, month, year, a...
what is the percentage of female clients in the middle atlantic?
retail_complains
select avg(t1.age) from client as t1 inner join district as t2 on t1.district_id = t2.district_id where t2.division = 'south atlantic'
Question: what is the average age of clients in south atlantic? | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_start, ser_exit, ser_time. client -> client_id, sex, day, month, year, age, social,...
what is the average age of clients in south atlantic?
retail_complains
select t2.city from client as t1 inner join district as t2 on t1.district_id = t2.district_id inner join state as t3 on t2.state_abbrev = t3.statecode where t3.region = 'midwest' group by t2.city order by count(t2.city) limit 1
Question: which city in the midwest region has the least number of clients? | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_start, ser_exit, ser_time. client -> client_id, sex, day, month, year, ...
which city in the midwest region has the least number of clients?
retail_complains
select count(t1.email) from client as t1 inner join district as t2 on t1.district_id = t2.district_id inner join state as t3 on t2.state_abbrev = t3.statecode where t3.region = 'northeast' and t1.email like '%@outlook.com'
Question: how many customers in the northeast use microsoft email? | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_start, ser_exit, ser_time. client -> client_id, sex, day, month, year, age, soci...
how many customers in the northeast use microsoft email?
retail_complains
select t2.city from client as t1 inner join district as t2 on t1.district_id = t2.district_id where t2.division = 'west north central' and t1.age > 60 group by t2.city order by count(t2.city) desc limit 1
Question: which city in west north central has the highest number of customers over the age of 60? | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_start, ser_exit, ser_time. client -> client_id, ...
which city in west north central has the highest number of customers over the age of 60?
retail_complains
select cast(sum(case when t1.priority = 2 then 1 else 0 end) as real) * 100 / count(t1.`complaint id`) from callcenterlogs as t1 inner join events as t2 on t1.`complaint id` = t2.`complaint id` where strftime('%y', t1.`date received`) = '2017'
Question: what is the percentage of complaints about the late fee issue whose priority is 2 in 2017? | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_start, ser_exit, ser_time. client -> client_id...
what is the percentage of complaints about the late fee issue whose priority is 2 in 2017?
retail_complains
select state_abbrev from district group by state_abbrev order by count(city) desc limit 1
Question: which state has the most cities? | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_start, ser_exit, ser_time. client -> client_id, sex, day, month, year, age, social, first, middle, last,...
which state has the most cities?
retail_complains
select t1.first, t1.phone from client as t1 inner join events as t2 on t1.client_id = t2.client_id where t2.`complaint id` = 'cr0922485'
Question: please give the first name and phone number of the client whose complaint id is cr0922485. | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_start, ser_exit, ser_time. client -> client_id...
please give the first name and phone number of the client whose complaint id is cr0922485.
retail_complains
select t1.email from client as t1 inner join events as t2 on t1.client_id = t2.client_id where t2.`date received` = '2014-07-03'
Question: please list the emails of the clients whose complaint date received is 7/3/2014. | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_start, ser_exit, ser_time. client -> client_id, sex, day...
please list the emails of the clients whose complaint date received is 7/3/2014.
retail_complains
select count(t1.client_id) from client as t1 inner join events as t2 on t1.client_id = t2.client_id where t1.city = 'omaha' and strftime('%y', t2.`date received`) = '2012' and t2.product = 'credit card'
Question: in 2012, how many complaints about credit card product came from clients in omaha? | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_start, ser_exit, ser_time. client -> client_id, sex, d...
in 2012, how many complaints about credit card product came from clients in omaha?
retail_complains
select count(t1.client_id) from client as t1 inner join events as t2 on t1.client_id = t2.client_id where strftime('%y', t2.`date received`) between '2012' and '2015' and t2.`submitted via` = 'email' and t1.sex = 'male'
Question: from 2012 to 2015, how many complaints were submitted via email from female clients? | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_start, ser_exit, ser_time. client -> client_id, sex,...
from 2012 to 2015, how many complaints were submitted via email from female clients?
retail_complains
select t1.phone, t2.`complaint id` from client as t1 inner join events as t2 on t1.client_id = t2.client_id where t2.`company response to consumer` = 'in progress'
Question: please list all clients' phone numbers and complaint ids which are still in progress. | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_start, ser_exit, ser_time. client -> client_id, sex...
please list all clients' phone numbers and complaint ids which are still in progress.
retail_complains
select count(t1.client_id) from client as t1 inner join events as t2 on t1.client_id = t2.client_id where t1.city = 'portland' and t2.`date received` like '2015%' and t2.issue = 'billing disputes'
Question: in 2015, how many complaints about billing disputes were sent by clients in portland? | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_start, ser_exit, ser_time. client -> client_id, sex...
in 2015, how many complaints about billing disputes were sent by clients in portland?
retail_complains
select cast((sum(case when strftime('%j', t2.`date sent to company`) - strftime('%j', t2.`date received`) > 5 then 1 else 0 end)) as real) * 100 / count(t1.client_id) from client as t1 inner join events as t2 on t1.client_id = t2.client_id where t1.city = 'houston' and strftime('%y', t2.`date received`) = '2014'
Question: in 2014, what is the percentage of complaints from consumers in houston that the delay was over 5 days? | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_start, ser_exit, ser_time. client...
in 2014, what is the percentage of complaints from consumers in houston that the delay was over 5 days?
retail_complains
select count(`submitted via`) from events where strftime('%y', `date received`) = '2012' and `submitted via` = 'email'
Question: in the complains received in 2012, how many of them are submitted through email? | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_start, ser_exit, ser_time. client -> client_id, sex, day...
in the complains received in 2012, how many of them are submitted through email?
retail_complains
select t2.client_id from callcenterlogs as t1 inner join events as t2 on t1.`complaint id` = t2.`complaint id` where t2.`submitted via` = 'fax' and t1.`date received` = '2014-04-16'
Question: give the client id of the complaint received on april 16, 2014 and submitted through fax. | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_start, ser_exit, ser_time. client -> client_id,...
give the client id of the complaint received on april 16, 2014 and submitted through fax.
retail_complains
select t2.date from district as t1 inner join reviews as t2 on t1.district_id = t2.district_id where t2.product = 'eagle capital' and t1.city = 'indianapolis' and t1.state_abbrev = 'in'
Question: list date of the review of the eagle capital from indianapolis, indiana. | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_start, ser_exit, ser_time. client -> client_id, sex, day, month,...
list date of the review of the eagle capital from indianapolis, indiana.
retail_complains
select count(t1.`complaint id`) from callcenterlogs as t1 inner join events as t2 on t1.`complaint id` = t2.`complaint id` where strftime('%y', t1.`date received`) = '2015' and t2.`timely response?` = 'yes' and t2.`company response to consumer` = 'closed with explanation'
Question: among the complaints received in year 2015, what is total number of complaints timely response and closed with an explanation? | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_start, ser...
among the complaints received in year 2015, what is total number of complaints timely response and closed with an explanation?
retail_complains
select distinct t3.`date received` from client as t1 inner join events as t2 on t1.client_id = t2.client_id inner join callcenterlogs as t3 on t2.`complaint id` = t3.`complaint id` where t1.age between 20 and 40 and t1.sex = 'female'
Question: among the female clients that age between 20 to 40, list the date when their complaints were received. | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_start, ser_exit, ser_time. client ...
among the female clients that age between 20 to 40, list the date when their complaints were received.
retail_complains
select t2.product from district as t1 inner join reviews as t2 on t1.district_id = t2.district_id where t1.city = 'newton' and t1.state_abbrev = 'ma' and t2.date = '2016-03-14' and t2.stars = 1
Question: list the product reviewed with 1 star on march 14, 2016 from newton, massachusetts. | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_start, ser_exit, ser_time. client -> client_id, sex, ...
list the product reviewed with 1 star on march 14, 2016 from newton, massachusetts.
retail_complains
select count(t2.stars) from district as t1 inner join reviews as t2 on t1.district_id = t2.district_id where t1.city = 'nashville' and t1.state_abbrev = 'tn' and t2.product = 'eagle national mortgage' and t2.stars = 5
Question: in reviews for the eagle national bank product, how many of the 5 star reviews where from nashville, tennessee? | Tables: state -> StateCode, State, Region. callcenterlogs -> Date received, Complaint ID, rand client, phonefinal, vru+line, call_id, priority, type, outcome, server, ser_start, ser_exit, ser_time...
in reviews for the eagle national bank product, how many of the 5 star reviews where from nashville, tennessee?