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: State the first name of male clients who did not receive timely response from the call center.
Evidence: first name refers to first; male refers to sex = 'Male'; did not receive timely response refers to Timely response? = 'No'
SQL: 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'
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 product received the most complaints from elder clients?
Evidence: most complaints refers to max(client_id); elder client refers to age > 65
SQL: 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
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: Complaint about Credit Card mostly came from clients of which age group?
Evidence: about Credit Card refers to Product = 'Credit Card'; teenager refers to 13 < age < = 19; adult refers to 19 < age < = 65; elder refers to age < = 65
SQL: 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'
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 down the issues for complaint with server time of below 10 minutes.
Evidence: server time of below 10 minutes refers to ser_time < '00:10:00'
SQL: 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'
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: Write down the date received of complaints sent via Fax.
Evidence: sent via Fax refers to Submitted via = 'Fax'
SQL: 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'
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 full name of clients who have issue about balance transfer?
Evidence: full name refers to first, middle, last; issue about balance transfer refers to Issue = 'Balance transfer'
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.Issue = 'Balance transfer'
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 email address of clients who submitted their complaints via postal mail?
Evidence: via postal mail refers to Submitted via = 'Postal mail'
SQL: 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'
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: Calculate the average age of clients whose response is "Closed with relief".
Evidence: average age = avg(age where Company response to consumer = 'Closed with relief'); response "Closed with relief" refers to Company response to consumer = 'Closed with relief'
SQL: 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'
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 average age of clients whose complaint type is "TT"?
Evidence: average age = avg(age where type = 'TT')
SQL: SELECT AVG(T1.age) FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client` WHERE T2.type = 'TT'
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: Write the complaint ID, call ID, and final phone number of complaints through AVIDAN server from 1/1/2014 to 12/30/2014.
Evidence: final phone number refers to phonefinal; from 1/1/2014 to 12/30/2014 refers to Date received between '2014-01-01' and '2014-12-30'
SQL: SELECT `Complaint ID`, call_id, phonefinal FROM callcenterlogs WHERE strftime('%Y', `Date received`) = '2014' AND server = 'AVIDAN'
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: Between 1/1/2017 and 4/1/2017, what is the average server time of calls under the server DARMON?
Evidence: between 1/1/2017 and 4/1/2017 refers to Date received between '2017-01-01' and '2017-04-01'; average server time refers to avg(ser_time)
SQL: SELECT AVG(CAST(SUBSTR(ser_time, 4, 2) AS REAL)) FROM callcenterlogs WHERE `Date received` BETWEEN '2017-01-01' AND '2017-04-01'
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 per year does a credit card customer complain about overlimit fees?
Evidence: credit card customer refers to product = 'Credit card'; about overlimit fees refers to issue = 'Overlimit fee'
SQL: 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`)
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 clients in Middle Atlantic, how many are them are female and no more than 18 years old?
Evidence: in Middle Atlantic refers to division = 'Middle Atlantic'; female refers to sex = 'Female'; no more than 18 refers to age < 18
SQL: 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
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: Give me the full birthdate, email and phone number of the youngest client in Indianapolis .
Evidence: full birthdate = year, month, day; youngest refers to max(year, month, day); in Indianapolis refers to city = 'Indianapolis'
SQL: 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
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 top five cities in terms of the number of 5-star ratings in 2016 reviews, in descending order.
Evidence: 5-star rating refers to Stars = 5; in 2016 refers to Date like '2016%'; most reviews refers to max(count(city))
SQL: 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
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 longest server time when the call is about the issue of arbitration?
Evidence: longest server time refers to max(ser_time)
SQL: 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'
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: Give me the social number and state of the client whose phone number is 100-121-8371.
Evidence: social number refers to social
SQL: 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'
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 and phone numbers of clients that were from the Pacific.
Evidence: full name refers to first, middle, last; the Pacific refers to division = 'Pacific'
SQL: 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'