1sf/bird-sql-train-with-schema huggingface dataset:
Database: retail_complains
Tables: state, callcenterlogs, client, district, events, reviews
Columns (table index, column name): -1, *, 0, StateCode, 0, State, 0, Region, 1, Date received, 1, Complaint ID, 1, rand client, 1, phonefinal, 1, vru+line, 1, call_id, 1, priority, 1, type, 1, outcome, 1, server, 1, ser_start, 1, ser_exit, 1, ser_time, 2, client_id, 2, sex, 2, day, 2, month, 2, year, 2, age, 2, social, 2, first, 2, middle, 2, last, 2, phone, 2, email, 2, address_1, 2, address_2, 2, city, 2, state, 2, zipcode, 2, district_id, 3, district_id, 3, city, 3, state_abbrev, 3, division, 4, Date received, 4, Product, 4, Sub-product, 4, Issue, 4, Sub-issue, 4, Consumer complaint narrative, 4, Tags, 4, Consumer consent provided?, 4, Submitted via, 4, Date sent to company, 4, Company response to consumer, 4, Timely response?, 4, Consumer disputed?, 4, Complaint ID, 4, Client_ID, 5, Date, 5, Stars, 5, Reviews, 5, Product, 5, district_id
Question: How did Kyran Muller submit his complaint?
Evidence: how it was submitted refers to "Submitted via";
SQL: 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'
Database: retail_complains
Tables: state, callcenterlogs, client, district, events, reviews
Columns (table index, column name): -1, *, 0, StateCode, 0, State, 0, Region, 1, Date received, 1, Complaint ID, 1, rand client, 1, phonefinal, 1, vru+line, 1, call_id, 1, priority, 1, type, 1, outcome, 1, server, 1, ser_start, 1, ser_exit, 1, ser_time, 2, client_id, 2, sex, 2, day, 2, month, 2, year, 2, age, 2, social, 2, first, 2, middle, 2, last, 2, phone, 2, email, 2, address_1, 2, address_2, 2, city, 2, state, 2, zipcode, 2, district_id, 3, district_id, 3, city, 3, state_abbrev, 3, division, 4, Date received, 4, Product, 4, Sub-product, 4, Issue, 4, Sub-issue, 4, Consumer complaint narrative, 4, Tags, 4, Consumer consent provided?, 4, Submitted via, 4, Date sent to company, 4, Company response to consumer, 4, Timely response?, 4, Consumer disputed?, 4, Complaint ID, 4, Client_ID, 5, Date, 5, Stars, 5, Reviews, 5, Product, 5, district_id
Question: What are the products that people who were born after 2005 complain about?
Evidence: year > 2005;
SQL: SELECT DISTINCT T2.Product FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T1.year > 2005
Database: retail_complains
Tables: state, callcenterlogs, client, district, events, reviews
Columns (table index, column name): -1, *, 0, StateCode, 0, State, 0, Region, 1, Date received, 1, Complaint ID, 1, rand client, 1, phonefinal, 1, vru+line, 1, call_id, 1, priority, 1, type, 1, outcome, 1, server, 1, ser_start, 1, ser_exit, 1, ser_time, 2, client_id, 2, sex, 2, day, 2, month, 2, year, 2, age, 2, social, 2, first, 2, middle, 2, last, 2, phone, 2, email, 2, address_1, 2, address_2, 2, city, 2, state, 2, zipcode, 2, district_id, 3, district_id, 3, city, 3, state_abbrev, 3, division, 4, Date received, 4, Product, 4, Sub-product, 4, Issue, 4, Sub-issue, 4, Consumer complaint narrative, 4, Tags, 4, Consumer consent provided?, 4, Submitted via, 4, Date sent to company, 4, Company response to consumer, 4, Timely response?, 4, Consumer disputed?, 4, Complaint ID, 4, Client_ID, 5, Date, 5, Stars, 5, Reviews, 5, Product, 5, district_id
Question: How long was Kendall Allen's complaint about her credit card?
Evidence: how long refers to ser_time; credit card refers to Product = 'Credit Card';
SQL: 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'
Database: retail_complains
Tables: state, callcenterlogs, client, district, events, reviews
Columns (table index, column name): -1, *, 0, StateCode, 0, State, 0, Region, 1, Date received, 1, Complaint ID, 1, rand client, 1, phonefinal, 1, vru+line, 1, call_id, 1, priority, 1, type, 1, outcome, 1, server, 1, ser_start, 1, ser_exit, 1, ser_time, 2, client_id, 2, sex, 2, day, 2, month, 2, year, 2, age, 2, social, 2, first, 2, middle, 2, last, 2, phone, 2, email, 2, address_1, 2, address_2, 2, city, 2, state, 2, zipcode, 2, district_id, 3, district_id, 3, city, 3, state_abbrev, 3, division, 4, Date received, 4, Product, 4, Sub-product, 4, Issue, 4, Sub-issue, 4, Consumer complaint narrative, 4, Tags, 4, Consumer consent provided?, 4, Submitted via, 4, Date sent to company, 4, Company response to consumer, 4, Timely response?, 4, Consumer disputed?, 4, Complaint ID, 4, Client_ID, 5, Date, 5, Stars, 5, Reviews, 5, Product, 5, district_id
Question: What was the issue that the client with the longest server time faced?
Evidence: longest server time refers to MAX(ser_time);
SQL: 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 )
Database: retail_complains
Tables: state, callcenterlogs, client, district, events, reviews
Columns (table index, column name): -1, *, 0, StateCode, 0, State, 0, Region, 1, Date received, 1, Complaint ID, 1, rand client, 1, phonefinal, 1, vru+line, 1, call_id, 1, priority, 1, type, 1, outcome, 1, server, 1, ser_start, 1, ser_exit, 1, ser_time, 2, client_id, 2, sex, 2, day, 2, month, 2, year, 2, age, 2, social, 2, first, 2, middle, 2, last, 2, phone, 2, email, 2, address_1, 2, address_2, 2, city, 2, state, 2, zipcode, 2, district_id, 3, district_id, 3, city, 3, state_abbrev, 3, division, 4, Date received, 4, Product, 4, Sub-product, 4, Issue, 4, Sub-issue, 4, Consumer complaint narrative, 4, Tags, 4, Consumer consent provided?, 4, Submitted via, 4, Date sent to company, 4, Company response to consumer, 4, Timely response?, 4, Consumer disputed?, 4, Complaint ID, 4, Client_ID, 5, Date, 5, Stars, 5, Reviews, 5, Product, 5, district_id
Question: How many clients who live in New York City submitted their complaints via fax?
Evidence: submitted complaints via fax refers to "Submitted via" = 'Fax';
SQL: 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'
Database: retail_complains
Tables: state, callcenterlogs, client, district, events, reviews
Columns (table index, column name): -1, *, 0, StateCode, 0, State, 0, Region, 1, Date received, 1, Complaint ID, 1, rand client, 1, phonefinal, 1, vru+line, 1, call_id, 1, priority, 1, type, 1, outcome, 1, server, 1, ser_start, 1, ser_exit, 1, ser_time, 2, client_id, 2, sex, 2, day, 2, month, 2, year, 2, age, 2, social, 2, first, 2, middle, 2, last, 2, phone, 2, email, 2, address_1, 2, address_2, 2, city, 2, state, 2, zipcode, 2, district_id, 3, district_id, 3, city, 3, state_abbrev, 3, division, 4, Date received, 4, Product, 4, Sub-product, 4, Issue, 4, Sub-issue, 4, Consumer complaint narrative, 4, Tags, 4, Consumer consent provided?, 4, Submitted via, 4, Date sent to company, 4, Company response to consumer, 4, Timely response?, 4, Consumer disputed?, 4, Complaint ID, 4, Client_ID, 5, Date, 5, Stars, 5, Reviews, 5, Product, 5, district_id
Question: What is the percentage of male clients complaining about their credit cards?
Evidence: percentage = MULTIPLY(DIVIDE(SUM(sex = 'Male'), COUNT(client_id)), 1.0); male refers to sex = 'Male'; credit cards refers to Product = 'Credit card';
SQL: 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'
Database: retail_complains
Tables: state, callcenterlogs, client, district, events, reviews
Columns (table index, column name): -1, *, 0, StateCode, 0, State, 0, Region, 1, Date received, 1, Complaint ID, 1, rand client, 1, phonefinal, 1, vru+line, 1, call_id, 1, priority, 1, type, 1, outcome, 1, server, 1, ser_start, 1, ser_exit, 1, ser_time, 2, client_id, 2, sex, 2, day, 2, month, 2, year, 2, age, 2, social, 2, first, 2, middle, 2, last, 2, phone, 2, email, 2, address_1, 2, address_2, 2, city, 2, state, 2, zipcode, 2, district_id, 3, district_id, 3, city, 3, state_abbrev, 3, division, 4, Date received, 4, Product, 4, Sub-product, 4, Issue, 4, Sub-issue, 4, Consumer complaint narrative, 4, Tags, 4, Consumer consent provided?, 4, Submitted via, 4, Date sent to company, 4, Company response to consumer, 4, Timely response?, 4, Consumer disputed?, 4, Complaint ID, 4, Client_ID, 5, Date, 5, Stars, 5, Reviews, 5, Product, 5, district_id
Question: Please list any two clients with their full names who have been tagged as "Older American" by the company without seeking their permission.
Evidence: full names = first, middle, last; without seeking their permission refers to "Consumer consent provided?" in (null, 'N/A' or 'empty');
SQL: 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
Database: retail_complains
Tables: state, callcenterlogs, client, district, events, reviews
Columns (table index, column name): -1, *, 0, StateCode, 0, State, 0, Region, 1, Date received, 1, Complaint ID, 1, rand client, 1, phonefinal, 1, vru+line, 1, call_id, 1, priority, 1, type, 1, outcome, 1, server, 1, ser_start, 1, ser_exit, 1, ser_time, 2, client_id, 2, sex, 2, day, 2, month, 2, year, 2, age, 2, social, 2, first, 2, middle, 2, last, 2, phone, 2, email, 2, address_1, 2, address_2, 2, city, 2, state, 2, zipcode, 2, district_id, 3, district_id, 3, city, 3, state_abbrev, 3, division, 4, Date received, 4, Product, 4, Sub-product, 4, Issue, 4, Sub-issue, 4, Consumer complaint narrative, 4, Tags, 4, Consumer consent provided?, 4, Submitted via, 4, Date sent to company, 4, Company response to consumer, 4, Timely response?, 4, Consumer disputed?, 4, Complaint ID, 4, Client_ID, 5, Date, 5, Stars, 5, Reviews, 5, Product, 5, district_id
Question: What is the birth date of the youngest client?
Evidence: birth date refers to year, month, day; youngest client refers to max(year, month, day)
SQL: SELECT day, month, year FROM client ORDER BY year DESC, month DESC, day DESC LIMIT 1
Database: retail_complains
Tables: state, callcenterlogs, client, district, events, reviews
Columns (table index, column name): -1, *, 0, StateCode, 0, State, 0, Region, 1, Date received, 1, Complaint ID, 1, rand client, 1, phonefinal, 1, vru+line, 1, call_id, 1, priority, 1, type, 1, outcome, 1, server, 1, ser_start, 1, ser_exit, 1, ser_time, 2, client_id, 2, sex, 2, day, 2, month, 2, year, 2, age, 2, social, 2, first, 2, middle, 2, last, 2, phone, 2, email, 2, address_1, 2, address_2, 2, city, 2, state, 2, zipcode, 2, district_id, 3, district_id, 3, city, 3, state_abbrev, 3, division, 4, Date received, 4, Product, 4, Sub-product, 4, Issue, 4, Sub-issue, 4, Consumer complaint narrative, 4, Tags, 4, Consumer consent provided?, 4, Submitted via, 4, Date sent to company, 4, Company response to consumer, 4, Timely response?, 4, Consumer disputed?, 4, Complaint ID, 4, Client_ID, 5, Date, 5, Stars, 5, Reviews, 5, Product, 5, district_id
Question: How many times does the consumer have no dispute over a non-timely response from the company?
Evidence: no dispute refers to Consumer disputed? = 'No'; non-timely response refers to Timely response? = 'No'
SQL: SELECT COUNT(`Timely response?`) FROM events WHERE `Timely response?` = 'No' AND `Consumer disputed?` = 'No'
Database: retail_complains
Tables: state, callcenterlogs, client, district, events, reviews
Columns (table index, column name): -1, *, 0, StateCode, 0, State, 0, Region, 1, Date received, 1, Complaint ID, 1, rand client, 1, phonefinal, 1, vru+line, 1, call_id, 1, priority, 1, type, 1, outcome, 1, server, 1, ser_start, 1, ser_exit, 1, ser_time, 2, client_id, 2, sex, 2, day, 2, month, 2, year, 2, age, 2, social, 2, first, 2, middle, 2, last, 2, phone, 2, email, 2, address_1, 2, address_2, 2, city, 2, state, 2, zipcode, 2, district_id, 3, district_id, 3, city, 3, state_abbrev, 3, division, 4, Date received, 4, Product, 4, Sub-product, 4, Issue, 4, Sub-issue, 4, Consumer complaint narrative, 4, Tags, 4, Consumer consent provided?, 4, Submitted via, 4, Date sent to company, 4, Company response to consumer, 4, Timely response?, 4, Consumer disputed?, 4, Complaint ID, 4, Client_ID, 5, Date, 5, Stars, 5, Reviews, 5, Product, 5, district_id
Question: How many of the complaints are longer than 15 minutes?
Evidence: longer than 15 minutes refers to ser_time > '00:15:00'
SQL: SELECT COUNT(ser_time) FROM callcenterlogs WHERE strftime('%M', ser_time) > '15'
Database: retail_complains
Tables: state, callcenterlogs, client, district, events, reviews
Columns (table index, column name): -1, *, 0, StateCode, 0, State, 0, Region, 1, Date received, 1, Complaint ID, 1, rand client, 1, phonefinal, 1, vru+line, 1, call_id, 1, priority, 1, type, 1, outcome, 1, server, 1, ser_start, 1, ser_exit, 1, ser_time, 2, client_id, 2, sex, 2, day, 2, month, 2, year, 2, age, 2, social, 2, first, 2, middle, 2, last, 2, phone, 2, email, 2, address_1, 2, address_2, 2, city, 2, state, 2, zipcode, 2, district_id, 3, district_id, 3, city, 3, state_abbrev, 3, division, 4, Date received, 4, Product, 4, Sub-product, 4, Issue, 4, Sub-issue, 4, Consumer complaint narrative, 4, Tags, 4, Consumer consent provided?, 4, Submitted via, 4, Date sent to company, 4, Company response to consumer, 4, Timely response?, 4, Consumer disputed?, 4, Complaint ID, 4, Client_ID, 5, Date, 5, Stars, 5, Reviews, 5, Product, 5, district_id
Question: What is the most common issue for the highest priority complaints?
Evidence: most common refers to max(count(issue)); highest priority refers to priority = 2
SQL: 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
Database: retail_complains
Tables: state, callcenterlogs, client, district, events, reviews
Columns (table index, column name): -1, *, 0, StateCode, 0, State, 0, Region, 1, Date received, 1, Complaint ID, 1, rand client, 1, phonefinal, 1, vru+line, 1, call_id, 1, priority, 1, type, 1, outcome, 1, server, 1, ser_start, 1, ser_exit, 1, ser_time, 2, client_id, 2, sex, 2, day, 2, month, 2, year, 2, age, 2, social, 2, first, 2, middle, 2, last, 2, phone, 2, email, 2, address_1, 2, address_2, 2, city, 2, state, 2, zipcode, 2, district_id, 3, district_id, 3, city, 3, state_abbrev, 3, division, 4, Date received, 4, Product, 4, Sub-product, 4, Issue, 4, Sub-issue, 4, Consumer complaint narrative, 4, Tags, 4, Consumer consent provided?, 4, Submitted via, 4, Date sent to company, 4, Company response to consumer, 4, Timely response?, 4, Consumer disputed?, 4, Complaint ID, 4, Client_ID, 5, Date, 5, Stars, 5, Reviews, 5, Product, 5, district_id
Question: List the full names of all clients who live in the Pacific division.
Evidence: full name refers to first, last
SQL: 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'
Database: retail_complains
Tables: state, callcenterlogs, client, district, events, reviews
Columns (table index, column name): -1, *, 0, StateCode, 0, State, 0, Region, 1, Date received, 1, Complaint ID, 1, rand client, 1, phonefinal, 1, vru+line, 1, call_id, 1, priority, 1, type, 1, outcome, 1, server, 1, ser_start, 1, ser_exit, 1, ser_time, 2, client_id, 2, sex, 2, day, 2, month, 2, year, 2, age, 2, social, 2, first, 2, middle, 2, last, 2, phone, 2, email, 2, address_1, 2, address_2, 2, city, 2, state, 2, zipcode, 2, district_id, 3, district_id, 3, city, 3, state_abbrev, 3, division, 4, Date received, 4, Product, 4, Sub-product, 4, Issue, 4, Sub-issue, 4, Consumer complaint narrative, 4, Tags, 4, Consumer consent provided?, 4, Submitted via, 4, Date sent to company, 4, Company response to consumer, 4, Timely response?, 4, Consumer disputed?, 4, Complaint ID, 4, Client_ID, 5, Date, 5, Stars, 5, Reviews, 5, Product, 5, district_id
Question: What is the social number of the person who made the most complaints?
Evidence: social number refers to social; most complaints refers to max(count(event.Client_ID))
SQL: 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
Database: retail_complains
Tables: state, callcenterlogs, client, district, events, reviews
Columns (table index, column name): -1, *, 0, StateCode, 0, State, 0, Region, 1, Date received, 1, Complaint ID, 1, rand client, 1, phonefinal, 1, vru+line, 1, call_id, 1, priority, 1, type, 1, outcome, 1, server, 1, ser_start, 1, ser_exit, 1, ser_time, 2, client_id, 2, sex, 2, day, 2, month, 2, year, 2, age, 2, social, 2, first, 2, middle, 2, last, 2, phone, 2, email, 2, address_1, 2, address_2, 2, city, 2, state, 2, zipcode, 2, district_id, 3, district_id, 3, city, 3, state_abbrev, 3, division, 4, Date received, 4, Product, 4, Sub-product, 4, Issue, 4, Sub-issue, 4, Consumer complaint narrative, 4, Tags, 4, Consumer consent provided?, 4, Submitted via, 4, Date sent to company, 4, Company response to consumer, 4, Timely response?, 4, Consumer disputed?, 4, Complaint ID, 4, Client_ID, 5, Date, 5, Stars, 5, Reviews, 5, Product, 5, district_id
Question: Which is the city where most of the 1 star reviews come from?
Evidence: most refers to max(count(state_abbrev)); 1 star review refers to Stars = 1
SQL: 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
Database: retail_complains
Tables: state, callcenterlogs, client, district, events, reviews
Columns (table index, column name): -1, *, 0, StateCode, 0, State, 0, Region, 1, Date received, 1, Complaint ID, 1, rand client, 1, phonefinal, 1, vru+line, 1, call_id, 1, priority, 1, type, 1, outcome, 1, server, 1, ser_start, 1, ser_exit, 1, ser_time, 2, client_id, 2, sex, 2, day, 2, month, 2, year, 2, age, 2, social, 2, first, 2, middle, 2, last, 2, phone, 2, email, 2, address_1, 2, address_2, 2, city, 2, state, 2, zipcode, 2, district_id, 3, district_id, 3, city, 3, state_abbrev, 3, division, 4, Date received, 4, Product, 4, Sub-product, 4, Issue, 4, Sub-issue, 4, Consumer complaint narrative, 4, Tags, 4, Consumer consent provided?, 4, Submitted via, 4, Date sent to company, 4, Company response to consumer, 4, Timely response?, 4, Consumer disputed?, 4, Complaint ID, 4, Client_ID, 5, Date, 5, Stars, 5, Reviews, 5, Product, 5, district_id
Question: What is the address of the client who made a complaint via postal mail on March 14, 2012?
Evidence: address refers to address_1, address_2; via postal mail refers to Submitted via = 'Postal mail'; March 14 2012 refers to Date received = '2012-03-14'
SQL: 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'
Database: retail_complains
Tables: state, callcenterlogs, client, district, events, reviews
Columns (table index, column name): -1, *, 0, StateCode, 0, State, 0, Region, 1, Date received, 1, Complaint ID, 1, rand client, 1, phonefinal, 1, vru+line, 1, call_id, 1, priority, 1, type, 1, outcome, 1, server, 1, ser_start, 1, ser_exit, 1, ser_time, 2, client_id, 2, sex, 2, day, 2, month, 2, year, 2, age, 2, social, 2, first, 2, middle, 2, last, 2, phone, 2, email, 2, address_1, 2, address_2, 2, city, 2, state, 2, zipcode, 2, district_id, 3, district_id, 3, city, 3, state_abbrev, 3, division, 4, Date received, 4, Product, 4, Sub-product, 4, Issue, 4, Sub-issue, 4, Consumer complaint narrative, 4, Tags, 4, Consumer consent provided?, 4, Submitted via, 4, Date sent to company, 4, Company response to consumer, 4, Timely response?, 4, Consumer disputed?, 4, Complaint ID, 4, Client_ID, 5, Date, 5, Stars, 5, Reviews, 5, Product, 5, district_id
Question: Among the female clients, how many of them have a complaint with a priority of 1?
Evidence: female refers to sex = 'Female'
SQL: 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
Database: retail_complains
Tables: state, callcenterlogs, client, district, events, reviews
Columns (table index, column name): -1, *, 0, StateCode, 0, State, 0, Region, 1, Date received, 1, Complaint ID, 1, rand client, 1, phonefinal, 1, vru+line, 1, call_id, 1, priority, 1, type, 1, outcome, 1, server, 1, ser_start, 1, ser_exit, 1, ser_time, 2, client_id, 2, sex, 2, day, 2, month, 2, year, 2, age, 2, social, 2, first, 2, middle, 2, last, 2, phone, 2, email, 2, address_1, 2, address_2, 2, city, 2, state, 2, zipcode, 2, district_id, 3, district_id, 3, city, 3, state_abbrev, 3, division, 4, Date received, 4, Product, 4, Sub-product, 4, Issue, 4, Sub-issue, 4, Consumer complaint narrative, 4, Tags, 4, Consumer consent provided?, 4, Submitted via, 4, Date sent to company, 4, Company response to consumer, 4, Timely response?, 4, Consumer disputed?, 4, Complaint ID, 4, Client_ID, 5, Date, 5, Stars, 5, Reviews, 5, Product, 5, district_id
Question: List all the server of the phone complaints with a late response from the company.
Evidence: phone complaint refers to Submitted via = 'Phone'; late response refers to Timely response? = 'No'
SQL: 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'
Database: retail_complains
Tables: state, callcenterlogs, client, district, events, reviews
Columns (table index, column name): -1, *, 0, StateCode, 0, State, 0, Region, 1, Date received, 1, Complaint ID, 1, rand client, 1, phonefinal, 1, vru+line, 1, call_id, 1, priority, 1, type, 1, outcome, 1, server, 1, ser_start, 1, ser_exit, 1, ser_time, 2, client_id, 2, sex, 2, day, 2, month, 2, year, 2, age, 2, social, 2, first, 2, middle, 2, last, 2, phone, 2, email, 2, address_1, 2, address_2, 2, city, 2, state, 2, zipcode, 2, district_id, 3, district_id, 3, city, 3, state_abbrev, 3, division, 4, Date received, 4, Product, 4, Sub-product, 4, Issue, 4, Sub-issue, 4, Consumer complaint narrative, 4, Tags, 4, Consumer consent provided?, 4, Submitted via, 4, Date sent to company, 4, Company response to consumer, 4, Timely response?, 4, Consumer disputed?, 4, Complaint ID, 4, Client_ID, 5, Date, 5, Stars, 5, Reviews, 5, Product, 5, district_id
Question: List all the issues of the complaints made by Kaitlyn Eliza Elliott.
SQL: 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'
Database: retail_complains
Tables: state, callcenterlogs, client, district, events, reviews
Columns (table index, column name): -1, *, 0, StateCode, 0, State, 0, Region, 1, Date received, 1, Complaint ID, 1, rand client, 1, phonefinal, 1, vru+line, 1, call_id, 1, priority, 1, type, 1, outcome, 1, server, 1, ser_start, 1, ser_exit, 1, ser_time, 2, client_id, 2, sex, 2, day, 2, month, 2, year, 2, age, 2, social, 2, first, 2, middle, 2, last, 2, phone, 2, email, 2, address_1, 2, address_2, 2, city, 2, state, 2, zipcode, 2, district_id, 3, district_id, 3, city, 3, state_abbrev, 3, division, 4, Date received, 4, Product, 4, Sub-product, 4, Issue, 4, Sub-issue, 4, Consumer complaint narrative, 4, Tags, 4, Consumer consent provided?, 4, Submitted via, 4, Date sent to company, 4, Company response to consumer, 4, Timely response?, 4, Consumer disputed?, 4, Complaint ID, 4, Client_ID, 5, Date, 5, Stars, 5, Reviews, 5, Product, 5, district_id
Question: What is the name of the state that the client with the email "skylar.ramirez@gmail.com" lives in?
SQL: 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'