instruction
stringlengths 646
49.5k
| input
stringclasses 1
value | output
stringlengths 23
804
|
---|---|---|
Solve the following sql problem:
Please list the first names of the employees who work as Managing Editor.
Schema:
SCHEMA:
- Table: authors
- Column: au_id
- Samples: [172-32-1176, 213-46-8915, 238-95-7766, 267-41-2394, 274-80-9391]
- Column: au_lname
- Samples: [White, Green, Carson, O'Leary, Straight]
- Column: au_fname
- Samples: [Johnson, Marjorie, Cheryl, Michael, Dean]
- Column: phone
- Samples: [408 496-7223, 415 986-7020, 415 548-7723, 408 286-2428, 415 834-2919]
- Column: address
- Samples: [10932 Bigge Rd., 309 63rd St. #411, 589 Darwin Ln., 22 Cleveland Av. #14, 5420 College Av.]
- Column: city
- Samples: [Menlo Park, Oakland, Berkeley, San Jose, Oakland]
- Column: state
- Samples: [CA, CA, CA, CA, CA]
- Column: zip
- Samples: [94025, 94618, 94705, 95128, 94609]
- Column: contract
- Samples: [0, 0, 0, 0, 0]
- Table: jobs
- Column: job_id
- Samples: [1, 2, 3, 4, 5]
- Column: job_desc
- Samples: [New Hire - Job not specified, Chief Executive Officer, Business Operations Manager, Chief Financial Officier, Publisher]
- Column: min_lvl
- Samples: [10, 200, 175, 175, 150]
- Column: max_lvl
- Samples: [10, 250, 225, 250, 250]
- Table: publishers
- Column: pub_id
- Samples: [0736, 0877, 1389, 1622, 1756]
- Column: pub_name
- Samples: [New Moon Books, Binnet & Hardley, Algodata Infosystems, Five Lakes Publishing, Ramona Publishers]
- Column: city
- Samples: [Boston, Washington, Berkeley, Chicago, Dallas]
- Column: state
- Samples: [MA, DC, CA, IL, TX]
- Column: country
- Samples: [USA, USA, USA, USA, USA]
- Table: employee
- Column: emp_id
- Samples: [A-C71970F, A-R89858F, AMD15433F, ARD36773F, CFH28514M]
- Column: fname
- Samples: [Aria, Annette, Ann, Anabela, Carlos]
- Column: minit
- Samples: [, , M, R, F]
- Column: lname
- Samples: [Cruz, Roulet, Devon, Domingues, Hernadez]
- Column: job_id
- Samples: [10, 6, 3, 8, 5]
- Column: job_lvl
- Samples: [87, 152, 200, 100, 211]
- Column: pub_id
- Samples: [1389, 9999, 9952, 0877, 9999]
- Column: hire_date
- Samples: [1991-10-26 00:00:00.0, 1990-02-21 00:00:00.0, 1991-07-16 00:00:00.0, 1993-01-27 00:00:00.0, 1989-04-21 00:00:00.0]
- Table: pub_info
- Column: pub_id
- Samples: [0877, 1389, 1622, 1756, 9901]
- Column: logo
- Samples: [0x4749463839618B002F00B30F00000000800000008000808000000080800080008080..., 0x474946383961C2001D00B30F00000000800000008000808000000080800080008080..., 0x474946383961F5003400B30F00000000800000008000808000000080800080008080..., 0x474946383961E3002500B30F00000000800000008000808000000080800080008080..., 0x4749463839615D002200B30F00000000800000008000808000000080800080008080... (truncated)]
- Column: pr_info
- Samples: [This is sample text data for Binnet & Hardley, publisher 0877 in the p..., This is sample text data for Algodata Infosystems, publisher 1389 in t..., This is sample text data for Five Lakes Publishing, publisher 1622 in ..., This is sample text data for Ramona Publishers, publisher 1756 in the ..., This is sample text data for GGG&G, publisher 9901 in the pubs databas... (truncated)]
- Table: stores
- Column: stor_id
- Samples: [6380, 7066, 7067, 7131, 7896]
- Column: stor_name
- Samples: [Eric the Read Books, Barnum's, News & Brews, Doc-U-Mat: Quality Laundry and Books, Fricative Bookshop]
- Column: stor_address
- Samples: [788 Catamaugus Ave., 567 Pasadena Ave., 577 First St., 24-A Avogadro Way, 89 Madison St.]
- Column: city
- Samples: [Seattle, Tustin, Los Gatos, Remulade, Fremont]
- Column: state
- Samples: [WA, CA, CA, WA, CA]
- Column: zip
- Samples: [98056, 92789, 96745, 98014, 90019]
- Table: discounts
- Column: discounttype
- Samples: [Initial Customer, Volume Discount, Customer Discount]
- Column: stor_id
- Samples: [None, None, 8042]
- Column: lowqty
- Samples: [None, 100, None]
- Column: highqty
- Samples: [None, 1000, None]
- Column: discount
- Samples: [10.5, 6.7, 5.0]
- Table: titles
- Column: title_id
- Samples: [BU1032, BU1111, BU2075, BU7832, MC2222]
- Column: title
- Samples: [The Busy Executive's Database Guide, Cooking with Computers: Surreptitious Balance Sheets, You Can Combat Computer Stress!, Straight Talk About Computers, Silicon Valley Gastronomic Treats]
- Column: type
- Samples: [business, business, business, business, mod_cook]
- Column: pub_id
- Samples: [1389, 1389, 0736, 1389, 0877]
- Column: price
- Samples: [19.99, 11.95, 2.99, 19.99, 19.99]
- Column: advance
- Samples: [5000.0, 5000.0, 10125.0, 5000.0, 0.0]
- Column: royalty
- Samples: [10, 10, 24, 10, 12]
- Column: ytd_sales
- Samples: [4095, 3876, 18722, 4095, 2032]
- Column: notes
- Samples: [An overview of available database systems with emphasis on common busi..., Helpful hints on how to use your electronic resources to the best adva..., The latest medical and psychological techniques for living with the el..., Annotated analysis of what computers can do for you: a no-hype guide f..., Favorite recipes for quick, easy, and elegant meals. (truncated)]
- Column: pubdate
- Samples: [1991-06-12 00:00:00.0, 1991-06-09 00:00:00.0, 1991-06-30 00:00:00.0, 1991-06-22 00:00:00.0, 1991-06-09 00:00:00.0]
- Table: roysched
- Column: title_id
- Samples: [BU1032, BU1032, PC1035, PC1035, PC1035]
- Column: lorange
- Samples: [0, 5001, 0, 2001, 3001]
- Column: hirange
- Samples: [5000, 50000, 2000, 3000, 4000]
- Column: royalty
- Samples: [10, 12, 10, 12, 14]
- Table: sales
- Column: stor_id
- Samples: [6380, 6380, 7066, 7066, 7067]
- Column: ord_num
- Samples: [6871, 722a, A2976, QA7442.3, D4482]
- Column: ord_date
- Samples: [1994-09-14 00:00:00.0, 1994-09-13 00:00:00.0, 1993-05-24 00:00:00.0, 1994-09-13 00:00:00.0, 1994-09-14 00:00:00.0]
- Column: qty
- Samples: [5, 3, 50, 75, 10]
- Column: payterms
- Samples: [Net 60, Net 60, Net 30, ON invoice, Net 60]
- Column: title_id
- Samples: [BU1032, PS2091, PC8888, PS2091, PS2091]
- Table: titleauthor
- Column: au_id
- Samples: [172-32-1176, 213-46-8915, 213-46-8915, 238-95-7766, 267-41-2394]
- Column: title_id
- Samples: [PS3333, BU1032, BU2075, PC1035, BU1111]
- Column: au_ord
- Samples: [1, 2, 1, 1, 2]
- Column: royaltyper
- Samples: [100, 40, 100, 100, 40]
| SELECT T1.fname FROM employee AS T1 INNER JOIN jobs AS T2 ON T1.job_id = T2.job_id WHERE T2.job_desc = 'Managing Editor' |
|
Solve the following sql problem:
What is the highest level of job to get to for the employee who got hired the earliest?
Schema:
SCHEMA:
- Table: authors
- Column: au_id
- Samples: [172-32-1176, 213-46-8915, 238-95-7766, 267-41-2394, 274-80-9391]
- Column: au_lname
- Samples: [White, Green, Carson, O'Leary, Straight]
- Column: au_fname
- Samples: [Johnson, Marjorie, Cheryl, Michael, Dean]
- Column: phone
- Samples: [408 496-7223, 415 986-7020, 415 548-7723, 408 286-2428, 415 834-2919]
- Column: address
- Samples: [10932 Bigge Rd., 309 63rd St. #411, 589 Darwin Ln., 22 Cleveland Av. #14, 5420 College Av.]
- Column: city
- Samples: [Menlo Park, Oakland, Berkeley, San Jose, Oakland]
- Column: state
- Samples: [CA, CA, CA, CA, CA]
- Column: zip
- Samples: [94025, 94618, 94705, 95128, 94609]
- Column: contract
- Samples: [0, 0, 0, 0, 0]
- Table: jobs
- Column: job_id
- Samples: [1, 2, 3, 4, 5]
- Column: job_desc
- Samples: [New Hire - Job not specified, Chief Executive Officer, Business Operations Manager, Chief Financial Officier, Publisher]
- Column: min_lvl
- Samples: [10, 200, 175, 175, 150]
- Column: max_lvl
- Samples: [10, 250, 225, 250, 250]
- Table: publishers
- Column: pub_id
- Samples: [0736, 0877, 1389, 1622, 1756]
- Column: pub_name
- Samples: [New Moon Books, Binnet & Hardley, Algodata Infosystems, Five Lakes Publishing, Ramona Publishers]
- Column: city
- Samples: [Boston, Washington, Berkeley, Chicago, Dallas]
- Column: state
- Samples: [MA, DC, CA, IL, TX]
- Column: country
- Samples: [USA, USA, USA, USA, USA]
- Table: employee
- Column: emp_id
- Samples: [A-C71970F, A-R89858F, AMD15433F, ARD36773F, CFH28514M]
- Column: fname
- Samples: [Aria, Annette, Ann, Anabela, Carlos]
- Column: minit
- Samples: [, , M, R, F]
- Column: lname
- Samples: [Cruz, Roulet, Devon, Domingues, Hernadez]
- Column: job_id
- Samples: [10, 6, 3, 8, 5]
- Column: job_lvl
- Samples: [87, 152, 200, 100, 211]
- Column: pub_id
- Samples: [1389, 9999, 9952, 0877, 9999]
- Column: hire_date
- Samples: [1991-10-26 00:00:00.0, 1990-02-21 00:00:00.0, 1991-07-16 00:00:00.0, 1993-01-27 00:00:00.0, 1989-04-21 00:00:00.0]
- Table: pub_info
- Column: pub_id
- Samples: [0877, 1389, 1622, 1756, 9901]
- Column: logo
- Samples: [0x4749463839618B002F00B30F00000000800000008000808000000080800080008080..., 0x474946383961C2001D00B30F00000000800000008000808000000080800080008080..., 0x474946383961F5003400B30F00000000800000008000808000000080800080008080..., 0x474946383961E3002500B30F00000000800000008000808000000080800080008080..., 0x4749463839615D002200B30F00000000800000008000808000000080800080008080... (truncated)]
- Column: pr_info
- Samples: [This is sample text data for Binnet & Hardley, publisher 0877 in the p..., This is sample text data for Algodata Infosystems, publisher 1389 in t..., This is sample text data for Five Lakes Publishing, publisher 1622 in ..., This is sample text data for Ramona Publishers, publisher 1756 in the ..., This is sample text data for GGG&G, publisher 9901 in the pubs databas... (truncated)]
- Table: stores
- Column: stor_id
- Samples: [6380, 7066, 7067, 7131, 7896]
- Column: stor_name
- Samples: [Eric the Read Books, Barnum's, News & Brews, Doc-U-Mat: Quality Laundry and Books, Fricative Bookshop]
- Column: stor_address
- Samples: [788 Catamaugus Ave., 567 Pasadena Ave., 577 First St., 24-A Avogadro Way, 89 Madison St.]
- Column: city
- Samples: [Seattle, Tustin, Los Gatos, Remulade, Fremont]
- Column: state
- Samples: [WA, CA, CA, WA, CA]
- Column: zip
- Samples: [98056, 92789, 96745, 98014, 90019]
- Table: discounts
- Column: discounttype
- Samples: [Initial Customer, Volume Discount, Customer Discount]
- Column: stor_id
- Samples: [None, None, 8042]
- Column: lowqty
- Samples: [None, 100, None]
- Column: highqty
- Samples: [None, 1000, None]
- Column: discount
- Samples: [10.5, 6.7, 5.0]
- Table: titles
- Column: title_id
- Samples: [BU1032, BU1111, BU2075, BU7832, MC2222]
- Column: title
- Samples: [The Busy Executive's Database Guide, Cooking with Computers: Surreptitious Balance Sheets, You Can Combat Computer Stress!, Straight Talk About Computers, Silicon Valley Gastronomic Treats]
- Column: type
- Samples: [business, business, business, business, mod_cook]
- Column: pub_id
- Samples: [1389, 1389, 0736, 1389, 0877]
- Column: price
- Samples: [19.99, 11.95, 2.99, 19.99, 19.99]
- Column: advance
- Samples: [5000.0, 5000.0, 10125.0, 5000.0, 0.0]
- Column: royalty
- Samples: [10, 10, 24, 10, 12]
- Column: ytd_sales
- Samples: [4095, 3876, 18722, 4095, 2032]
- Column: notes
- Samples: [An overview of available database systems with emphasis on common busi..., Helpful hints on how to use your electronic resources to the best adva..., The latest medical and psychological techniques for living with the el..., Annotated analysis of what computers can do for you: a no-hype guide f..., Favorite recipes for quick, easy, and elegant meals. (truncated)]
- Column: pubdate
- Samples: [1991-06-12 00:00:00.0, 1991-06-09 00:00:00.0, 1991-06-30 00:00:00.0, 1991-06-22 00:00:00.0, 1991-06-09 00:00:00.0]
- Table: roysched
- Column: title_id
- Samples: [BU1032, BU1032, PC1035, PC1035, PC1035]
- Column: lorange
- Samples: [0, 5001, 0, 2001, 3001]
- Column: hirange
- Samples: [5000, 50000, 2000, 3000, 4000]
- Column: royalty
- Samples: [10, 12, 10, 12, 14]
- Table: sales
- Column: stor_id
- Samples: [6380, 6380, 7066, 7066, 7067]
- Column: ord_num
- Samples: [6871, 722a, A2976, QA7442.3, D4482]
- Column: ord_date
- Samples: [1994-09-14 00:00:00.0, 1994-09-13 00:00:00.0, 1993-05-24 00:00:00.0, 1994-09-13 00:00:00.0, 1994-09-14 00:00:00.0]
- Column: qty
- Samples: [5, 3, 50, 75, 10]
- Column: payterms
- Samples: [Net 60, Net 60, Net 30, ON invoice, Net 60]
- Column: title_id
- Samples: [BU1032, PS2091, PC8888, PS2091, PS2091]
- Table: titleauthor
- Column: au_id
- Samples: [172-32-1176, 213-46-8915, 213-46-8915, 238-95-7766, 267-41-2394]
- Column: title_id
- Samples: [PS3333, BU1032, BU2075, PC1035, BU1111]
- Column: au_ord
- Samples: [1, 2, 1, 1, 2]
- Column: royaltyper
- Samples: [100, 40, 100, 100, 40]
| SELECT T2.max_lvl FROM employee AS T1 INNER JOIN jobs AS T2 ON T1.job_id = T2.job_id ORDER BY T1.hire_date LIMIT 1 |
|
Solve the following sql problem:
In which city is the store with the highest total sales quantity located?
Schema:
SCHEMA:
- Table: authors
- Column: au_id
- Samples: [172-32-1176, 213-46-8915, 238-95-7766, 267-41-2394, 274-80-9391]
- Column: au_lname
- Samples: [White, Green, Carson, O'Leary, Straight]
- Column: au_fname
- Samples: [Johnson, Marjorie, Cheryl, Michael, Dean]
- Column: phone
- Samples: [408 496-7223, 415 986-7020, 415 548-7723, 408 286-2428, 415 834-2919]
- Column: address
- Samples: [10932 Bigge Rd., 309 63rd St. #411, 589 Darwin Ln., 22 Cleveland Av. #14, 5420 College Av.]
- Column: city
- Samples: [Menlo Park, Oakland, Berkeley, San Jose, Oakland]
- Column: state
- Samples: [CA, CA, CA, CA, CA]
- Column: zip
- Samples: [94025, 94618, 94705, 95128, 94609]
- Column: contract
- Samples: [0, 0, 0, 0, 0]
- Table: jobs
- Column: job_id
- Samples: [1, 2, 3, 4, 5]
- Column: job_desc
- Samples: [New Hire - Job not specified, Chief Executive Officer, Business Operations Manager, Chief Financial Officier, Publisher]
- Column: min_lvl
- Samples: [10, 200, 175, 175, 150]
- Column: max_lvl
- Samples: [10, 250, 225, 250, 250]
- Table: publishers
- Column: pub_id
- Samples: [0736, 0877, 1389, 1622, 1756]
- Column: pub_name
- Samples: [New Moon Books, Binnet & Hardley, Algodata Infosystems, Five Lakes Publishing, Ramona Publishers]
- Column: city
- Samples: [Boston, Washington, Berkeley, Chicago, Dallas]
- Column: state
- Samples: [MA, DC, CA, IL, TX]
- Column: country
- Samples: [USA, USA, USA, USA, USA]
- Table: employee
- Column: emp_id
- Samples: [A-C71970F, A-R89858F, AMD15433F, ARD36773F, CFH28514M]
- Column: fname
- Samples: [Aria, Annette, Ann, Anabela, Carlos]
- Column: minit
- Samples: [, , M, R, F]
- Column: lname
- Samples: [Cruz, Roulet, Devon, Domingues, Hernadez]
- Column: job_id
- Samples: [10, 6, 3, 8, 5]
- Column: job_lvl
- Samples: [87, 152, 200, 100, 211]
- Column: pub_id
- Samples: [1389, 9999, 9952, 0877, 9999]
- Column: hire_date
- Samples: [1991-10-26 00:00:00.0, 1990-02-21 00:00:00.0, 1991-07-16 00:00:00.0, 1993-01-27 00:00:00.0, 1989-04-21 00:00:00.0]
- Table: pub_info
- Column: pub_id
- Samples: [0877, 1389, 1622, 1756, 9901]
- Column: logo
- Samples: [0x4749463839618B002F00B30F00000000800000008000808000000080800080008080..., 0x474946383961C2001D00B30F00000000800000008000808000000080800080008080..., 0x474946383961F5003400B30F00000000800000008000808000000080800080008080..., 0x474946383961E3002500B30F00000000800000008000808000000080800080008080..., 0x4749463839615D002200B30F00000000800000008000808000000080800080008080... (truncated)]
- Column: pr_info
- Samples: [This is sample text data for Binnet & Hardley, publisher 0877 in the p..., This is sample text data for Algodata Infosystems, publisher 1389 in t..., This is sample text data for Five Lakes Publishing, publisher 1622 in ..., This is sample text data for Ramona Publishers, publisher 1756 in the ..., This is sample text data for GGG&G, publisher 9901 in the pubs databas... (truncated)]
- Table: stores
- Column: stor_id
- Samples: [6380, 7066, 7067, 7131, 7896]
- Column: stor_name
- Samples: [Eric the Read Books, Barnum's, News & Brews, Doc-U-Mat: Quality Laundry and Books, Fricative Bookshop]
- Column: stor_address
- Samples: [788 Catamaugus Ave., 567 Pasadena Ave., 577 First St., 24-A Avogadro Way, 89 Madison St.]
- Column: city
- Samples: [Seattle, Tustin, Los Gatos, Remulade, Fremont]
- Column: state
- Samples: [WA, CA, CA, WA, CA]
- Column: zip
- Samples: [98056, 92789, 96745, 98014, 90019]
- Table: discounts
- Column: discounttype
- Samples: [Initial Customer, Volume Discount, Customer Discount]
- Column: stor_id
- Samples: [None, None, 8042]
- Column: lowqty
- Samples: [None, 100, None]
- Column: highqty
- Samples: [None, 1000, None]
- Column: discount
- Samples: [10.5, 6.7, 5.0]
- Table: titles
- Column: title_id
- Samples: [BU1032, BU1111, BU2075, BU7832, MC2222]
- Column: title
- Samples: [The Busy Executive's Database Guide, Cooking with Computers: Surreptitious Balance Sheets, You Can Combat Computer Stress!, Straight Talk About Computers, Silicon Valley Gastronomic Treats]
- Column: type
- Samples: [business, business, business, business, mod_cook]
- Column: pub_id
- Samples: [1389, 1389, 0736, 1389, 0877]
- Column: price
- Samples: [19.99, 11.95, 2.99, 19.99, 19.99]
- Column: advance
- Samples: [5000.0, 5000.0, 10125.0, 5000.0, 0.0]
- Column: royalty
- Samples: [10, 10, 24, 10, 12]
- Column: ytd_sales
- Samples: [4095, 3876, 18722, 4095, 2032]
- Column: notes
- Samples: [An overview of available database systems with emphasis on common busi..., Helpful hints on how to use your electronic resources to the best adva..., The latest medical and psychological techniques for living with the el..., Annotated analysis of what computers can do for you: a no-hype guide f..., Favorite recipes for quick, easy, and elegant meals. (truncated)]
- Column: pubdate
- Samples: [1991-06-12 00:00:00.0, 1991-06-09 00:00:00.0, 1991-06-30 00:00:00.0, 1991-06-22 00:00:00.0, 1991-06-09 00:00:00.0]
- Table: roysched
- Column: title_id
- Samples: [BU1032, BU1032, PC1035, PC1035, PC1035]
- Column: lorange
- Samples: [0, 5001, 0, 2001, 3001]
- Column: hirange
- Samples: [5000, 50000, 2000, 3000, 4000]
- Column: royalty
- Samples: [10, 12, 10, 12, 14]
- Table: sales
- Column: stor_id
- Samples: [6380, 6380, 7066, 7066, 7067]
- Column: ord_num
- Samples: [6871, 722a, A2976, QA7442.3, D4482]
- Column: ord_date
- Samples: [1994-09-14 00:00:00.0, 1994-09-13 00:00:00.0, 1993-05-24 00:00:00.0, 1994-09-13 00:00:00.0, 1994-09-14 00:00:00.0]
- Column: qty
- Samples: [5, 3, 50, 75, 10]
- Column: payterms
- Samples: [Net 60, Net 60, Net 30, ON invoice, Net 60]
- Column: title_id
- Samples: [BU1032, PS2091, PC8888, PS2091, PS2091]
- Table: titleauthor
- Column: au_id
- Samples: [172-32-1176, 213-46-8915, 213-46-8915, 238-95-7766, 267-41-2394]
- Column: title_id
- Samples: [PS3333, BU1032, BU2075, PC1035, BU1111]
- Column: au_ord
- Samples: [1, 2, 1, 1, 2]
- Column: royaltyper
- Samples: [100, 40, 100, 100, 40]
| SELECT T2.city FROM sales AS T1 INNER JOIN stores AS T2 ON T1.stor_id = T2.stor_id GROUP BY T2.city ORDER BY SUM(T1.qty) DESC LIMIT 1 |
|
Solve the following sql problem:
What is the price of the book that sells the best?
Schema:
SCHEMA:
- Table: authors
- Column: au_id
- Samples: [172-32-1176, 213-46-8915, 238-95-7766, 267-41-2394, 274-80-9391]
- Column: au_lname
- Samples: [White, Green, Carson, O'Leary, Straight]
- Column: au_fname
- Samples: [Johnson, Marjorie, Cheryl, Michael, Dean]
- Column: phone
- Samples: [408 496-7223, 415 986-7020, 415 548-7723, 408 286-2428, 415 834-2919]
- Column: address
- Samples: [10932 Bigge Rd., 309 63rd St. #411, 589 Darwin Ln., 22 Cleveland Av. #14, 5420 College Av.]
- Column: city
- Samples: [Menlo Park, Oakland, Berkeley, San Jose, Oakland]
- Column: state
- Samples: [CA, CA, CA, CA, CA]
- Column: zip
- Samples: [94025, 94618, 94705, 95128, 94609]
- Column: contract
- Samples: [0, 0, 0, 0, 0]
- Table: jobs
- Column: job_id
- Samples: [1, 2, 3, 4, 5]
- Column: job_desc
- Samples: [New Hire - Job not specified, Chief Executive Officer, Business Operations Manager, Chief Financial Officier, Publisher]
- Column: min_lvl
- Samples: [10, 200, 175, 175, 150]
- Column: max_lvl
- Samples: [10, 250, 225, 250, 250]
- Table: publishers
- Column: pub_id
- Samples: [0736, 0877, 1389, 1622, 1756]
- Column: pub_name
- Samples: [New Moon Books, Binnet & Hardley, Algodata Infosystems, Five Lakes Publishing, Ramona Publishers]
- Column: city
- Samples: [Boston, Washington, Berkeley, Chicago, Dallas]
- Column: state
- Samples: [MA, DC, CA, IL, TX]
- Column: country
- Samples: [USA, USA, USA, USA, USA]
- Table: employee
- Column: emp_id
- Samples: [A-C71970F, A-R89858F, AMD15433F, ARD36773F, CFH28514M]
- Column: fname
- Samples: [Aria, Annette, Ann, Anabela, Carlos]
- Column: minit
- Samples: [, , M, R, F]
- Column: lname
- Samples: [Cruz, Roulet, Devon, Domingues, Hernadez]
- Column: job_id
- Samples: [10, 6, 3, 8, 5]
- Column: job_lvl
- Samples: [87, 152, 200, 100, 211]
- Column: pub_id
- Samples: [1389, 9999, 9952, 0877, 9999]
- Column: hire_date
- Samples: [1991-10-26 00:00:00.0, 1990-02-21 00:00:00.0, 1991-07-16 00:00:00.0, 1993-01-27 00:00:00.0, 1989-04-21 00:00:00.0]
- Table: pub_info
- Column: pub_id
- Samples: [0877, 1389, 1622, 1756, 9901]
- Column: logo
- Samples: [0x4749463839618B002F00B30F00000000800000008000808000000080800080008080..., 0x474946383961C2001D00B30F00000000800000008000808000000080800080008080..., 0x474946383961F5003400B30F00000000800000008000808000000080800080008080..., 0x474946383961E3002500B30F00000000800000008000808000000080800080008080..., 0x4749463839615D002200B30F00000000800000008000808000000080800080008080... (truncated)]
- Column: pr_info
- Samples: [This is sample text data for Binnet & Hardley, publisher 0877 in the p..., This is sample text data for Algodata Infosystems, publisher 1389 in t..., This is sample text data for Five Lakes Publishing, publisher 1622 in ..., This is sample text data for Ramona Publishers, publisher 1756 in the ..., This is sample text data for GGG&G, publisher 9901 in the pubs databas... (truncated)]
- Table: stores
- Column: stor_id
- Samples: [6380, 7066, 7067, 7131, 7896]
- Column: stor_name
- Samples: [Eric the Read Books, Barnum's, News & Brews, Doc-U-Mat: Quality Laundry and Books, Fricative Bookshop]
- Column: stor_address
- Samples: [788 Catamaugus Ave., 567 Pasadena Ave., 577 First St., 24-A Avogadro Way, 89 Madison St.]
- Column: city
- Samples: [Seattle, Tustin, Los Gatos, Remulade, Fremont]
- Column: state
- Samples: [WA, CA, CA, WA, CA]
- Column: zip
- Samples: [98056, 92789, 96745, 98014, 90019]
- Table: discounts
- Column: discounttype
- Samples: [Initial Customer, Volume Discount, Customer Discount]
- Column: stor_id
- Samples: [None, None, 8042]
- Column: lowqty
- Samples: [None, 100, None]
- Column: highqty
- Samples: [None, 1000, None]
- Column: discount
- Samples: [10.5, 6.7, 5.0]
- Table: titles
- Column: title_id
- Samples: [BU1032, BU1111, BU2075, BU7832, MC2222]
- Column: title
- Samples: [The Busy Executive's Database Guide, Cooking with Computers: Surreptitious Balance Sheets, You Can Combat Computer Stress!, Straight Talk About Computers, Silicon Valley Gastronomic Treats]
- Column: type
- Samples: [business, business, business, business, mod_cook]
- Column: pub_id
- Samples: [1389, 1389, 0736, 1389, 0877]
- Column: price
- Samples: [19.99, 11.95, 2.99, 19.99, 19.99]
- Column: advance
- Samples: [5000.0, 5000.0, 10125.0, 5000.0, 0.0]
- Column: royalty
- Samples: [10, 10, 24, 10, 12]
- Column: ytd_sales
- Samples: [4095, 3876, 18722, 4095, 2032]
- Column: notes
- Samples: [An overview of available database systems with emphasis on common busi..., Helpful hints on how to use your electronic resources to the best adva..., The latest medical and psychological techniques for living with the el..., Annotated analysis of what computers can do for you: a no-hype guide f..., Favorite recipes for quick, easy, and elegant meals. (truncated)]
- Column: pubdate
- Samples: [1991-06-12 00:00:00.0, 1991-06-09 00:00:00.0, 1991-06-30 00:00:00.0, 1991-06-22 00:00:00.0, 1991-06-09 00:00:00.0]
- Table: roysched
- Column: title_id
- Samples: [BU1032, BU1032, PC1035, PC1035, PC1035]
- Column: lorange
- Samples: [0, 5001, 0, 2001, 3001]
- Column: hirange
- Samples: [5000, 50000, 2000, 3000, 4000]
- Column: royalty
- Samples: [10, 12, 10, 12, 14]
- Table: sales
- Column: stor_id
- Samples: [6380, 6380, 7066, 7066, 7067]
- Column: ord_num
- Samples: [6871, 722a, A2976, QA7442.3, D4482]
- Column: ord_date
- Samples: [1994-09-14 00:00:00.0, 1994-09-13 00:00:00.0, 1993-05-24 00:00:00.0, 1994-09-13 00:00:00.0, 1994-09-14 00:00:00.0]
- Column: qty
- Samples: [5, 3, 50, 75, 10]
- Column: payterms
- Samples: [Net 60, Net 60, Net 30, ON invoice, Net 60]
- Column: title_id
- Samples: [BU1032, PS2091, PC8888, PS2091, PS2091]
- Table: titleauthor
- Column: au_id
- Samples: [172-32-1176, 213-46-8915, 213-46-8915, 238-95-7766, 267-41-2394]
- Column: title_id
- Samples: [PS3333, BU1032, BU2075, PC1035, BU1111]
- Column: au_ord
- Samples: [1, 2, 1, 1, 2]
- Column: royaltyper
- Samples: [100, 40, 100, 100, 40]
| SELECT T2.price FROM sales AS T1 INNER JOIN titles AS T2 ON T1.title_id = T2.title_id ORDER BY T1.qty DESC LIMIT 1 |
|
Solve the following sql problem:
Please list the stores that ordered the book "Life Without Fear".
Schema:
SCHEMA:
- Table: authors
- Column: au_id
- Samples: [172-32-1176, 213-46-8915, 238-95-7766, 267-41-2394, 274-80-9391]
- Column: au_lname
- Samples: [White, Green, Carson, O'Leary, Straight]
- Column: au_fname
- Samples: [Johnson, Marjorie, Cheryl, Michael, Dean]
- Column: phone
- Samples: [408 496-7223, 415 986-7020, 415 548-7723, 408 286-2428, 415 834-2919]
- Column: address
- Samples: [10932 Bigge Rd., 309 63rd St. #411, 589 Darwin Ln., 22 Cleveland Av. #14, 5420 College Av.]
- Column: city
- Samples: [Menlo Park, Oakland, Berkeley, San Jose, Oakland]
- Column: state
- Samples: [CA, CA, CA, CA, CA]
- Column: zip
- Samples: [94025, 94618, 94705, 95128, 94609]
- Column: contract
- Samples: [0, 0, 0, 0, 0]
- Table: jobs
- Column: job_id
- Samples: [1, 2, 3, 4, 5]
- Column: job_desc
- Samples: [New Hire - Job not specified, Chief Executive Officer, Business Operations Manager, Chief Financial Officier, Publisher]
- Column: min_lvl
- Samples: [10, 200, 175, 175, 150]
- Column: max_lvl
- Samples: [10, 250, 225, 250, 250]
- Table: publishers
- Column: pub_id
- Samples: [0736, 0877, 1389, 1622, 1756]
- Column: pub_name
- Samples: [New Moon Books, Binnet & Hardley, Algodata Infosystems, Five Lakes Publishing, Ramona Publishers]
- Column: city
- Samples: [Boston, Washington, Berkeley, Chicago, Dallas]
- Column: state
- Samples: [MA, DC, CA, IL, TX]
- Column: country
- Samples: [USA, USA, USA, USA, USA]
- Table: employee
- Column: emp_id
- Samples: [A-C71970F, A-R89858F, AMD15433F, ARD36773F, CFH28514M]
- Column: fname
- Samples: [Aria, Annette, Ann, Anabela, Carlos]
- Column: minit
- Samples: [, , M, R, F]
- Column: lname
- Samples: [Cruz, Roulet, Devon, Domingues, Hernadez]
- Column: job_id
- Samples: [10, 6, 3, 8, 5]
- Column: job_lvl
- Samples: [87, 152, 200, 100, 211]
- Column: pub_id
- Samples: [1389, 9999, 9952, 0877, 9999]
- Column: hire_date
- Samples: [1991-10-26 00:00:00.0, 1990-02-21 00:00:00.0, 1991-07-16 00:00:00.0, 1993-01-27 00:00:00.0, 1989-04-21 00:00:00.0]
- Table: pub_info
- Column: pub_id
- Samples: [0877, 1389, 1622, 1756, 9901]
- Column: logo
- Samples: [0x4749463839618B002F00B30F00000000800000008000808000000080800080008080..., 0x474946383961C2001D00B30F00000000800000008000808000000080800080008080..., 0x474946383961F5003400B30F00000000800000008000808000000080800080008080..., 0x474946383961E3002500B30F00000000800000008000808000000080800080008080..., 0x4749463839615D002200B30F00000000800000008000808000000080800080008080... (truncated)]
- Column: pr_info
- Samples: [This is sample text data for Binnet & Hardley, publisher 0877 in the p..., This is sample text data for Algodata Infosystems, publisher 1389 in t..., This is sample text data for Five Lakes Publishing, publisher 1622 in ..., This is sample text data for Ramona Publishers, publisher 1756 in the ..., This is sample text data for GGG&G, publisher 9901 in the pubs databas... (truncated)]
- Table: stores
- Column: stor_id
- Samples: [6380, 7066, 7067, 7131, 7896]
- Column: stor_name
- Samples: [Eric the Read Books, Barnum's, News & Brews, Doc-U-Mat: Quality Laundry and Books, Fricative Bookshop]
- Column: stor_address
- Samples: [788 Catamaugus Ave., 567 Pasadena Ave., 577 First St., 24-A Avogadro Way, 89 Madison St.]
- Column: city
- Samples: [Seattle, Tustin, Los Gatos, Remulade, Fremont]
- Column: state
- Samples: [WA, CA, CA, WA, CA]
- Column: zip
- Samples: [98056, 92789, 96745, 98014, 90019]
- Table: discounts
- Column: discounttype
- Samples: [Initial Customer, Volume Discount, Customer Discount]
- Column: stor_id
- Samples: [None, None, 8042]
- Column: lowqty
- Samples: [None, 100, None]
- Column: highqty
- Samples: [None, 1000, None]
- Column: discount
- Samples: [10.5, 6.7, 5.0]
- Table: titles
- Column: title_id
- Samples: [BU1032, BU1111, BU2075, BU7832, MC2222]
- Column: title
- Samples: [The Busy Executive's Database Guide, Cooking with Computers: Surreptitious Balance Sheets, You Can Combat Computer Stress!, Straight Talk About Computers, Silicon Valley Gastronomic Treats]
- Column: type
- Samples: [business, business, business, business, mod_cook]
- Column: pub_id
- Samples: [1389, 1389, 0736, 1389, 0877]
- Column: price
- Samples: [19.99, 11.95, 2.99, 19.99, 19.99]
- Column: advance
- Samples: [5000.0, 5000.0, 10125.0, 5000.0, 0.0]
- Column: royalty
- Samples: [10, 10, 24, 10, 12]
- Column: ytd_sales
- Samples: [4095, 3876, 18722, 4095, 2032]
- Column: notes
- Samples: [An overview of available database systems with emphasis on common busi..., Helpful hints on how to use your electronic resources to the best adva..., The latest medical and psychological techniques for living with the el..., Annotated analysis of what computers can do for you: a no-hype guide f..., Favorite recipes for quick, easy, and elegant meals. (truncated)]
- Column: pubdate
- Samples: [1991-06-12 00:00:00.0, 1991-06-09 00:00:00.0, 1991-06-30 00:00:00.0, 1991-06-22 00:00:00.0, 1991-06-09 00:00:00.0]
- Table: roysched
- Column: title_id
- Samples: [BU1032, BU1032, PC1035, PC1035, PC1035]
- Column: lorange
- Samples: [0, 5001, 0, 2001, 3001]
- Column: hirange
- Samples: [5000, 50000, 2000, 3000, 4000]
- Column: royalty
- Samples: [10, 12, 10, 12, 14]
- Table: sales
- Column: stor_id
- Samples: [6380, 6380, 7066, 7066, 7067]
- Column: ord_num
- Samples: [6871, 722a, A2976, QA7442.3, D4482]
- Column: ord_date
- Samples: [1994-09-14 00:00:00.0, 1994-09-13 00:00:00.0, 1993-05-24 00:00:00.0, 1994-09-13 00:00:00.0, 1994-09-14 00:00:00.0]
- Column: qty
- Samples: [5, 3, 50, 75, 10]
- Column: payterms
- Samples: [Net 60, Net 60, Net 30, ON invoice, Net 60]
- Column: title_id
- Samples: [BU1032, PS2091, PC8888, PS2091, PS2091]
- Table: titleauthor
- Column: au_id
- Samples: [172-32-1176, 213-46-8915, 213-46-8915, 238-95-7766, 267-41-2394]
- Column: title_id
- Samples: [PS3333, BU1032, BU2075, PC1035, BU1111]
- Column: au_ord
- Samples: [1, 2, 1, 1, 2]
- Column: royaltyper
- Samples: [100, 40, 100, 100, 40]
| SELECT T2.stor_name FROM sales AS T1 INNER JOIN stores AS T2 ON T1.stor_id = T2.stor_id INNER JOIN titles AS T3 ON T1.title_id = T3.title_id WHERE T3.title = 'Life Without Fear' |
|
Solve the following sql problem:
Among the stores that have ordered the book "Life Without Fear", how many of them are located in Massachusetts?
Schema:
SCHEMA:
- Table: authors
- Column: au_id
- Samples: [172-32-1176, 213-46-8915, 238-95-7766, 267-41-2394, 274-80-9391]
- Column: au_lname
- Samples: [White, Green, Carson, O'Leary, Straight]
- Column: au_fname
- Samples: [Johnson, Marjorie, Cheryl, Michael, Dean]
- Column: phone
- Samples: [408 496-7223, 415 986-7020, 415 548-7723, 408 286-2428, 415 834-2919]
- Column: address
- Samples: [10932 Bigge Rd., 309 63rd St. #411, 589 Darwin Ln., 22 Cleveland Av. #14, 5420 College Av.]
- Column: city
- Samples: [Menlo Park, Oakland, Berkeley, San Jose, Oakland]
- Column: state
- Samples: [CA, CA, CA, CA, CA]
- Column: zip
- Samples: [94025, 94618, 94705, 95128, 94609]
- Column: contract
- Samples: [0, 0, 0, 0, 0]
- Table: jobs
- Column: job_id
- Samples: [1, 2, 3, 4, 5]
- Column: job_desc
- Samples: [New Hire - Job not specified, Chief Executive Officer, Business Operations Manager, Chief Financial Officier, Publisher]
- Column: min_lvl
- Samples: [10, 200, 175, 175, 150]
- Column: max_lvl
- Samples: [10, 250, 225, 250, 250]
- Table: publishers
- Column: pub_id
- Samples: [0736, 0877, 1389, 1622, 1756]
- Column: pub_name
- Samples: [New Moon Books, Binnet & Hardley, Algodata Infosystems, Five Lakes Publishing, Ramona Publishers]
- Column: city
- Samples: [Boston, Washington, Berkeley, Chicago, Dallas]
- Column: state
- Samples: [MA, DC, CA, IL, TX]
- Column: country
- Samples: [USA, USA, USA, USA, USA]
- Table: employee
- Column: emp_id
- Samples: [A-C71970F, A-R89858F, AMD15433F, ARD36773F, CFH28514M]
- Column: fname
- Samples: [Aria, Annette, Ann, Anabela, Carlos]
- Column: minit
- Samples: [, , M, R, F]
- Column: lname
- Samples: [Cruz, Roulet, Devon, Domingues, Hernadez]
- Column: job_id
- Samples: [10, 6, 3, 8, 5]
- Column: job_lvl
- Samples: [87, 152, 200, 100, 211]
- Column: pub_id
- Samples: [1389, 9999, 9952, 0877, 9999]
- Column: hire_date
- Samples: [1991-10-26 00:00:00.0, 1990-02-21 00:00:00.0, 1991-07-16 00:00:00.0, 1993-01-27 00:00:00.0, 1989-04-21 00:00:00.0]
- Table: pub_info
- Column: pub_id
- Samples: [0877, 1389, 1622, 1756, 9901]
- Column: logo
- Samples: [0x4749463839618B002F00B30F00000000800000008000808000000080800080008080..., 0x474946383961C2001D00B30F00000000800000008000808000000080800080008080..., 0x474946383961F5003400B30F00000000800000008000808000000080800080008080..., 0x474946383961E3002500B30F00000000800000008000808000000080800080008080..., 0x4749463839615D002200B30F00000000800000008000808000000080800080008080... (truncated)]
- Column: pr_info
- Samples: [This is sample text data for Binnet & Hardley, publisher 0877 in the p..., This is sample text data for Algodata Infosystems, publisher 1389 in t..., This is sample text data for Five Lakes Publishing, publisher 1622 in ..., This is sample text data for Ramona Publishers, publisher 1756 in the ..., This is sample text data for GGG&G, publisher 9901 in the pubs databas... (truncated)]
- Table: stores
- Column: stor_id
- Samples: [6380, 7066, 7067, 7131, 7896]
- Column: stor_name
- Samples: [Eric the Read Books, Barnum's, News & Brews, Doc-U-Mat: Quality Laundry and Books, Fricative Bookshop]
- Column: stor_address
- Samples: [788 Catamaugus Ave., 567 Pasadena Ave., 577 First St., 24-A Avogadro Way, 89 Madison St.]
- Column: city
- Samples: [Seattle, Tustin, Los Gatos, Remulade, Fremont]
- Column: state
- Samples: [WA, CA, CA, WA, CA]
- Column: zip
- Samples: [98056, 92789, 96745, 98014, 90019]
- Table: discounts
- Column: discounttype
- Samples: [Initial Customer, Volume Discount, Customer Discount]
- Column: stor_id
- Samples: [None, None, 8042]
- Column: lowqty
- Samples: [None, 100, None]
- Column: highqty
- Samples: [None, 1000, None]
- Column: discount
- Samples: [10.5, 6.7, 5.0]
- Table: titles
- Column: title_id
- Samples: [BU1032, BU1111, BU2075, BU7832, MC2222]
- Column: title
- Samples: [The Busy Executive's Database Guide, Cooking with Computers: Surreptitious Balance Sheets, You Can Combat Computer Stress!, Straight Talk About Computers, Silicon Valley Gastronomic Treats]
- Column: type
- Samples: [business, business, business, business, mod_cook]
- Column: pub_id
- Samples: [1389, 1389, 0736, 1389, 0877]
- Column: price
- Samples: [19.99, 11.95, 2.99, 19.99, 19.99]
- Column: advance
- Samples: [5000.0, 5000.0, 10125.0, 5000.0, 0.0]
- Column: royalty
- Samples: [10, 10, 24, 10, 12]
- Column: ytd_sales
- Samples: [4095, 3876, 18722, 4095, 2032]
- Column: notes
- Samples: [An overview of available database systems with emphasis on common busi..., Helpful hints on how to use your electronic resources to the best adva..., The latest medical and psychological techniques for living with the el..., Annotated analysis of what computers can do for you: a no-hype guide f..., Favorite recipes for quick, easy, and elegant meals. (truncated)]
- Column: pubdate
- Samples: [1991-06-12 00:00:00.0, 1991-06-09 00:00:00.0, 1991-06-30 00:00:00.0, 1991-06-22 00:00:00.0, 1991-06-09 00:00:00.0]
- Table: roysched
- Column: title_id
- Samples: [BU1032, BU1032, PC1035, PC1035, PC1035]
- Column: lorange
- Samples: [0, 5001, 0, 2001, 3001]
- Column: hirange
- Samples: [5000, 50000, 2000, 3000, 4000]
- Column: royalty
- Samples: [10, 12, 10, 12, 14]
- Table: sales
- Column: stor_id
- Samples: [6380, 6380, 7066, 7066, 7067]
- Column: ord_num
- Samples: [6871, 722a, A2976, QA7442.3, D4482]
- Column: ord_date
- Samples: [1994-09-14 00:00:00.0, 1994-09-13 00:00:00.0, 1993-05-24 00:00:00.0, 1994-09-13 00:00:00.0, 1994-09-14 00:00:00.0]
- Column: qty
- Samples: [5, 3, 50, 75, 10]
- Column: payterms
- Samples: [Net 60, Net 60, Net 30, ON invoice, Net 60]
- Column: title_id
- Samples: [BU1032, PS2091, PC8888, PS2091, PS2091]
- Table: titleauthor
- Column: au_id
- Samples: [172-32-1176, 213-46-8915, 213-46-8915, 238-95-7766, 267-41-2394]
- Column: title_id
- Samples: [PS3333, BU1032, BU2075, PC1035, BU1111]
- Column: au_ord
- Samples: [1, 2, 1, 1, 2]
- Column: royaltyper
- Samples: [100, 40, 100, 100, 40]
| SELECT COUNT(T1.stor_id) FROM sales AS T1 INNER JOIN stores AS T2 ON T1.stor_id = T2.stor_id INNER JOIN titles AS T3 ON T1.title_id = T3.title_id WHERE T2.state = 'Massachusetts' |
|
Solve the following sql problem:
In which country is the publisher of the book "Life Without Fear" located?
Schema:
SCHEMA:
- Table: authors
- Column: au_id
- Samples: [172-32-1176, 213-46-8915, 238-95-7766, 267-41-2394, 274-80-9391]
- Column: au_lname
- Samples: [White, Green, Carson, O'Leary, Straight]
- Column: au_fname
- Samples: [Johnson, Marjorie, Cheryl, Michael, Dean]
- Column: phone
- Samples: [408 496-7223, 415 986-7020, 415 548-7723, 408 286-2428, 415 834-2919]
- Column: address
- Samples: [10932 Bigge Rd., 309 63rd St. #411, 589 Darwin Ln., 22 Cleveland Av. #14, 5420 College Av.]
- Column: city
- Samples: [Menlo Park, Oakland, Berkeley, San Jose, Oakland]
- Column: state
- Samples: [CA, CA, CA, CA, CA]
- Column: zip
- Samples: [94025, 94618, 94705, 95128, 94609]
- Column: contract
- Samples: [0, 0, 0, 0, 0]
- Table: jobs
- Column: job_id
- Samples: [1, 2, 3, 4, 5]
- Column: job_desc
- Samples: [New Hire - Job not specified, Chief Executive Officer, Business Operations Manager, Chief Financial Officier, Publisher]
- Column: min_lvl
- Samples: [10, 200, 175, 175, 150]
- Column: max_lvl
- Samples: [10, 250, 225, 250, 250]
- Table: publishers
- Column: pub_id
- Samples: [0736, 0877, 1389, 1622, 1756]
- Column: pub_name
- Samples: [New Moon Books, Binnet & Hardley, Algodata Infosystems, Five Lakes Publishing, Ramona Publishers]
- Column: city
- Samples: [Boston, Washington, Berkeley, Chicago, Dallas]
- Column: state
- Samples: [MA, DC, CA, IL, TX]
- Column: country
- Samples: [USA, USA, USA, USA, USA]
- Table: employee
- Column: emp_id
- Samples: [A-C71970F, A-R89858F, AMD15433F, ARD36773F, CFH28514M]
- Column: fname
- Samples: [Aria, Annette, Ann, Anabela, Carlos]
- Column: minit
- Samples: [, , M, R, F]
- Column: lname
- Samples: [Cruz, Roulet, Devon, Domingues, Hernadez]
- Column: job_id
- Samples: [10, 6, 3, 8, 5]
- Column: job_lvl
- Samples: [87, 152, 200, 100, 211]
- Column: pub_id
- Samples: [1389, 9999, 9952, 0877, 9999]
- Column: hire_date
- Samples: [1991-10-26 00:00:00.0, 1990-02-21 00:00:00.0, 1991-07-16 00:00:00.0, 1993-01-27 00:00:00.0, 1989-04-21 00:00:00.0]
- Table: pub_info
- Column: pub_id
- Samples: [0877, 1389, 1622, 1756, 9901]
- Column: logo
- Samples: [0x4749463839618B002F00B30F00000000800000008000808000000080800080008080..., 0x474946383961C2001D00B30F00000000800000008000808000000080800080008080..., 0x474946383961F5003400B30F00000000800000008000808000000080800080008080..., 0x474946383961E3002500B30F00000000800000008000808000000080800080008080..., 0x4749463839615D002200B30F00000000800000008000808000000080800080008080... (truncated)]
- Column: pr_info
- Samples: [This is sample text data for Binnet & Hardley, publisher 0877 in the p..., This is sample text data for Algodata Infosystems, publisher 1389 in t..., This is sample text data for Five Lakes Publishing, publisher 1622 in ..., This is sample text data for Ramona Publishers, publisher 1756 in the ..., This is sample text data for GGG&G, publisher 9901 in the pubs databas... (truncated)]
- Table: stores
- Column: stor_id
- Samples: [6380, 7066, 7067, 7131, 7896]
- Column: stor_name
- Samples: [Eric the Read Books, Barnum's, News & Brews, Doc-U-Mat: Quality Laundry and Books, Fricative Bookshop]
- Column: stor_address
- Samples: [788 Catamaugus Ave., 567 Pasadena Ave., 577 First St., 24-A Avogadro Way, 89 Madison St.]
- Column: city
- Samples: [Seattle, Tustin, Los Gatos, Remulade, Fremont]
- Column: state
- Samples: [WA, CA, CA, WA, CA]
- Column: zip
- Samples: [98056, 92789, 96745, 98014, 90019]
- Table: discounts
- Column: discounttype
- Samples: [Initial Customer, Volume Discount, Customer Discount]
- Column: stor_id
- Samples: [None, None, 8042]
- Column: lowqty
- Samples: [None, 100, None]
- Column: highqty
- Samples: [None, 1000, None]
- Column: discount
- Samples: [10.5, 6.7, 5.0]
- Table: titles
- Column: title_id
- Samples: [BU1032, BU1111, BU2075, BU7832, MC2222]
- Column: title
- Samples: [The Busy Executive's Database Guide, Cooking with Computers: Surreptitious Balance Sheets, You Can Combat Computer Stress!, Straight Talk About Computers, Silicon Valley Gastronomic Treats]
- Column: type
- Samples: [business, business, business, business, mod_cook]
- Column: pub_id
- Samples: [1389, 1389, 0736, 1389, 0877]
- Column: price
- Samples: [19.99, 11.95, 2.99, 19.99, 19.99]
- Column: advance
- Samples: [5000.0, 5000.0, 10125.0, 5000.0, 0.0]
- Column: royalty
- Samples: [10, 10, 24, 10, 12]
- Column: ytd_sales
- Samples: [4095, 3876, 18722, 4095, 2032]
- Column: notes
- Samples: [An overview of available database systems with emphasis on common busi..., Helpful hints on how to use your electronic resources to the best adva..., The latest medical and psychological techniques for living with the el..., Annotated analysis of what computers can do for you: a no-hype guide f..., Favorite recipes for quick, easy, and elegant meals. (truncated)]
- Column: pubdate
- Samples: [1991-06-12 00:00:00.0, 1991-06-09 00:00:00.0, 1991-06-30 00:00:00.0, 1991-06-22 00:00:00.0, 1991-06-09 00:00:00.0]
- Table: roysched
- Column: title_id
- Samples: [BU1032, BU1032, PC1035, PC1035, PC1035]
- Column: lorange
- Samples: [0, 5001, 0, 2001, 3001]
- Column: hirange
- Samples: [5000, 50000, 2000, 3000, 4000]
- Column: royalty
- Samples: [10, 12, 10, 12, 14]
- Table: sales
- Column: stor_id
- Samples: [6380, 6380, 7066, 7066, 7067]
- Column: ord_num
- Samples: [6871, 722a, A2976, QA7442.3, D4482]
- Column: ord_date
- Samples: [1994-09-14 00:00:00.0, 1994-09-13 00:00:00.0, 1993-05-24 00:00:00.0, 1994-09-13 00:00:00.0, 1994-09-14 00:00:00.0]
- Column: qty
- Samples: [5, 3, 50, 75, 10]
- Column: payterms
- Samples: [Net 60, Net 60, Net 30, ON invoice, Net 60]
- Column: title_id
- Samples: [BU1032, PS2091, PC8888, PS2091, PS2091]
- Table: titleauthor
- Column: au_id
- Samples: [172-32-1176, 213-46-8915, 213-46-8915, 238-95-7766, 267-41-2394]
- Column: title_id
- Samples: [PS3333, BU1032, BU2075, PC1035, BU1111]
- Column: au_ord
- Samples: [1, 2, 1, 1, 2]
- Column: royaltyper
- Samples: [100, 40, 100, 100, 40]
| SELECT T2.country FROM titles AS T1 INNER JOIN publishers AS T2 ON T1.pub_id = T2.pub_id WHERE T1.title = 'Life Without Fear' |
|
Solve the following sql problem:
What is the publisher that has published the most expensive book?
Schema:
SCHEMA:
- Table: authors
- Column: au_id
- Samples: [172-32-1176, 213-46-8915, 238-95-7766, 267-41-2394, 274-80-9391]
- Column: au_lname
- Samples: [White, Green, Carson, O'Leary, Straight]
- Column: au_fname
- Samples: [Johnson, Marjorie, Cheryl, Michael, Dean]
- Column: phone
- Samples: [408 496-7223, 415 986-7020, 415 548-7723, 408 286-2428, 415 834-2919]
- Column: address
- Samples: [10932 Bigge Rd., 309 63rd St. #411, 589 Darwin Ln., 22 Cleveland Av. #14, 5420 College Av.]
- Column: city
- Samples: [Menlo Park, Oakland, Berkeley, San Jose, Oakland]
- Column: state
- Samples: [CA, CA, CA, CA, CA]
- Column: zip
- Samples: [94025, 94618, 94705, 95128, 94609]
- Column: contract
- Samples: [0, 0, 0, 0, 0]
- Table: jobs
- Column: job_id
- Samples: [1, 2, 3, 4, 5]
- Column: job_desc
- Samples: [New Hire - Job not specified, Chief Executive Officer, Business Operations Manager, Chief Financial Officier, Publisher]
- Column: min_lvl
- Samples: [10, 200, 175, 175, 150]
- Column: max_lvl
- Samples: [10, 250, 225, 250, 250]
- Table: publishers
- Column: pub_id
- Samples: [0736, 0877, 1389, 1622, 1756]
- Column: pub_name
- Samples: [New Moon Books, Binnet & Hardley, Algodata Infosystems, Five Lakes Publishing, Ramona Publishers]
- Column: city
- Samples: [Boston, Washington, Berkeley, Chicago, Dallas]
- Column: state
- Samples: [MA, DC, CA, IL, TX]
- Column: country
- Samples: [USA, USA, USA, USA, USA]
- Table: employee
- Column: emp_id
- Samples: [A-C71970F, A-R89858F, AMD15433F, ARD36773F, CFH28514M]
- Column: fname
- Samples: [Aria, Annette, Ann, Anabela, Carlos]
- Column: minit
- Samples: [, , M, R, F]
- Column: lname
- Samples: [Cruz, Roulet, Devon, Domingues, Hernadez]
- Column: job_id
- Samples: [10, 6, 3, 8, 5]
- Column: job_lvl
- Samples: [87, 152, 200, 100, 211]
- Column: pub_id
- Samples: [1389, 9999, 9952, 0877, 9999]
- Column: hire_date
- Samples: [1991-10-26 00:00:00.0, 1990-02-21 00:00:00.0, 1991-07-16 00:00:00.0, 1993-01-27 00:00:00.0, 1989-04-21 00:00:00.0]
- Table: pub_info
- Column: pub_id
- Samples: [0877, 1389, 1622, 1756, 9901]
- Column: logo
- Samples: [0x4749463839618B002F00B30F00000000800000008000808000000080800080008080..., 0x474946383961C2001D00B30F00000000800000008000808000000080800080008080..., 0x474946383961F5003400B30F00000000800000008000808000000080800080008080..., 0x474946383961E3002500B30F00000000800000008000808000000080800080008080..., 0x4749463839615D002200B30F00000000800000008000808000000080800080008080... (truncated)]
- Column: pr_info
- Samples: [This is sample text data for Binnet & Hardley, publisher 0877 in the p..., This is sample text data for Algodata Infosystems, publisher 1389 in t..., This is sample text data for Five Lakes Publishing, publisher 1622 in ..., This is sample text data for Ramona Publishers, publisher 1756 in the ..., This is sample text data for GGG&G, publisher 9901 in the pubs databas... (truncated)]
- Table: stores
- Column: stor_id
- Samples: [6380, 7066, 7067, 7131, 7896]
- Column: stor_name
- Samples: [Eric the Read Books, Barnum's, News & Brews, Doc-U-Mat: Quality Laundry and Books, Fricative Bookshop]
- Column: stor_address
- Samples: [788 Catamaugus Ave., 567 Pasadena Ave., 577 First St., 24-A Avogadro Way, 89 Madison St.]
- Column: city
- Samples: [Seattle, Tustin, Los Gatos, Remulade, Fremont]
- Column: state
- Samples: [WA, CA, CA, WA, CA]
- Column: zip
- Samples: [98056, 92789, 96745, 98014, 90019]
- Table: discounts
- Column: discounttype
- Samples: [Initial Customer, Volume Discount, Customer Discount]
- Column: stor_id
- Samples: [None, None, 8042]
- Column: lowqty
- Samples: [None, 100, None]
- Column: highqty
- Samples: [None, 1000, None]
- Column: discount
- Samples: [10.5, 6.7, 5.0]
- Table: titles
- Column: title_id
- Samples: [BU1032, BU1111, BU2075, BU7832, MC2222]
- Column: title
- Samples: [The Busy Executive's Database Guide, Cooking with Computers: Surreptitious Balance Sheets, You Can Combat Computer Stress!, Straight Talk About Computers, Silicon Valley Gastronomic Treats]
- Column: type
- Samples: [business, business, business, business, mod_cook]
- Column: pub_id
- Samples: [1389, 1389, 0736, 1389, 0877]
- Column: price
- Samples: [19.99, 11.95, 2.99, 19.99, 19.99]
- Column: advance
- Samples: [5000.0, 5000.0, 10125.0, 5000.0, 0.0]
- Column: royalty
- Samples: [10, 10, 24, 10, 12]
- Column: ytd_sales
- Samples: [4095, 3876, 18722, 4095, 2032]
- Column: notes
- Samples: [An overview of available database systems with emphasis on common busi..., Helpful hints on how to use your electronic resources to the best adva..., The latest medical and psychological techniques for living with the el..., Annotated analysis of what computers can do for you: a no-hype guide f..., Favorite recipes for quick, easy, and elegant meals. (truncated)]
- Column: pubdate
- Samples: [1991-06-12 00:00:00.0, 1991-06-09 00:00:00.0, 1991-06-30 00:00:00.0, 1991-06-22 00:00:00.0, 1991-06-09 00:00:00.0]
- Table: roysched
- Column: title_id
- Samples: [BU1032, BU1032, PC1035, PC1035, PC1035]
- Column: lorange
- Samples: [0, 5001, 0, 2001, 3001]
- Column: hirange
- Samples: [5000, 50000, 2000, 3000, 4000]
- Column: royalty
- Samples: [10, 12, 10, 12, 14]
- Table: sales
- Column: stor_id
- Samples: [6380, 6380, 7066, 7066, 7067]
- Column: ord_num
- Samples: [6871, 722a, A2976, QA7442.3, D4482]
- Column: ord_date
- Samples: [1994-09-14 00:00:00.0, 1994-09-13 00:00:00.0, 1993-05-24 00:00:00.0, 1994-09-13 00:00:00.0, 1994-09-14 00:00:00.0]
- Column: qty
- Samples: [5, 3, 50, 75, 10]
- Column: payterms
- Samples: [Net 60, Net 60, Net 30, ON invoice, Net 60]
- Column: title_id
- Samples: [BU1032, PS2091, PC8888, PS2091, PS2091]
- Table: titleauthor
- Column: au_id
- Samples: [172-32-1176, 213-46-8915, 213-46-8915, 238-95-7766, 267-41-2394]
- Column: title_id
- Samples: [PS3333, BU1032, BU2075, PC1035, BU1111]
- Column: au_ord
- Samples: [1, 2, 1, 1, 2]
- Column: royaltyper
- Samples: [100, 40, 100, 100, 40]
| SELECT T2.pub_name FROM titles AS T1 INNER JOIN publishers AS T2 ON T1.pub_id = T2.pub_id ORDER BY T1.price DESC LIMIT 1 |
|
Solve the following sql problem:
Among the publishers in the USA, how many of them have published books that are over $15?
Schema:
SCHEMA:
- Table: authors
- Column: au_id
- Samples: [172-32-1176, 213-46-8915, 238-95-7766, 267-41-2394, 274-80-9391]
- Column: au_lname
- Samples: [White, Green, Carson, O'Leary, Straight]
- Column: au_fname
- Samples: [Johnson, Marjorie, Cheryl, Michael, Dean]
- Column: phone
- Samples: [408 496-7223, 415 986-7020, 415 548-7723, 408 286-2428, 415 834-2919]
- Column: address
- Samples: [10932 Bigge Rd., 309 63rd St. #411, 589 Darwin Ln., 22 Cleveland Av. #14, 5420 College Av.]
- Column: city
- Samples: [Menlo Park, Oakland, Berkeley, San Jose, Oakland]
- Column: state
- Samples: [CA, CA, CA, CA, CA]
- Column: zip
- Samples: [94025, 94618, 94705, 95128, 94609]
- Column: contract
- Samples: [0, 0, 0, 0, 0]
- Table: jobs
- Column: job_id
- Samples: [1, 2, 3, 4, 5]
- Column: job_desc
- Samples: [New Hire - Job not specified, Chief Executive Officer, Business Operations Manager, Chief Financial Officier, Publisher]
- Column: min_lvl
- Samples: [10, 200, 175, 175, 150]
- Column: max_lvl
- Samples: [10, 250, 225, 250, 250]
- Table: publishers
- Column: pub_id
- Samples: [0736, 0877, 1389, 1622, 1756]
- Column: pub_name
- Samples: [New Moon Books, Binnet & Hardley, Algodata Infosystems, Five Lakes Publishing, Ramona Publishers]
- Column: city
- Samples: [Boston, Washington, Berkeley, Chicago, Dallas]
- Column: state
- Samples: [MA, DC, CA, IL, TX]
- Column: country
- Samples: [USA, USA, USA, USA, USA]
- Table: employee
- Column: emp_id
- Samples: [A-C71970F, A-R89858F, AMD15433F, ARD36773F, CFH28514M]
- Column: fname
- Samples: [Aria, Annette, Ann, Anabela, Carlos]
- Column: minit
- Samples: [, , M, R, F]
- Column: lname
- Samples: [Cruz, Roulet, Devon, Domingues, Hernadez]
- Column: job_id
- Samples: [10, 6, 3, 8, 5]
- Column: job_lvl
- Samples: [87, 152, 200, 100, 211]
- Column: pub_id
- Samples: [1389, 9999, 9952, 0877, 9999]
- Column: hire_date
- Samples: [1991-10-26 00:00:00.0, 1990-02-21 00:00:00.0, 1991-07-16 00:00:00.0, 1993-01-27 00:00:00.0, 1989-04-21 00:00:00.0]
- Table: pub_info
- Column: pub_id
- Samples: [0877, 1389, 1622, 1756, 9901]
- Column: logo
- Samples: [0x4749463839618B002F00B30F00000000800000008000808000000080800080008080..., 0x474946383961C2001D00B30F00000000800000008000808000000080800080008080..., 0x474946383961F5003400B30F00000000800000008000808000000080800080008080..., 0x474946383961E3002500B30F00000000800000008000808000000080800080008080..., 0x4749463839615D002200B30F00000000800000008000808000000080800080008080... (truncated)]
- Column: pr_info
- Samples: [This is sample text data for Binnet & Hardley, publisher 0877 in the p..., This is sample text data for Algodata Infosystems, publisher 1389 in t..., This is sample text data for Five Lakes Publishing, publisher 1622 in ..., This is sample text data for Ramona Publishers, publisher 1756 in the ..., This is sample text data for GGG&G, publisher 9901 in the pubs databas... (truncated)]
- Table: stores
- Column: stor_id
- Samples: [6380, 7066, 7067, 7131, 7896]
- Column: stor_name
- Samples: [Eric the Read Books, Barnum's, News & Brews, Doc-U-Mat: Quality Laundry and Books, Fricative Bookshop]
- Column: stor_address
- Samples: [788 Catamaugus Ave., 567 Pasadena Ave., 577 First St., 24-A Avogadro Way, 89 Madison St.]
- Column: city
- Samples: [Seattle, Tustin, Los Gatos, Remulade, Fremont]
- Column: state
- Samples: [WA, CA, CA, WA, CA]
- Column: zip
- Samples: [98056, 92789, 96745, 98014, 90019]
- Table: discounts
- Column: discounttype
- Samples: [Initial Customer, Volume Discount, Customer Discount]
- Column: stor_id
- Samples: [None, None, 8042]
- Column: lowqty
- Samples: [None, 100, None]
- Column: highqty
- Samples: [None, 1000, None]
- Column: discount
- Samples: [10.5, 6.7, 5.0]
- Table: titles
- Column: title_id
- Samples: [BU1032, BU1111, BU2075, BU7832, MC2222]
- Column: title
- Samples: [The Busy Executive's Database Guide, Cooking with Computers: Surreptitious Balance Sheets, You Can Combat Computer Stress!, Straight Talk About Computers, Silicon Valley Gastronomic Treats]
- Column: type
- Samples: [business, business, business, business, mod_cook]
- Column: pub_id
- Samples: [1389, 1389, 0736, 1389, 0877]
- Column: price
- Samples: [19.99, 11.95, 2.99, 19.99, 19.99]
- Column: advance
- Samples: [5000.0, 5000.0, 10125.0, 5000.0, 0.0]
- Column: royalty
- Samples: [10, 10, 24, 10, 12]
- Column: ytd_sales
- Samples: [4095, 3876, 18722, 4095, 2032]
- Column: notes
- Samples: [An overview of available database systems with emphasis on common busi..., Helpful hints on how to use your electronic resources to the best adva..., The latest medical and psychological techniques for living with the el..., Annotated analysis of what computers can do for you: a no-hype guide f..., Favorite recipes for quick, easy, and elegant meals. (truncated)]
- Column: pubdate
- Samples: [1991-06-12 00:00:00.0, 1991-06-09 00:00:00.0, 1991-06-30 00:00:00.0, 1991-06-22 00:00:00.0, 1991-06-09 00:00:00.0]
- Table: roysched
- Column: title_id
- Samples: [BU1032, BU1032, PC1035, PC1035, PC1035]
- Column: lorange
- Samples: [0, 5001, 0, 2001, 3001]
- Column: hirange
- Samples: [5000, 50000, 2000, 3000, 4000]
- Column: royalty
- Samples: [10, 12, 10, 12, 14]
- Table: sales
- Column: stor_id
- Samples: [6380, 6380, 7066, 7066, 7067]
- Column: ord_num
- Samples: [6871, 722a, A2976, QA7442.3, D4482]
- Column: ord_date
- Samples: [1994-09-14 00:00:00.0, 1994-09-13 00:00:00.0, 1993-05-24 00:00:00.0, 1994-09-13 00:00:00.0, 1994-09-14 00:00:00.0]
- Column: qty
- Samples: [5, 3, 50, 75, 10]
- Column: payterms
- Samples: [Net 60, Net 60, Net 30, ON invoice, Net 60]
- Column: title_id
- Samples: [BU1032, PS2091, PC8888, PS2091, PS2091]
- Table: titleauthor
- Column: au_id
- Samples: [172-32-1176, 213-46-8915, 213-46-8915, 238-95-7766, 267-41-2394]
- Column: title_id
- Samples: [PS3333, BU1032, BU2075, PC1035, BU1111]
- Column: au_ord
- Samples: [1, 2, 1, 1, 2]
- Column: royaltyper
- Samples: [100, 40, 100, 100, 40]
| SELECT COUNT(DISTINCT T1.pub_id) FROM titles AS T1 INNER JOIN publishers AS T2 ON T1.pub_id = T2.pub_id WHERE T2.country = 'USA' AND T1.price > 15 |
|
Solve the following sql problem:
Please give more detailed information about the first three books that sell the best.
Schema:
SCHEMA:
- Table: authors
- Column: au_id
- Samples: [172-32-1176, 213-46-8915, 238-95-7766, 267-41-2394, 274-80-9391]
- Column: au_lname
- Samples: [White, Green, Carson, O'Leary, Straight]
- Column: au_fname
- Samples: [Johnson, Marjorie, Cheryl, Michael, Dean]
- Column: phone
- Samples: [408 496-7223, 415 986-7020, 415 548-7723, 408 286-2428, 415 834-2919]
- Column: address
- Samples: [10932 Bigge Rd., 309 63rd St. #411, 589 Darwin Ln., 22 Cleveland Av. #14, 5420 College Av.]
- Column: city
- Samples: [Menlo Park, Oakland, Berkeley, San Jose, Oakland]
- Column: state
- Samples: [CA, CA, CA, CA, CA]
- Column: zip
- Samples: [94025, 94618, 94705, 95128, 94609]
- Column: contract
- Samples: [0, 0, 0, 0, 0]
- Table: jobs
- Column: job_id
- Samples: [1, 2, 3, 4, 5]
- Column: job_desc
- Samples: [New Hire - Job not specified, Chief Executive Officer, Business Operations Manager, Chief Financial Officier, Publisher]
- Column: min_lvl
- Samples: [10, 200, 175, 175, 150]
- Column: max_lvl
- Samples: [10, 250, 225, 250, 250]
- Table: publishers
- Column: pub_id
- Samples: [0736, 0877, 1389, 1622, 1756]
- Column: pub_name
- Samples: [New Moon Books, Binnet & Hardley, Algodata Infosystems, Five Lakes Publishing, Ramona Publishers]
- Column: city
- Samples: [Boston, Washington, Berkeley, Chicago, Dallas]
- Column: state
- Samples: [MA, DC, CA, IL, TX]
- Column: country
- Samples: [USA, USA, USA, USA, USA]
- Table: employee
- Column: emp_id
- Samples: [A-C71970F, A-R89858F, AMD15433F, ARD36773F, CFH28514M]
- Column: fname
- Samples: [Aria, Annette, Ann, Anabela, Carlos]
- Column: minit
- Samples: [, , M, R, F]
- Column: lname
- Samples: [Cruz, Roulet, Devon, Domingues, Hernadez]
- Column: job_id
- Samples: [10, 6, 3, 8, 5]
- Column: job_lvl
- Samples: [87, 152, 200, 100, 211]
- Column: pub_id
- Samples: [1389, 9999, 9952, 0877, 9999]
- Column: hire_date
- Samples: [1991-10-26 00:00:00.0, 1990-02-21 00:00:00.0, 1991-07-16 00:00:00.0, 1993-01-27 00:00:00.0, 1989-04-21 00:00:00.0]
- Table: pub_info
- Column: pub_id
- Samples: [0877, 1389, 1622, 1756, 9901]
- Column: logo
- Samples: [0x4749463839618B002F00B30F00000000800000008000808000000080800080008080..., 0x474946383961C2001D00B30F00000000800000008000808000000080800080008080..., 0x474946383961F5003400B30F00000000800000008000808000000080800080008080..., 0x474946383961E3002500B30F00000000800000008000808000000080800080008080..., 0x4749463839615D002200B30F00000000800000008000808000000080800080008080... (truncated)]
- Column: pr_info
- Samples: [This is sample text data for Binnet & Hardley, publisher 0877 in the p..., This is sample text data for Algodata Infosystems, publisher 1389 in t..., This is sample text data for Five Lakes Publishing, publisher 1622 in ..., This is sample text data for Ramona Publishers, publisher 1756 in the ..., This is sample text data for GGG&G, publisher 9901 in the pubs databas... (truncated)]
- Table: stores
- Column: stor_id
- Samples: [6380, 7066, 7067, 7131, 7896]
- Column: stor_name
- Samples: [Eric the Read Books, Barnum's, News & Brews, Doc-U-Mat: Quality Laundry and Books, Fricative Bookshop]
- Column: stor_address
- Samples: [788 Catamaugus Ave., 567 Pasadena Ave., 577 First St., 24-A Avogadro Way, 89 Madison St.]
- Column: city
- Samples: [Seattle, Tustin, Los Gatos, Remulade, Fremont]
- Column: state
- Samples: [WA, CA, CA, WA, CA]
- Column: zip
- Samples: [98056, 92789, 96745, 98014, 90019]
- Table: discounts
- Column: discounttype
- Samples: [Initial Customer, Volume Discount, Customer Discount]
- Column: stor_id
- Samples: [None, None, 8042]
- Column: lowqty
- Samples: [None, 100, None]
- Column: highqty
- Samples: [None, 1000, None]
- Column: discount
- Samples: [10.5, 6.7, 5.0]
- Table: titles
- Column: title_id
- Samples: [BU1032, BU1111, BU2075, BU7832, MC2222]
- Column: title
- Samples: [The Busy Executive's Database Guide, Cooking with Computers: Surreptitious Balance Sheets, You Can Combat Computer Stress!, Straight Talk About Computers, Silicon Valley Gastronomic Treats]
- Column: type
- Samples: [business, business, business, business, mod_cook]
- Column: pub_id
- Samples: [1389, 1389, 0736, 1389, 0877]
- Column: price
- Samples: [19.99, 11.95, 2.99, 19.99, 19.99]
- Column: advance
- Samples: [5000.0, 5000.0, 10125.0, 5000.0, 0.0]
- Column: royalty
- Samples: [10, 10, 24, 10, 12]
- Column: ytd_sales
- Samples: [4095, 3876, 18722, 4095, 2032]
- Column: notes
- Samples: [An overview of available database systems with emphasis on common busi..., Helpful hints on how to use your electronic resources to the best adva..., The latest medical and psychological techniques for living with the el..., Annotated analysis of what computers can do for you: a no-hype guide f..., Favorite recipes for quick, easy, and elegant meals. (truncated)]
- Column: pubdate
- Samples: [1991-06-12 00:00:00.0, 1991-06-09 00:00:00.0, 1991-06-30 00:00:00.0, 1991-06-22 00:00:00.0, 1991-06-09 00:00:00.0]
- Table: roysched
- Column: title_id
- Samples: [BU1032, BU1032, PC1035, PC1035, PC1035]
- Column: lorange
- Samples: [0, 5001, 0, 2001, 3001]
- Column: hirange
- Samples: [5000, 50000, 2000, 3000, 4000]
- Column: royalty
- Samples: [10, 12, 10, 12, 14]
- Table: sales
- Column: stor_id
- Samples: [6380, 6380, 7066, 7066, 7067]
- Column: ord_num
- Samples: [6871, 722a, A2976, QA7442.3, D4482]
- Column: ord_date
- Samples: [1994-09-14 00:00:00.0, 1994-09-13 00:00:00.0, 1993-05-24 00:00:00.0, 1994-09-13 00:00:00.0, 1994-09-14 00:00:00.0]
- Column: qty
- Samples: [5, 3, 50, 75, 10]
- Column: payterms
- Samples: [Net 60, Net 60, Net 30, ON invoice, Net 60]
- Column: title_id
- Samples: [BU1032, PS2091, PC8888, PS2091, PS2091]
- Table: titleauthor
- Column: au_id
- Samples: [172-32-1176, 213-46-8915, 213-46-8915, 238-95-7766, 267-41-2394]
- Column: title_id
- Samples: [PS3333, BU1032, BU2075, PC1035, BU1111]
- Column: au_ord
- Samples: [1, 2, 1, 1, 2]
- Column: royaltyper
- Samples: [100, 40, 100, 100, 40]
| SELECT T1.notes FROM titles AS T1 INNER JOIN sales AS T2 ON T1.title_id = T2.title_id ORDER BY T2.qty DESC LIMIT 3 |
|
Solve the following sql problem:
How many books on business have the bookstores in Massachusetts ordered?
Schema:
SCHEMA:
- Table: authors
- Column: au_id
- Samples: [172-32-1176, 213-46-8915, 238-95-7766, 267-41-2394, 274-80-9391]
- Column: au_lname
- Samples: [White, Green, Carson, O'Leary, Straight]
- Column: au_fname
- Samples: [Johnson, Marjorie, Cheryl, Michael, Dean]
- Column: phone
- Samples: [408 496-7223, 415 986-7020, 415 548-7723, 408 286-2428, 415 834-2919]
- Column: address
- Samples: [10932 Bigge Rd., 309 63rd St. #411, 589 Darwin Ln., 22 Cleveland Av. #14, 5420 College Av.]
- Column: city
- Samples: [Menlo Park, Oakland, Berkeley, San Jose, Oakland]
- Column: state
- Samples: [CA, CA, CA, CA, CA]
- Column: zip
- Samples: [94025, 94618, 94705, 95128, 94609]
- Column: contract
- Samples: [0, 0, 0, 0, 0]
- Table: jobs
- Column: job_id
- Samples: [1, 2, 3, 4, 5]
- Column: job_desc
- Samples: [New Hire - Job not specified, Chief Executive Officer, Business Operations Manager, Chief Financial Officier, Publisher]
- Column: min_lvl
- Samples: [10, 200, 175, 175, 150]
- Column: max_lvl
- Samples: [10, 250, 225, 250, 250]
- Table: publishers
- Column: pub_id
- Samples: [0736, 0877, 1389, 1622, 1756]
- Column: pub_name
- Samples: [New Moon Books, Binnet & Hardley, Algodata Infosystems, Five Lakes Publishing, Ramona Publishers]
- Column: city
- Samples: [Boston, Washington, Berkeley, Chicago, Dallas]
- Column: state
- Samples: [MA, DC, CA, IL, TX]
- Column: country
- Samples: [USA, USA, USA, USA, USA]
- Table: employee
- Column: emp_id
- Samples: [A-C71970F, A-R89858F, AMD15433F, ARD36773F, CFH28514M]
- Column: fname
- Samples: [Aria, Annette, Ann, Anabela, Carlos]
- Column: minit
- Samples: [, , M, R, F]
- Column: lname
- Samples: [Cruz, Roulet, Devon, Domingues, Hernadez]
- Column: job_id
- Samples: [10, 6, 3, 8, 5]
- Column: job_lvl
- Samples: [87, 152, 200, 100, 211]
- Column: pub_id
- Samples: [1389, 9999, 9952, 0877, 9999]
- Column: hire_date
- Samples: [1991-10-26 00:00:00.0, 1990-02-21 00:00:00.0, 1991-07-16 00:00:00.0, 1993-01-27 00:00:00.0, 1989-04-21 00:00:00.0]
- Table: pub_info
- Column: pub_id
- Samples: [0877, 1389, 1622, 1756, 9901]
- Column: logo
- Samples: [0x4749463839618B002F00B30F00000000800000008000808000000080800080008080..., 0x474946383961C2001D00B30F00000000800000008000808000000080800080008080..., 0x474946383961F5003400B30F00000000800000008000808000000080800080008080..., 0x474946383961E3002500B30F00000000800000008000808000000080800080008080..., 0x4749463839615D002200B30F00000000800000008000808000000080800080008080... (truncated)]
- Column: pr_info
- Samples: [This is sample text data for Binnet & Hardley, publisher 0877 in the p..., This is sample text data for Algodata Infosystems, publisher 1389 in t..., This is sample text data for Five Lakes Publishing, publisher 1622 in ..., This is sample text data for Ramona Publishers, publisher 1756 in the ..., This is sample text data for GGG&G, publisher 9901 in the pubs databas... (truncated)]
- Table: stores
- Column: stor_id
- Samples: [6380, 7066, 7067, 7131, 7896]
- Column: stor_name
- Samples: [Eric the Read Books, Barnum's, News & Brews, Doc-U-Mat: Quality Laundry and Books, Fricative Bookshop]
- Column: stor_address
- Samples: [788 Catamaugus Ave., 567 Pasadena Ave., 577 First St., 24-A Avogadro Way, 89 Madison St.]
- Column: city
- Samples: [Seattle, Tustin, Los Gatos, Remulade, Fremont]
- Column: state
- Samples: [WA, CA, CA, WA, CA]
- Column: zip
- Samples: [98056, 92789, 96745, 98014, 90019]
- Table: discounts
- Column: discounttype
- Samples: [Initial Customer, Volume Discount, Customer Discount]
- Column: stor_id
- Samples: [None, None, 8042]
- Column: lowqty
- Samples: [None, 100, None]
- Column: highqty
- Samples: [None, 1000, None]
- Column: discount
- Samples: [10.5, 6.7, 5.0]
- Table: titles
- Column: title_id
- Samples: [BU1032, BU1111, BU2075, BU7832, MC2222]
- Column: title
- Samples: [The Busy Executive's Database Guide, Cooking with Computers: Surreptitious Balance Sheets, You Can Combat Computer Stress!, Straight Talk About Computers, Silicon Valley Gastronomic Treats]
- Column: type
- Samples: [business, business, business, business, mod_cook]
- Column: pub_id
- Samples: [1389, 1389, 0736, 1389, 0877]
- Column: price
- Samples: [19.99, 11.95, 2.99, 19.99, 19.99]
- Column: advance
- Samples: [5000.0, 5000.0, 10125.0, 5000.0, 0.0]
- Column: royalty
- Samples: [10, 10, 24, 10, 12]
- Column: ytd_sales
- Samples: [4095, 3876, 18722, 4095, 2032]
- Column: notes
- Samples: [An overview of available database systems with emphasis on common busi..., Helpful hints on how to use your electronic resources to the best adva..., The latest medical and psychological techniques for living with the el..., Annotated analysis of what computers can do for you: a no-hype guide f..., Favorite recipes for quick, easy, and elegant meals. (truncated)]
- Column: pubdate
- Samples: [1991-06-12 00:00:00.0, 1991-06-09 00:00:00.0, 1991-06-30 00:00:00.0, 1991-06-22 00:00:00.0, 1991-06-09 00:00:00.0]
- Table: roysched
- Column: title_id
- Samples: [BU1032, BU1032, PC1035, PC1035, PC1035]
- Column: lorange
- Samples: [0, 5001, 0, 2001, 3001]
- Column: hirange
- Samples: [5000, 50000, 2000, 3000, 4000]
- Column: royalty
- Samples: [10, 12, 10, 12, 14]
- Table: sales
- Column: stor_id
- Samples: [6380, 6380, 7066, 7066, 7067]
- Column: ord_num
- Samples: [6871, 722a, A2976, QA7442.3, D4482]
- Column: ord_date
- Samples: [1994-09-14 00:00:00.0, 1994-09-13 00:00:00.0, 1993-05-24 00:00:00.0, 1994-09-13 00:00:00.0, 1994-09-14 00:00:00.0]
- Column: qty
- Samples: [5, 3, 50, 75, 10]
- Column: payterms
- Samples: [Net 60, Net 60, Net 30, ON invoice, Net 60]
- Column: title_id
- Samples: [BU1032, PS2091, PC8888, PS2091, PS2091]
- Table: titleauthor
- Column: au_id
- Samples: [172-32-1176, 213-46-8915, 213-46-8915, 238-95-7766, 267-41-2394]
- Column: title_id
- Samples: [PS3333, BU1032, BU2075, PC1035, BU1111]
- Column: au_ord
- Samples: [1, 2, 1, 1, 2]
- Column: royaltyper
- Samples: [100, 40, 100, 100, 40]
| SELECT SUM(T1.qty) FROM sales AS T1 INNER JOIN stores AS T2 ON T1.stor_id = T2.stor_id INNER JOIN titles AS T3 ON T1.title_id = T3.title_id WHERE T2.state = 'Massachusetts' AND T3.type = 'business' |
|
Solve the following sql problem:
What is the average quantity of each order for the book "Life Without Fear"?
Schema:
SCHEMA:
- Table: authors
- Column: au_id
- Samples: [172-32-1176, 213-46-8915, 238-95-7766, 267-41-2394, 274-80-9391]
- Column: au_lname
- Samples: [White, Green, Carson, O'Leary, Straight]
- Column: au_fname
- Samples: [Johnson, Marjorie, Cheryl, Michael, Dean]
- Column: phone
- Samples: [408 496-7223, 415 986-7020, 415 548-7723, 408 286-2428, 415 834-2919]
- Column: address
- Samples: [10932 Bigge Rd., 309 63rd St. #411, 589 Darwin Ln., 22 Cleveland Av. #14, 5420 College Av.]
- Column: city
- Samples: [Menlo Park, Oakland, Berkeley, San Jose, Oakland]
- Column: state
- Samples: [CA, CA, CA, CA, CA]
- Column: zip
- Samples: [94025, 94618, 94705, 95128, 94609]
- Column: contract
- Samples: [0, 0, 0, 0, 0]
- Table: jobs
- Column: job_id
- Samples: [1, 2, 3, 4, 5]
- Column: job_desc
- Samples: [New Hire - Job not specified, Chief Executive Officer, Business Operations Manager, Chief Financial Officier, Publisher]
- Column: min_lvl
- Samples: [10, 200, 175, 175, 150]
- Column: max_lvl
- Samples: [10, 250, 225, 250, 250]
- Table: publishers
- Column: pub_id
- Samples: [0736, 0877, 1389, 1622, 1756]
- Column: pub_name
- Samples: [New Moon Books, Binnet & Hardley, Algodata Infosystems, Five Lakes Publishing, Ramona Publishers]
- Column: city
- Samples: [Boston, Washington, Berkeley, Chicago, Dallas]
- Column: state
- Samples: [MA, DC, CA, IL, TX]
- Column: country
- Samples: [USA, USA, USA, USA, USA]
- Table: employee
- Column: emp_id
- Samples: [A-C71970F, A-R89858F, AMD15433F, ARD36773F, CFH28514M]
- Column: fname
- Samples: [Aria, Annette, Ann, Anabela, Carlos]
- Column: minit
- Samples: [, , M, R, F]
- Column: lname
- Samples: [Cruz, Roulet, Devon, Domingues, Hernadez]
- Column: job_id
- Samples: [10, 6, 3, 8, 5]
- Column: job_lvl
- Samples: [87, 152, 200, 100, 211]
- Column: pub_id
- Samples: [1389, 9999, 9952, 0877, 9999]
- Column: hire_date
- Samples: [1991-10-26 00:00:00.0, 1990-02-21 00:00:00.0, 1991-07-16 00:00:00.0, 1993-01-27 00:00:00.0, 1989-04-21 00:00:00.0]
- Table: pub_info
- Column: pub_id
- Samples: [0877, 1389, 1622, 1756, 9901]
- Column: logo
- Samples: [0x4749463839618B002F00B30F00000000800000008000808000000080800080008080..., 0x474946383961C2001D00B30F00000000800000008000808000000080800080008080..., 0x474946383961F5003400B30F00000000800000008000808000000080800080008080..., 0x474946383961E3002500B30F00000000800000008000808000000080800080008080..., 0x4749463839615D002200B30F00000000800000008000808000000080800080008080... (truncated)]
- Column: pr_info
- Samples: [This is sample text data for Binnet & Hardley, publisher 0877 in the p..., This is sample text data for Algodata Infosystems, publisher 1389 in t..., This is sample text data for Five Lakes Publishing, publisher 1622 in ..., This is sample text data for Ramona Publishers, publisher 1756 in the ..., This is sample text data for GGG&G, publisher 9901 in the pubs databas... (truncated)]
- Table: stores
- Column: stor_id
- Samples: [6380, 7066, 7067, 7131, 7896]
- Column: stor_name
- Samples: [Eric the Read Books, Barnum's, News & Brews, Doc-U-Mat: Quality Laundry and Books, Fricative Bookshop]
- Column: stor_address
- Samples: [788 Catamaugus Ave., 567 Pasadena Ave., 577 First St., 24-A Avogadro Way, 89 Madison St.]
- Column: city
- Samples: [Seattle, Tustin, Los Gatos, Remulade, Fremont]
- Column: state
- Samples: [WA, CA, CA, WA, CA]
- Column: zip
- Samples: [98056, 92789, 96745, 98014, 90019]
- Table: discounts
- Column: discounttype
- Samples: [Initial Customer, Volume Discount, Customer Discount]
- Column: stor_id
- Samples: [None, None, 8042]
- Column: lowqty
- Samples: [None, 100, None]
- Column: highqty
- Samples: [None, 1000, None]
- Column: discount
- Samples: [10.5, 6.7, 5.0]
- Table: titles
- Column: title_id
- Samples: [BU1032, BU1111, BU2075, BU7832, MC2222]
- Column: title
- Samples: [The Busy Executive's Database Guide, Cooking with Computers: Surreptitious Balance Sheets, You Can Combat Computer Stress!, Straight Talk About Computers, Silicon Valley Gastronomic Treats]
- Column: type
- Samples: [business, business, business, business, mod_cook]
- Column: pub_id
- Samples: [1389, 1389, 0736, 1389, 0877]
- Column: price
- Samples: [19.99, 11.95, 2.99, 19.99, 19.99]
- Column: advance
- Samples: [5000.0, 5000.0, 10125.0, 5000.0, 0.0]
- Column: royalty
- Samples: [10, 10, 24, 10, 12]
- Column: ytd_sales
- Samples: [4095, 3876, 18722, 4095, 2032]
- Column: notes
- Samples: [An overview of available database systems with emphasis on common busi..., Helpful hints on how to use your electronic resources to the best adva..., The latest medical and psychological techniques for living with the el..., Annotated analysis of what computers can do for you: a no-hype guide f..., Favorite recipes for quick, easy, and elegant meals. (truncated)]
- Column: pubdate
- Samples: [1991-06-12 00:00:00.0, 1991-06-09 00:00:00.0, 1991-06-30 00:00:00.0, 1991-06-22 00:00:00.0, 1991-06-09 00:00:00.0]
- Table: roysched
- Column: title_id
- Samples: [BU1032, BU1032, PC1035, PC1035, PC1035]
- Column: lorange
- Samples: [0, 5001, 0, 2001, 3001]
- Column: hirange
- Samples: [5000, 50000, 2000, 3000, 4000]
- Column: royalty
- Samples: [10, 12, 10, 12, 14]
- Table: sales
- Column: stor_id
- Samples: [6380, 6380, 7066, 7066, 7067]
- Column: ord_num
- Samples: [6871, 722a, A2976, QA7442.3, D4482]
- Column: ord_date
- Samples: [1994-09-14 00:00:00.0, 1994-09-13 00:00:00.0, 1993-05-24 00:00:00.0, 1994-09-13 00:00:00.0, 1994-09-14 00:00:00.0]
- Column: qty
- Samples: [5, 3, 50, 75, 10]
- Column: payterms
- Samples: [Net 60, Net 60, Net 30, ON invoice, Net 60]
- Column: title_id
- Samples: [BU1032, PS2091, PC8888, PS2091, PS2091]
- Table: titleauthor
- Column: au_id
- Samples: [172-32-1176, 213-46-8915, 213-46-8915, 238-95-7766, 267-41-2394]
- Column: title_id
- Samples: [PS3333, BU1032, BU2075, PC1035, BU1111]
- Column: au_ord
- Samples: [1, 2, 1, 1, 2]
- Column: royaltyper
- Samples: [100, 40, 100, 100, 40]
| SELECT CAST(SUM(T2.qty) AS REAL) / COUNT(T1.title_id) FROM titles AS T1 INNER JOIN sales AS T2 ON T1.title_id = T2.title_id WHERE T1.title = 'Life Without Fear' |
|
Solve the following sql problem:
What is the average level employees working as Managing Editor are at? How many levels are there between the average level and the highest level?
Schema:
SCHEMA:
- Table: authors
- Column: au_id
- Samples: [172-32-1176, 213-46-8915, 238-95-7766, 267-41-2394, 274-80-9391]
- Column: au_lname
- Samples: [White, Green, Carson, O'Leary, Straight]
- Column: au_fname
- Samples: [Johnson, Marjorie, Cheryl, Michael, Dean]
- Column: phone
- Samples: [408 496-7223, 415 986-7020, 415 548-7723, 408 286-2428, 415 834-2919]
- Column: address
- Samples: [10932 Bigge Rd., 309 63rd St. #411, 589 Darwin Ln., 22 Cleveland Av. #14, 5420 College Av.]
- Column: city
- Samples: [Menlo Park, Oakland, Berkeley, San Jose, Oakland]
- Column: state
- Samples: [CA, CA, CA, CA, CA]
- Column: zip
- Samples: [94025, 94618, 94705, 95128, 94609]
- Column: contract
- Samples: [0, 0, 0, 0, 0]
- Table: jobs
- Column: job_id
- Samples: [1, 2, 3, 4, 5]
- Column: job_desc
- Samples: [New Hire - Job not specified, Chief Executive Officer, Business Operations Manager, Chief Financial Officier, Publisher]
- Column: min_lvl
- Samples: [10, 200, 175, 175, 150]
- Column: max_lvl
- Samples: [10, 250, 225, 250, 250]
- Table: publishers
- Column: pub_id
- Samples: [0736, 0877, 1389, 1622, 1756]
- Column: pub_name
- Samples: [New Moon Books, Binnet & Hardley, Algodata Infosystems, Five Lakes Publishing, Ramona Publishers]
- Column: city
- Samples: [Boston, Washington, Berkeley, Chicago, Dallas]
- Column: state
- Samples: [MA, DC, CA, IL, TX]
- Column: country
- Samples: [USA, USA, USA, USA, USA]
- Table: employee
- Column: emp_id
- Samples: [A-C71970F, A-R89858F, AMD15433F, ARD36773F, CFH28514M]
- Column: fname
- Samples: [Aria, Annette, Ann, Anabela, Carlos]
- Column: minit
- Samples: [, , M, R, F]
- Column: lname
- Samples: [Cruz, Roulet, Devon, Domingues, Hernadez]
- Column: job_id
- Samples: [10, 6, 3, 8, 5]
- Column: job_lvl
- Samples: [87, 152, 200, 100, 211]
- Column: pub_id
- Samples: [1389, 9999, 9952, 0877, 9999]
- Column: hire_date
- Samples: [1991-10-26 00:00:00.0, 1990-02-21 00:00:00.0, 1991-07-16 00:00:00.0, 1993-01-27 00:00:00.0, 1989-04-21 00:00:00.0]
- Table: pub_info
- Column: pub_id
- Samples: [0877, 1389, 1622, 1756, 9901]
- Column: logo
- Samples: [0x4749463839618B002F00B30F00000000800000008000808000000080800080008080..., 0x474946383961C2001D00B30F00000000800000008000808000000080800080008080..., 0x474946383961F5003400B30F00000000800000008000808000000080800080008080..., 0x474946383961E3002500B30F00000000800000008000808000000080800080008080..., 0x4749463839615D002200B30F00000000800000008000808000000080800080008080... (truncated)]
- Column: pr_info
- Samples: [This is sample text data for Binnet & Hardley, publisher 0877 in the p..., This is sample text data for Algodata Infosystems, publisher 1389 in t..., This is sample text data for Five Lakes Publishing, publisher 1622 in ..., This is sample text data for Ramona Publishers, publisher 1756 in the ..., This is sample text data for GGG&G, publisher 9901 in the pubs databas... (truncated)]
- Table: stores
- Column: stor_id
- Samples: [6380, 7066, 7067, 7131, 7896]
- Column: stor_name
- Samples: [Eric the Read Books, Barnum's, News & Brews, Doc-U-Mat: Quality Laundry and Books, Fricative Bookshop]
- Column: stor_address
- Samples: [788 Catamaugus Ave., 567 Pasadena Ave., 577 First St., 24-A Avogadro Way, 89 Madison St.]
- Column: city
- Samples: [Seattle, Tustin, Los Gatos, Remulade, Fremont]
- Column: state
- Samples: [WA, CA, CA, WA, CA]
- Column: zip
- Samples: [98056, 92789, 96745, 98014, 90019]
- Table: discounts
- Column: discounttype
- Samples: [Initial Customer, Volume Discount, Customer Discount]
- Column: stor_id
- Samples: [None, None, 8042]
- Column: lowqty
- Samples: [None, 100, None]
- Column: highqty
- Samples: [None, 1000, None]
- Column: discount
- Samples: [10.5, 6.7, 5.0]
- Table: titles
- Column: title_id
- Samples: [BU1032, BU1111, BU2075, BU7832, MC2222]
- Column: title
- Samples: [The Busy Executive's Database Guide, Cooking with Computers: Surreptitious Balance Sheets, You Can Combat Computer Stress!, Straight Talk About Computers, Silicon Valley Gastronomic Treats]
- Column: type
- Samples: [business, business, business, business, mod_cook]
- Column: pub_id
- Samples: [1389, 1389, 0736, 1389, 0877]
- Column: price
- Samples: [19.99, 11.95, 2.99, 19.99, 19.99]
- Column: advance
- Samples: [5000.0, 5000.0, 10125.0, 5000.0, 0.0]
- Column: royalty
- Samples: [10, 10, 24, 10, 12]
- Column: ytd_sales
- Samples: [4095, 3876, 18722, 4095, 2032]
- Column: notes
- Samples: [An overview of available database systems with emphasis on common busi..., Helpful hints on how to use your electronic resources to the best adva..., The latest medical and psychological techniques for living with the el..., Annotated analysis of what computers can do for you: a no-hype guide f..., Favorite recipes for quick, easy, and elegant meals. (truncated)]
- Column: pubdate
- Samples: [1991-06-12 00:00:00.0, 1991-06-09 00:00:00.0, 1991-06-30 00:00:00.0, 1991-06-22 00:00:00.0, 1991-06-09 00:00:00.0]
- Table: roysched
- Column: title_id
- Samples: [BU1032, BU1032, PC1035, PC1035, PC1035]
- Column: lorange
- Samples: [0, 5001, 0, 2001, 3001]
- Column: hirange
- Samples: [5000, 50000, 2000, 3000, 4000]
- Column: royalty
- Samples: [10, 12, 10, 12, 14]
- Table: sales
- Column: stor_id
- Samples: [6380, 6380, 7066, 7066, 7067]
- Column: ord_num
- Samples: [6871, 722a, A2976, QA7442.3, D4482]
- Column: ord_date
- Samples: [1994-09-14 00:00:00.0, 1994-09-13 00:00:00.0, 1993-05-24 00:00:00.0, 1994-09-13 00:00:00.0, 1994-09-14 00:00:00.0]
- Column: qty
- Samples: [5, 3, 50, 75, 10]
- Column: payterms
- Samples: [Net 60, Net 60, Net 30, ON invoice, Net 60]
- Column: title_id
- Samples: [BU1032, PS2091, PC8888, PS2091, PS2091]
- Table: titleauthor
- Column: au_id
- Samples: [172-32-1176, 213-46-8915, 213-46-8915, 238-95-7766, 267-41-2394]
- Column: title_id
- Samples: [PS3333, BU1032, BU2075, PC1035, BU1111]
- Column: au_ord
- Samples: [1, 2, 1, 1, 2]
- Column: royaltyper
- Samples: [100, 40, 100, 100, 40]
| SELECT AVG(T2.job_lvl), T1.max_lvl - AVG(T2.job_lvl) FROM jobs AS T1 INNER JOIN employee AS T2 ON T1.job_id = T2.job_id WHERE T1.job_desc = 'Managing Editor' GROUP BY T2.job_id, T1.max_lvl |
|
Solve the following sql problem:
Which one is the cheapest business book?
Schema:
SCHEMA:
- Table: authors
- Column: au_id
- Samples: [172-32-1176, 213-46-8915, 238-95-7766, 267-41-2394, 274-80-9391]
- Column: au_lname
- Samples: [White, Green, Carson, O'Leary, Straight]
- Column: au_fname
- Samples: [Johnson, Marjorie, Cheryl, Michael, Dean]
- Column: phone
- Samples: [408 496-7223, 415 986-7020, 415 548-7723, 408 286-2428, 415 834-2919]
- Column: address
- Samples: [10932 Bigge Rd., 309 63rd St. #411, 589 Darwin Ln., 22 Cleveland Av. #14, 5420 College Av.]
- Column: city
- Samples: [Menlo Park, Oakland, Berkeley, San Jose, Oakland]
- Column: state
- Samples: [CA, CA, CA, CA, CA]
- Column: zip
- Samples: [94025, 94618, 94705, 95128, 94609]
- Column: contract
- Samples: [0, 0, 0, 0, 0]
- Table: jobs
- Column: job_id
- Samples: [1, 2, 3, 4, 5]
- Column: job_desc
- Samples: [New Hire - Job not specified, Chief Executive Officer, Business Operations Manager, Chief Financial Officier, Publisher]
- Column: min_lvl
- Samples: [10, 200, 175, 175, 150]
- Column: max_lvl
- Samples: [10, 250, 225, 250, 250]
- Table: publishers
- Column: pub_id
- Samples: [0736, 0877, 1389, 1622, 1756]
- Column: pub_name
- Samples: [New Moon Books, Binnet & Hardley, Algodata Infosystems, Five Lakes Publishing, Ramona Publishers]
- Column: city
- Samples: [Boston, Washington, Berkeley, Chicago, Dallas]
- Column: state
- Samples: [MA, DC, CA, IL, TX]
- Column: country
- Samples: [USA, USA, USA, USA, USA]
- Table: employee
- Column: emp_id
- Samples: [A-C71970F, A-R89858F, AMD15433F, ARD36773F, CFH28514M]
- Column: fname
- Samples: [Aria, Annette, Ann, Anabela, Carlos]
- Column: minit
- Samples: [, , M, R, F]
- Column: lname
- Samples: [Cruz, Roulet, Devon, Domingues, Hernadez]
- Column: job_id
- Samples: [10, 6, 3, 8, 5]
- Column: job_lvl
- Samples: [87, 152, 200, 100, 211]
- Column: pub_id
- Samples: [1389, 9999, 9952, 0877, 9999]
- Column: hire_date
- Samples: [1991-10-26 00:00:00.0, 1990-02-21 00:00:00.0, 1991-07-16 00:00:00.0, 1993-01-27 00:00:00.0, 1989-04-21 00:00:00.0]
- Table: pub_info
- Column: pub_id
- Samples: [0877, 1389, 1622, 1756, 9901]
- Column: logo
- Samples: [0x4749463839618B002F00B30F00000000800000008000808000000080800080008080..., 0x474946383961C2001D00B30F00000000800000008000808000000080800080008080..., 0x474946383961F5003400B30F00000000800000008000808000000080800080008080..., 0x474946383961E3002500B30F00000000800000008000808000000080800080008080..., 0x4749463839615D002200B30F00000000800000008000808000000080800080008080... (truncated)]
- Column: pr_info
- Samples: [This is sample text data for Binnet & Hardley, publisher 0877 in the p..., This is sample text data for Algodata Infosystems, publisher 1389 in t..., This is sample text data for Five Lakes Publishing, publisher 1622 in ..., This is sample text data for Ramona Publishers, publisher 1756 in the ..., This is sample text data for GGG&G, publisher 9901 in the pubs databas... (truncated)]
- Table: stores
- Column: stor_id
- Samples: [6380, 7066, 7067, 7131, 7896]
- Column: stor_name
- Samples: [Eric the Read Books, Barnum's, News & Brews, Doc-U-Mat: Quality Laundry and Books, Fricative Bookshop]
- Column: stor_address
- Samples: [788 Catamaugus Ave., 567 Pasadena Ave., 577 First St., 24-A Avogadro Way, 89 Madison St.]
- Column: city
- Samples: [Seattle, Tustin, Los Gatos, Remulade, Fremont]
- Column: state
- Samples: [WA, CA, CA, WA, CA]
- Column: zip
- Samples: [98056, 92789, 96745, 98014, 90019]
- Table: discounts
- Column: discounttype
- Samples: [Initial Customer, Volume Discount, Customer Discount]
- Column: stor_id
- Samples: [None, None, 8042]
- Column: lowqty
- Samples: [None, 100, None]
- Column: highqty
- Samples: [None, 1000, None]
- Column: discount
- Samples: [10.5, 6.7, 5.0]
- Table: titles
- Column: title_id
- Samples: [BU1032, BU1111, BU2075, BU7832, MC2222]
- Column: title
- Samples: [The Busy Executive's Database Guide, Cooking with Computers: Surreptitious Balance Sheets, You Can Combat Computer Stress!, Straight Talk About Computers, Silicon Valley Gastronomic Treats]
- Column: type
- Samples: [business, business, business, business, mod_cook]
- Column: pub_id
- Samples: [1389, 1389, 0736, 1389, 0877]
- Column: price
- Samples: [19.99, 11.95, 2.99, 19.99, 19.99]
- Column: advance
- Samples: [5000.0, 5000.0, 10125.0, 5000.0, 0.0]
- Column: royalty
- Samples: [10, 10, 24, 10, 12]
- Column: ytd_sales
- Samples: [4095, 3876, 18722, 4095, 2032]
- Column: notes
- Samples: [An overview of available database systems with emphasis on common busi..., Helpful hints on how to use your electronic resources to the best adva..., The latest medical and psychological techniques for living with the el..., Annotated analysis of what computers can do for you: a no-hype guide f..., Favorite recipes for quick, easy, and elegant meals. (truncated)]
- Column: pubdate
- Samples: [1991-06-12 00:00:00.0, 1991-06-09 00:00:00.0, 1991-06-30 00:00:00.0, 1991-06-22 00:00:00.0, 1991-06-09 00:00:00.0]
- Table: roysched
- Column: title_id
- Samples: [BU1032, BU1032, PC1035, PC1035, PC1035]
- Column: lorange
- Samples: [0, 5001, 0, 2001, 3001]
- Column: hirange
- Samples: [5000, 50000, 2000, 3000, 4000]
- Column: royalty
- Samples: [10, 12, 10, 12, 14]
- Table: sales
- Column: stor_id
- Samples: [6380, 6380, 7066, 7066, 7067]
- Column: ord_num
- Samples: [6871, 722a, A2976, QA7442.3, D4482]
- Column: ord_date
- Samples: [1994-09-14 00:00:00.0, 1994-09-13 00:00:00.0, 1993-05-24 00:00:00.0, 1994-09-13 00:00:00.0, 1994-09-14 00:00:00.0]
- Column: qty
- Samples: [5, 3, 50, 75, 10]
- Column: payterms
- Samples: [Net 60, Net 60, Net 30, ON invoice, Net 60]
- Column: title_id
- Samples: [BU1032, PS2091, PC8888, PS2091, PS2091]
- Table: titleauthor
- Column: au_id
- Samples: [172-32-1176, 213-46-8915, 213-46-8915, 238-95-7766, 267-41-2394]
- Column: title_id
- Samples: [PS3333, BU1032, BU2075, PC1035, BU1111]
- Column: au_ord
- Samples: [1, 2, 1, 1, 2]
- Column: royaltyper
- Samples: [100, 40, 100, 100, 40]
| SELECT title FROM titles WHERE type = 'business' ORDER BY price LIMIT 1 |
|
Solve the following sql problem:
Which type of book had the most pre-paid amount?
Schema:
SCHEMA:
- Table: authors
- Column: au_id
- Samples: [172-32-1176, 213-46-8915, 238-95-7766, 267-41-2394, 274-80-9391]
- Column: au_lname
- Samples: [White, Green, Carson, O'Leary, Straight]
- Column: au_fname
- Samples: [Johnson, Marjorie, Cheryl, Michael, Dean]
- Column: phone
- Samples: [408 496-7223, 415 986-7020, 415 548-7723, 408 286-2428, 415 834-2919]
- Column: address
- Samples: [10932 Bigge Rd., 309 63rd St. #411, 589 Darwin Ln., 22 Cleveland Av. #14, 5420 College Av.]
- Column: city
- Samples: [Menlo Park, Oakland, Berkeley, San Jose, Oakland]
- Column: state
- Samples: [CA, CA, CA, CA, CA]
- Column: zip
- Samples: [94025, 94618, 94705, 95128, 94609]
- Column: contract
- Samples: [0, 0, 0, 0, 0]
- Table: jobs
- Column: job_id
- Samples: [1, 2, 3, 4, 5]
- Column: job_desc
- Samples: [New Hire - Job not specified, Chief Executive Officer, Business Operations Manager, Chief Financial Officier, Publisher]
- Column: min_lvl
- Samples: [10, 200, 175, 175, 150]
- Column: max_lvl
- Samples: [10, 250, 225, 250, 250]
- Table: publishers
- Column: pub_id
- Samples: [0736, 0877, 1389, 1622, 1756]
- Column: pub_name
- Samples: [New Moon Books, Binnet & Hardley, Algodata Infosystems, Five Lakes Publishing, Ramona Publishers]
- Column: city
- Samples: [Boston, Washington, Berkeley, Chicago, Dallas]
- Column: state
- Samples: [MA, DC, CA, IL, TX]
- Column: country
- Samples: [USA, USA, USA, USA, USA]
- Table: employee
- Column: emp_id
- Samples: [A-C71970F, A-R89858F, AMD15433F, ARD36773F, CFH28514M]
- Column: fname
- Samples: [Aria, Annette, Ann, Anabela, Carlos]
- Column: minit
- Samples: [, , M, R, F]
- Column: lname
- Samples: [Cruz, Roulet, Devon, Domingues, Hernadez]
- Column: job_id
- Samples: [10, 6, 3, 8, 5]
- Column: job_lvl
- Samples: [87, 152, 200, 100, 211]
- Column: pub_id
- Samples: [1389, 9999, 9952, 0877, 9999]
- Column: hire_date
- Samples: [1991-10-26 00:00:00.0, 1990-02-21 00:00:00.0, 1991-07-16 00:00:00.0, 1993-01-27 00:00:00.0, 1989-04-21 00:00:00.0]
- Table: pub_info
- Column: pub_id
- Samples: [0877, 1389, 1622, 1756, 9901]
- Column: logo
- Samples: [0x4749463839618B002F00B30F00000000800000008000808000000080800080008080..., 0x474946383961C2001D00B30F00000000800000008000808000000080800080008080..., 0x474946383961F5003400B30F00000000800000008000808000000080800080008080..., 0x474946383961E3002500B30F00000000800000008000808000000080800080008080..., 0x4749463839615D002200B30F00000000800000008000808000000080800080008080... (truncated)]
- Column: pr_info
- Samples: [This is sample text data for Binnet & Hardley, publisher 0877 in the p..., This is sample text data for Algodata Infosystems, publisher 1389 in t..., This is sample text data for Five Lakes Publishing, publisher 1622 in ..., This is sample text data for Ramona Publishers, publisher 1756 in the ..., This is sample text data for GGG&G, publisher 9901 in the pubs databas... (truncated)]
- Table: stores
- Column: stor_id
- Samples: [6380, 7066, 7067, 7131, 7896]
- Column: stor_name
- Samples: [Eric the Read Books, Barnum's, News & Brews, Doc-U-Mat: Quality Laundry and Books, Fricative Bookshop]
- Column: stor_address
- Samples: [788 Catamaugus Ave., 567 Pasadena Ave., 577 First St., 24-A Avogadro Way, 89 Madison St.]
- Column: city
- Samples: [Seattle, Tustin, Los Gatos, Remulade, Fremont]
- Column: state
- Samples: [WA, CA, CA, WA, CA]
- Column: zip
- Samples: [98056, 92789, 96745, 98014, 90019]
- Table: discounts
- Column: discounttype
- Samples: [Initial Customer, Volume Discount, Customer Discount]
- Column: stor_id
- Samples: [None, None, 8042]
- Column: lowqty
- Samples: [None, 100, None]
- Column: highqty
- Samples: [None, 1000, None]
- Column: discount
- Samples: [10.5, 6.7, 5.0]
- Table: titles
- Column: title_id
- Samples: [BU1032, BU1111, BU2075, BU7832, MC2222]
- Column: title
- Samples: [The Busy Executive's Database Guide, Cooking with Computers: Surreptitious Balance Sheets, You Can Combat Computer Stress!, Straight Talk About Computers, Silicon Valley Gastronomic Treats]
- Column: type
- Samples: [business, business, business, business, mod_cook]
- Column: pub_id
- Samples: [1389, 1389, 0736, 1389, 0877]
- Column: price
- Samples: [19.99, 11.95, 2.99, 19.99, 19.99]
- Column: advance
- Samples: [5000.0, 5000.0, 10125.0, 5000.0, 0.0]
- Column: royalty
- Samples: [10, 10, 24, 10, 12]
- Column: ytd_sales
- Samples: [4095, 3876, 18722, 4095, 2032]
- Column: notes
- Samples: [An overview of available database systems with emphasis on common busi..., Helpful hints on how to use your electronic resources to the best adva..., The latest medical and psychological techniques for living with the el..., Annotated analysis of what computers can do for you: a no-hype guide f..., Favorite recipes for quick, easy, and elegant meals. (truncated)]
- Column: pubdate
- Samples: [1991-06-12 00:00:00.0, 1991-06-09 00:00:00.0, 1991-06-30 00:00:00.0, 1991-06-22 00:00:00.0, 1991-06-09 00:00:00.0]
- Table: roysched
- Column: title_id
- Samples: [BU1032, BU1032, PC1035, PC1035, PC1035]
- Column: lorange
- Samples: [0, 5001, 0, 2001, 3001]
- Column: hirange
- Samples: [5000, 50000, 2000, 3000, 4000]
- Column: royalty
- Samples: [10, 12, 10, 12, 14]
- Table: sales
- Column: stor_id
- Samples: [6380, 6380, 7066, 7066, 7067]
- Column: ord_num
- Samples: [6871, 722a, A2976, QA7442.3, D4482]
- Column: ord_date
- Samples: [1994-09-14 00:00:00.0, 1994-09-13 00:00:00.0, 1993-05-24 00:00:00.0, 1994-09-13 00:00:00.0, 1994-09-14 00:00:00.0]
- Column: qty
- Samples: [5, 3, 50, 75, 10]
- Column: payterms
- Samples: [Net 60, Net 60, Net 30, ON invoice, Net 60]
- Column: title_id
- Samples: [BU1032, PS2091, PC8888, PS2091, PS2091]
- Table: titleauthor
- Column: au_id
- Samples: [172-32-1176, 213-46-8915, 213-46-8915, 238-95-7766, 267-41-2394]
- Column: title_id
- Samples: [PS3333, BU1032, BU2075, PC1035, BU1111]
- Column: au_ord
- Samples: [1, 2, 1, 1, 2]
- Column: royaltyper
- Samples: [100, 40, 100, 100, 40]
| SELECT type FROM titles ORDER BY advance DESC LIMIT 1 |
|
Solve the following sql problem:
What's the royalty for the bestseller book?
Schema:
SCHEMA:
- Table: authors
- Column: au_id
- Samples: [172-32-1176, 213-46-8915, 238-95-7766, 267-41-2394, 274-80-9391]
- Column: au_lname
- Samples: [White, Green, Carson, O'Leary, Straight]
- Column: au_fname
- Samples: [Johnson, Marjorie, Cheryl, Michael, Dean]
- Column: phone
- Samples: [408 496-7223, 415 986-7020, 415 548-7723, 408 286-2428, 415 834-2919]
- Column: address
- Samples: [10932 Bigge Rd., 309 63rd St. #411, 589 Darwin Ln., 22 Cleveland Av. #14, 5420 College Av.]
- Column: city
- Samples: [Menlo Park, Oakland, Berkeley, San Jose, Oakland]
- Column: state
- Samples: [CA, CA, CA, CA, CA]
- Column: zip
- Samples: [94025, 94618, 94705, 95128, 94609]
- Column: contract
- Samples: [0, 0, 0, 0, 0]
- Table: jobs
- Column: job_id
- Samples: [1, 2, 3, 4, 5]
- Column: job_desc
- Samples: [New Hire - Job not specified, Chief Executive Officer, Business Operations Manager, Chief Financial Officier, Publisher]
- Column: min_lvl
- Samples: [10, 200, 175, 175, 150]
- Column: max_lvl
- Samples: [10, 250, 225, 250, 250]
- Table: publishers
- Column: pub_id
- Samples: [0736, 0877, 1389, 1622, 1756]
- Column: pub_name
- Samples: [New Moon Books, Binnet & Hardley, Algodata Infosystems, Five Lakes Publishing, Ramona Publishers]
- Column: city
- Samples: [Boston, Washington, Berkeley, Chicago, Dallas]
- Column: state
- Samples: [MA, DC, CA, IL, TX]
- Column: country
- Samples: [USA, USA, USA, USA, USA]
- Table: employee
- Column: emp_id
- Samples: [A-C71970F, A-R89858F, AMD15433F, ARD36773F, CFH28514M]
- Column: fname
- Samples: [Aria, Annette, Ann, Anabela, Carlos]
- Column: minit
- Samples: [, , M, R, F]
- Column: lname
- Samples: [Cruz, Roulet, Devon, Domingues, Hernadez]
- Column: job_id
- Samples: [10, 6, 3, 8, 5]
- Column: job_lvl
- Samples: [87, 152, 200, 100, 211]
- Column: pub_id
- Samples: [1389, 9999, 9952, 0877, 9999]
- Column: hire_date
- Samples: [1991-10-26 00:00:00.0, 1990-02-21 00:00:00.0, 1991-07-16 00:00:00.0, 1993-01-27 00:00:00.0, 1989-04-21 00:00:00.0]
- Table: pub_info
- Column: pub_id
- Samples: [0877, 1389, 1622, 1756, 9901]
- Column: logo
- Samples: [0x4749463839618B002F00B30F00000000800000008000808000000080800080008080..., 0x474946383961C2001D00B30F00000000800000008000808000000080800080008080..., 0x474946383961F5003400B30F00000000800000008000808000000080800080008080..., 0x474946383961E3002500B30F00000000800000008000808000000080800080008080..., 0x4749463839615D002200B30F00000000800000008000808000000080800080008080... (truncated)]
- Column: pr_info
- Samples: [This is sample text data for Binnet & Hardley, publisher 0877 in the p..., This is sample text data for Algodata Infosystems, publisher 1389 in t..., This is sample text data for Five Lakes Publishing, publisher 1622 in ..., This is sample text data for Ramona Publishers, publisher 1756 in the ..., This is sample text data for GGG&G, publisher 9901 in the pubs databas... (truncated)]
- Table: stores
- Column: stor_id
- Samples: [6380, 7066, 7067, 7131, 7896]
- Column: stor_name
- Samples: [Eric the Read Books, Barnum's, News & Brews, Doc-U-Mat: Quality Laundry and Books, Fricative Bookshop]
- Column: stor_address
- Samples: [788 Catamaugus Ave., 567 Pasadena Ave., 577 First St., 24-A Avogadro Way, 89 Madison St.]
- Column: city
- Samples: [Seattle, Tustin, Los Gatos, Remulade, Fremont]
- Column: state
- Samples: [WA, CA, CA, WA, CA]
- Column: zip
- Samples: [98056, 92789, 96745, 98014, 90019]
- Table: discounts
- Column: discounttype
- Samples: [Initial Customer, Volume Discount, Customer Discount]
- Column: stor_id
- Samples: [None, None, 8042]
- Column: lowqty
- Samples: [None, 100, None]
- Column: highqty
- Samples: [None, 1000, None]
- Column: discount
- Samples: [10.5, 6.7, 5.0]
- Table: titles
- Column: title_id
- Samples: [BU1032, BU1111, BU2075, BU7832, MC2222]
- Column: title
- Samples: [The Busy Executive's Database Guide, Cooking with Computers: Surreptitious Balance Sheets, You Can Combat Computer Stress!, Straight Talk About Computers, Silicon Valley Gastronomic Treats]
- Column: type
- Samples: [business, business, business, business, mod_cook]
- Column: pub_id
- Samples: [1389, 1389, 0736, 1389, 0877]
- Column: price
- Samples: [19.99, 11.95, 2.99, 19.99, 19.99]
- Column: advance
- Samples: [5000.0, 5000.0, 10125.0, 5000.0, 0.0]
- Column: royalty
- Samples: [10, 10, 24, 10, 12]
- Column: ytd_sales
- Samples: [4095, 3876, 18722, 4095, 2032]
- Column: notes
- Samples: [An overview of available database systems with emphasis on common busi..., Helpful hints on how to use your electronic resources to the best adva..., The latest medical and psychological techniques for living with the el..., Annotated analysis of what computers can do for you: a no-hype guide f..., Favorite recipes for quick, easy, and elegant meals. (truncated)]
- Column: pubdate
- Samples: [1991-06-12 00:00:00.0, 1991-06-09 00:00:00.0, 1991-06-30 00:00:00.0, 1991-06-22 00:00:00.0, 1991-06-09 00:00:00.0]
- Table: roysched
- Column: title_id
- Samples: [BU1032, BU1032, PC1035, PC1035, PC1035]
- Column: lorange
- Samples: [0, 5001, 0, 2001, 3001]
- Column: hirange
- Samples: [5000, 50000, 2000, 3000, 4000]
- Column: royalty
- Samples: [10, 12, 10, 12, 14]
- Table: sales
- Column: stor_id
- Samples: [6380, 6380, 7066, 7066, 7067]
- Column: ord_num
- Samples: [6871, 722a, A2976, QA7442.3, D4482]
- Column: ord_date
- Samples: [1994-09-14 00:00:00.0, 1994-09-13 00:00:00.0, 1993-05-24 00:00:00.0, 1994-09-13 00:00:00.0, 1994-09-14 00:00:00.0]
- Column: qty
- Samples: [5, 3, 50, 75, 10]
- Column: payterms
- Samples: [Net 60, Net 60, Net 30, ON invoice, Net 60]
- Column: title_id
- Samples: [BU1032, PS2091, PC8888, PS2091, PS2091]
- Table: titleauthor
- Column: au_id
- Samples: [172-32-1176, 213-46-8915, 213-46-8915, 238-95-7766, 267-41-2394]
- Column: title_id
- Samples: [PS3333, BU1032, BU2075, PC1035, BU1111]
- Column: au_ord
- Samples: [1, 2, 1, 1, 2]
- Column: royaltyper
- Samples: [100, 40, 100, 100, 40]
| SELECT royalty FROM titles ORDER BY ytd_sales DESC LIMIT 1 |
|
Solve the following sql problem:
Which job level is O'Rourke at?
Schema:
SCHEMA:
- Table: authors
- Column: au_id
- Samples: [172-32-1176, 213-46-8915, 238-95-7766, 267-41-2394, 274-80-9391]
- Column: au_lname
- Samples: [White, Green, Carson, O'Leary, Straight]
- Column: au_fname
- Samples: [Johnson, Marjorie, Cheryl, Michael, Dean]
- Column: phone
- Samples: [408 496-7223, 415 986-7020, 415 548-7723, 408 286-2428, 415 834-2919]
- Column: address
- Samples: [10932 Bigge Rd., 309 63rd St. #411, 589 Darwin Ln., 22 Cleveland Av. #14, 5420 College Av.]
- Column: city
- Samples: [Menlo Park, Oakland, Berkeley, San Jose, Oakland]
- Column: state
- Samples: [CA, CA, CA, CA, CA]
- Column: zip
- Samples: [94025, 94618, 94705, 95128, 94609]
- Column: contract
- Samples: [0, 0, 0, 0, 0]
- Table: jobs
- Column: job_id
- Samples: [1, 2, 3, 4, 5]
- Column: job_desc
- Samples: [New Hire - Job not specified, Chief Executive Officer, Business Operations Manager, Chief Financial Officier, Publisher]
- Column: min_lvl
- Samples: [10, 200, 175, 175, 150]
- Column: max_lvl
- Samples: [10, 250, 225, 250, 250]
- Table: publishers
- Column: pub_id
- Samples: [0736, 0877, 1389, 1622, 1756]
- Column: pub_name
- Samples: [New Moon Books, Binnet & Hardley, Algodata Infosystems, Five Lakes Publishing, Ramona Publishers]
- Column: city
- Samples: [Boston, Washington, Berkeley, Chicago, Dallas]
- Column: state
- Samples: [MA, DC, CA, IL, TX]
- Column: country
- Samples: [USA, USA, USA, USA, USA]
- Table: employee
- Column: emp_id
- Samples: [A-C71970F, A-R89858F, AMD15433F, ARD36773F, CFH28514M]
- Column: fname
- Samples: [Aria, Annette, Ann, Anabela, Carlos]
- Column: minit
- Samples: [, , M, R, F]
- Column: lname
- Samples: [Cruz, Roulet, Devon, Domingues, Hernadez]
- Column: job_id
- Samples: [10, 6, 3, 8, 5]
- Column: job_lvl
- Samples: [87, 152, 200, 100, 211]
- Column: pub_id
- Samples: [1389, 9999, 9952, 0877, 9999]
- Column: hire_date
- Samples: [1991-10-26 00:00:00.0, 1990-02-21 00:00:00.0, 1991-07-16 00:00:00.0, 1993-01-27 00:00:00.0, 1989-04-21 00:00:00.0]
- Table: pub_info
- Column: pub_id
- Samples: [0877, 1389, 1622, 1756, 9901]
- Column: logo
- Samples: [0x4749463839618B002F00B30F00000000800000008000808000000080800080008080..., 0x474946383961C2001D00B30F00000000800000008000808000000080800080008080..., 0x474946383961F5003400B30F00000000800000008000808000000080800080008080..., 0x474946383961E3002500B30F00000000800000008000808000000080800080008080..., 0x4749463839615D002200B30F00000000800000008000808000000080800080008080... (truncated)]
- Column: pr_info
- Samples: [This is sample text data for Binnet & Hardley, publisher 0877 in the p..., This is sample text data for Algodata Infosystems, publisher 1389 in t..., This is sample text data for Five Lakes Publishing, publisher 1622 in ..., This is sample text data for Ramona Publishers, publisher 1756 in the ..., This is sample text data for GGG&G, publisher 9901 in the pubs databas... (truncated)]
- Table: stores
- Column: stor_id
- Samples: [6380, 7066, 7067, 7131, 7896]
- Column: stor_name
- Samples: [Eric the Read Books, Barnum's, News & Brews, Doc-U-Mat: Quality Laundry and Books, Fricative Bookshop]
- Column: stor_address
- Samples: [788 Catamaugus Ave., 567 Pasadena Ave., 577 First St., 24-A Avogadro Way, 89 Madison St.]
- Column: city
- Samples: [Seattle, Tustin, Los Gatos, Remulade, Fremont]
- Column: state
- Samples: [WA, CA, CA, WA, CA]
- Column: zip
- Samples: [98056, 92789, 96745, 98014, 90019]
- Table: discounts
- Column: discounttype
- Samples: [Initial Customer, Volume Discount, Customer Discount]
- Column: stor_id
- Samples: [None, None, 8042]
- Column: lowqty
- Samples: [None, 100, None]
- Column: highqty
- Samples: [None, 1000, None]
- Column: discount
- Samples: [10.5, 6.7, 5.0]
- Table: titles
- Column: title_id
- Samples: [BU1032, BU1111, BU2075, BU7832, MC2222]
- Column: title
- Samples: [The Busy Executive's Database Guide, Cooking with Computers: Surreptitious Balance Sheets, You Can Combat Computer Stress!, Straight Talk About Computers, Silicon Valley Gastronomic Treats]
- Column: type
- Samples: [business, business, business, business, mod_cook]
- Column: pub_id
- Samples: [1389, 1389, 0736, 1389, 0877]
- Column: price
- Samples: [19.99, 11.95, 2.99, 19.99, 19.99]
- Column: advance
- Samples: [5000.0, 5000.0, 10125.0, 5000.0, 0.0]
- Column: royalty
- Samples: [10, 10, 24, 10, 12]
- Column: ytd_sales
- Samples: [4095, 3876, 18722, 4095, 2032]
- Column: notes
- Samples: [An overview of available database systems with emphasis on common busi..., Helpful hints on how to use your electronic resources to the best adva..., The latest medical and psychological techniques for living with the el..., Annotated analysis of what computers can do for you: a no-hype guide f..., Favorite recipes for quick, easy, and elegant meals. (truncated)]
- Column: pubdate
- Samples: [1991-06-12 00:00:00.0, 1991-06-09 00:00:00.0, 1991-06-30 00:00:00.0, 1991-06-22 00:00:00.0, 1991-06-09 00:00:00.0]
- Table: roysched
- Column: title_id
- Samples: [BU1032, BU1032, PC1035, PC1035, PC1035]
- Column: lorange
- Samples: [0, 5001, 0, 2001, 3001]
- Column: hirange
- Samples: [5000, 50000, 2000, 3000, 4000]
- Column: royalty
- Samples: [10, 12, 10, 12, 14]
- Table: sales
- Column: stor_id
- Samples: [6380, 6380, 7066, 7066, 7067]
- Column: ord_num
- Samples: [6871, 722a, A2976, QA7442.3, D4482]
- Column: ord_date
- Samples: [1994-09-14 00:00:00.0, 1994-09-13 00:00:00.0, 1993-05-24 00:00:00.0, 1994-09-13 00:00:00.0, 1994-09-14 00:00:00.0]
- Column: qty
- Samples: [5, 3, 50, 75, 10]
- Column: payterms
- Samples: [Net 60, Net 60, Net 30, ON invoice, Net 60]
- Column: title_id
- Samples: [BU1032, PS2091, PC8888, PS2091, PS2091]
- Table: titleauthor
- Column: au_id
- Samples: [172-32-1176, 213-46-8915, 213-46-8915, 238-95-7766, 267-41-2394]
- Column: title_id
- Samples: [PS3333, BU1032, BU2075, PC1035, BU1111]
- Column: au_ord
- Samples: [1, 2, 1, 1, 2]
- Column: royaltyper
- Samples: [100, 40, 100, 100, 40]
| SELECT job_lvl FROM employee WHERE lname = 'O''Rourke' |
|
Solve the following sql problem:
Show me the employ id of the highest employee who doesn't have a middle name.
Schema:
SCHEMA:
- Table: authors
- Column: au_id
- Samples: [172-32-1176, 213-46-8915, 238-95-7766, 267-41-2394, 274-80-9391]
- Column: au_lname
- Samples: [White, Green, Carson, O'Leary, Straight]
- Column: au_fname
- Samples: [Johnson, Marjorie, Cheryl, Michael, Dean]
- Column: phone
- Samples: [408 496-7223, 415 986-7020, 415 548-7723, 408 286-2428, 415 834-2919]
- Column: address
- Samples: [10932 Bigge Rd., 309 63rd St. #411, 589 Darwin Ln., 22 Cleveland Av. #14, 5420 College Av.]
- Column: city
- Samples: [Menlo Park, Oakland, Berkeley, San Jose, Oakland]
- Column: state
- Samples: [CA, CA, CA, CA, CA]
- Column: zip
- Samples: [94025, 94618, 94705, 95128, 94609]
- Column: contract
- Samples: [0, 0, 0, 0, 0]
- Table: jobs
- Column: job_id
- Samples: [1, 2, 3, 4, 5]
- Column: job_desc
- Samples: [New Hire - Job not specified, Chief Executive Officer, Business Operations Manager, Chief Financial Officier, Publisher]
- Column: min_lvl
- Samples: [10, 200, 175, 175, 150]
- Column: max_lvl
- Samples: [10, 250, 225, 250, 250]
- Table: publishers
- Column: pub_id
- Samples: [0736, 0877, 1389, 1622, 1756]
- Column: pub_name
- Samples: [New Moon Books, Binnet & Hardley, Algodata Infosystems, Five Lakes Publishing, Ramona Publishers]
- Column: city
- Samples: [Boston, Washington, Berkeley, Chicago, Dallas]
- Column: state
- Samples: [MA, DC, CA, IL, TX]
- Column: country
- Samples: [USA, USA, USA, USA, USA]
- Table: employee
- Column: emp_id
- Samples: [A-C71970F, A-R89858F, AMD15433F, ARD36773F, CFH28514M]
- Column: fname
- Samples: [Aria, Annette, Ann, Anabela, Carlos]
- Column: minit
- Samples: [, , M, R, F]
- Column: lname
- Samples: [Cruz, Roulet, Devon, Domingues, Hernadez]
- Column: job_id
- Samples: [10, 6, 3, 8, 5]
- Column: job_lvl
- Samples: [87, 152, 200, 100, 211]
- Column: pub_id
- Samples: [1389, 9999, 9952, 0877, 9999]
- Column: hire_date
- Samples: [1991-10-26 00:00:00.0, 1990-02-21 00:00:00.0, 1991-07-16 00:00:00.0, 1993-01-27 00:00:00.0, 1989-04-21 00:00:00.0]
- Table: pub_info
- Column: pub_id
- Samples: [0877, 1389, 1622, 1756, 9901]
- Column: logo
- Samples: [0x4749463839618B002F00B30F00000000800000008000808000000080800080008080..., 0x474946383961C2001D00B30F00000000800000008000808000000080800080008080..., 0x474946383961F5003400B30F00000000800000008000808000000080800080008080..., 0x474946383961E3002500B30F00000000800000008000808000000080800080008080..., 0x4749463839615D002200B30F00000000800000008000808000000080800080008080... (truncated)]
- Column: pr_info
- Samples: [This is sample text data for Binnet & Hardley, publisher 0877 in the p..., This is sample text data for Algodata Infosystems, publisher 1389 in t..., This is sample text data for Five Lakes Publishing, publisher 1622 in ..., This is sample text data for Ramona Publishers, publisher 1756 in the ..., This is sample text data for GGG&G, publisher 9901 in the pubs databas... (truncated)]
- Table: stores
- Column: stor_id
- Samples: [6380, 7066, 7067, 7131, 7896]
- Column: stor_name
- Samples: [Eric the Read Books, Barnum's, News & Brews, Doc-U-Mat: Quality Laundry and Books, Fricative Bookshop]
- Column: stor_address
- Samples: [788 Catamaugus Ave., 567 Pasadena Ave., 577 First St., 24-A Avogadro Way, 89 Madison St.]
- Column: city
- Samples: [Seattle, Tustin, Los Gatos, Remulade, Fremont]
- Column: state
- Samples: [WA, CA, CA, WA, CA]
- Column: zip
- Samples: [98056, 92789, 96745, 98014, 90019]
- Table: discounts
- Column: discounttype
- Samples: [Initial Customer, Volume Discount, Customer Discount]
- Column: stor_id
- Samples: [None, None, 8042]
- Column: lowqty
- Samples: [None, 100, None]
- Column: highqty
- Samples: [None, 1000, None]
- Column: discount
- Samples: [10.5, 6.7, 5.0]
- Table: titles
- Column: title_id
- Samples: [BU1032, BU1111, BU2075, BU7832, MC2222]
- Column: title
- Samples: [The Busy Executive's Database Guide, Cooking with Computers: Surreptitious Balance Sheets, You Can Combat Computer Stress!, Straight Talk About Computers, Silicon Valley Gastronomic Treats]
- Column: type
- Samples: [business, business, business, business, mod_cook]
- Column: pub_id
- Samples: [1389, 1389, 0736, 1389, 0877]
- Column: price
- Samples: [19.99, 11.95, 2.99, 19.99, 19.99]
- Column: advance
- Samples: [5000.0, 5000.0, 10125.0, 5000.0, 0.0]
- Column: royalty
- Samples: [10, 10, 24, 10, 12]
- Column: ytd_sales
- Samples: [4095, 3876, 18722, 4095, 2032]
- Column: notes
- Samples: [An overview of available database systems with emphasis on common busi..., Helpful hints on how to use your electronic resources to the best adva..., The latest medical and psychological techniques for living with the el..., Annotated analysis of what computers can do for you: a no-hype guide f..., Favorite recipes for quick, easy, and elegant meals. (truncated)]
- Column: pubdate
- Samples: [1991-06-12 00:00:00.0, 1991-06-09 00:00:00.0, 1991-06-30 00:00:00.0, 1991-06-22 00:00:00.0, 1991-06-09 00:00:00.0]
- Table: roysched
- Column: title_id
- Samples: [BU1032, BU1032, PC1035, PC1035, PC1035]
- Column: lorange
- Samples: [0, 5001, 0, 2001, 3001]
- Column: hirange
- Samples: [5000, 50000, 2000, 3000, 4000]
- Column: royalty
- Samples: [10, 12, 10, 12, 14]
- Table: sales
- Column: stor_id
- Samples: [6380, 6380, 7066, 7066, 7067]
- Column: ord_num
- Samples: [6871, 722a, A2976, QA7442.3, D4482]
- Column: ord_date
- Samples: [1994-09-14 00:00:00.0, 1994-09-13 00:00:00.0, 1993-05-24 00:00:00.0, 1994-09-13 00:00:00.0, 1994-09-14 00:00:00.0]
- Column: qty
- Samples: [5, 3, 50, 75, 10]
- Column: payterms
- Samples: [Net 60, Net 60, Net 30, ON invoice, Net 60]
- Column: title_id
- Samples: [BU1032, PS2091, PC8888, PS2091, PS2091]
- Table: titleauthor
- Column: au_id
- Samples: [172-32-1176, 213-46-8915, 213-46-8915, 238-95-7766, 267-41-2394]
- Column: title_id
- Samples: [PS3333, BU1032, BU2075, PC1035, BU1111]
- Column: au_ord
- Samples: [1, 2, 1, 1, 2]
- Column: royaltyper
- Samples: [100, 40, 100, 100, 40]
| SELECT emp_id FROM employee WHERE minit = '' ORDER BY job_lvl DESC LIMIT 1 |
|
Solve the following sql problem:
Is the author of "Sushi, Anyone?" on the contract?
Schema:
SCHEMA:
- Table: authors
- Column: au_id
- Samples: [172-32-1176, 213-46-8915, 238-95-7766, 267-41-2394, 274-80-9391]
- Column: au_lname
- Samples: [White, Green, Carson, O'Leary, Straight]
- Column: au_fname
- Samples: [Johnson, Marjorie, Cheryl, Michael, Dean]
- Column: phone
- Samples: [408 496-7223, 415 986-7020, 415 548-7723, 408 286-2428, 415 834-2919]
- Column: address
- Samples: [10932 Bigge Rd., 309 63rd St. #411, 589 Darwin Ln., 22 Cleveland Av. #14, 5420 College Av.]
- Column: city
- Samples: [Menlo Park, Oakland, Berkeley, San Jose, Oakland]
- Column: state
- Samples: [CA, CA, CA, CA, CA]
- Column: zip
- Samples: [94025, 94618, 94705, 95128, 94609]
- Column: contract
- Samples: [0, 0, 0, 0, 0]
- Table: jobs
- Column: job_id
- Samples: [1, 2, 3, 4, 5]
- Column: job_desc
- Samples: [New Hire - Job not specified, Chief Executive Officer, Business Operations Manager, Chief Financial Officier, Publisher]
- Column: min_lvl
- Samples: [10, 200, 175, 175, 150]
- Column: max_lvl
- Samples: [10, 250, 225, 250, 250]
- Table: publishers
- Column: pub_id
- Samples: [0736, 0877, 1389, 1622, 1756]
- Column: pub_name
- Samples: [New Moon Books, Binnet & Hardley, Algodata Infosystems, Five Lakes Publishing, Ramona Publishers]
- Column: city
- Samples: [Boston, Washington, Berkeley, Chicago, Dallas]
- Column: state
- Samples: [MA, DC, CA, IL, TX]
- Column: country
- Samples: [USA, USA, USA, USA, USA]
- Table: employee
- Column: emp_id
- Samples: [A-C71970F, A-R89858F, AMD15433F, ARD36773F, CFH28514M]
- Column: fname
- Samples: [Aria, Annette, Ann, Anabela, Carlos]
- Column: minit
- Samples: [, , M, R, F]
- Column: lname
- Samples: [Cruz, Roulet, Devon, Domingues, Hernadez]
- Column: job_id
- Samples: [10, 6, 3, 8, 5]
- Column: job_lvl
- Samples: [87, 152, 200, 100, 211]
- Column: pub_id
- Samples: [1389, 9999, 9952, 0877, 9999]
- Column: hire_date
- Samples: [1991-10-26 00:00:00.0, 1990-02-21 00:00:00.0, 1991-07-16 00:00:00.0, 1993-01-27 00:00:00.0, 1989-04-21 00:00:00.0]
- Table: pub_info
- Column: pub_id
- Samples: [0877, 1389, 1622, 1756, 9901]
- Column: logo
- Samples: [0x4749463839618B002F00B30F00000000800000008000808000000080800080008080..., 0x474946383961C2001D00B30F00000000800000008000808000000080800080008080..., 0x474946383961F5003400B30F00000000800000008000808000000080800080008080..., 0x474946383961E3002500B30F00000000800000008000808000000080800080008080..., 0x4749463839615D002200B30F00000000800000008000808000000080800080008080... (truncated)]
- Column: pr_info
- Samples: [This is sample text data for Binnet & Hardley, publisher 0877 in the p..., This is sample text data for Algodata Infosystems, publisher 1389 in t..., This is sample text data for Five Lakes Publishing, publisher 1622 in ..., This is sample text data for Ramona Publishers, publisher 1756 in the ..., This is sample text data for GGG&G, publisher 9901 in the pubs databas... (truncated)]
- Table: stores
- Column: stor_id
- Samples: [6380, 7066, 7067, 7131, 7896]
- Column: stor_name
- Samples: [Eric the Read Books, Barnum's, News & Brews, Doc-U-Mat: Quality Laundry and Books, Fricative Bookshop]
- Column: stor_address
- Samples: [788 Catamaugus Ave., 567 Pasadena Ave., 577 First St., 24-A Avogadro Way, 89 Madison St.]
- Column: city
- Samples: [Seattle, Tustin, Los Gatos, Remulade, Fremont]
- Column: state
- Samples: [WA, CA, CA, WA, CA]
- Column: zip
- Samples: [98056, 92789, 96745, 98014, 90019]
- Table: discounts
- Column: discounttype
- Samples: [Initial Customer, Volume Discount, Customer Discount]
- Column: stor_id
- Samples: [None, None, 8042]
- Column: lowqty
- Samples: [None, 100, None]
- Column: highqty
- Samples: [None, 1000, None]
- Column: discount
- Samples: [10.5, 6.7, 5.0]
- Table: titles
- Column: title_id
- Samples: [BU1032, BU1111, BU2075, BU7832, MC2222]
- Column: title
- Samples: [The Busy Executive's Database Guide, Cooking with Computers: Surreptitious Balance Sheets, You Can Combat Computer Stress!, Straight Talk About Computers, Silicon Valley Gastronomic Treats]
- Column: type
- Samples: [business, business, business, business, mod_cook]
- Column: pub_id
- Samples: [1389, 1389, 0736, 1389, 0877]
- Column: price
- Samples: [19.99, 11.95, 2.99, 19.99, 19.99]
- Column: advance
- Samples: [5000.0, 5000.0, 10125.0, 5000.0, 0.0]
- Column: royalty
- Samples: [10, 10, 24, 10, 12]
- Column: ytd_sales
- Samples: [4095, 3876, 18722, 4095, 2032]
- Column: notes
- Samples: [An overview of available database systems with emphasis on common busi..., Helpful hints on how to use your electronic resources to the best adva..., The latest medical and psychological techniques for living with the el..., Annotated analysis of what computers can do for you: a no-hype guide f..., Favorite recipes for quick, easy, and elegant meals. (truncated)]
- Column: pubdate
- Samples: [1991-06-12 00:00:00.0, 1991-06-09 00:00:00.0, 1991-06-30 00:00:00.0, 1991-06-22 00:00:00.0, 1991-06-09 00:00:00.0]
- Table: roysched
- Column: title_id
- Samples: [BU1032, BU1032, PC1035, PC1035, PC1035]
- Column: lorange
- Samples: [0, 5001, 0, 2001, 3001]
- Column: hirange
- Samples: [5000, 50000, 2000, 3000, 4000]
- Column: royalty
- Samples: [10, 12, 10, 12, 14]
- Table: sales
- Column: stor_id
- Samples: [6380, 6380, 7066, 7066, 7067]
- Column: ord_num
- Samples: [6871, 722a, A2976, QA7442.3, D4482]
- Column: ord_date
- Samples: [1994-09-14 00:00:00.0, 1994-09-13 00:00:00.0, 1993-05-24 00:00:00.0, 1994-09-13 00:00:00.0, 1994-09-14 00:00:00.0]
- Column: qty
- Samples: [5, 3, 50, 75, 10]
- Column: payterms
- Samples: [Net 60, Net 60, Net 30, ON invoice, Net 60]
- Column: title_id
- Samples: [BU1032, PS2091, PC8888, PS2091, PS2091]
- Table: titleauthor
- Column: au_id
- Samples: [172-32-1176, 213-46-8915, 213-46-8915, 238-95-7766, 267-41-2394]
- Column: title_id
- Samples: [PS3333, BU1032, BU2075, PC1035, BU1111]
- Column: au_ord
- Samples: [1, 2, 1, 1, 2]
- Column: royaltyper
- Samples: [100, 40, 100, 100, 40]
| SELECT T1.contract FROM authors AS T1 INNER JOIN titleauthor AS T2 ON T1.au_id = T2.au_id INNER JOIN titles AS T3 ON T2.title_id = T3.title_id WHERE T3.title = 'Sushi, Anyone?' |
|
Solve the following sql problem:
Which publisher had the highest job level? Give his/her full name.
Schema:
SCHEMA:
- Table: authors
- Column: au_id
- Samples: [172-32-1176, 213-46-8915, 238-95-7766, 267-41-2394, 274-80-9391]
- Column: au_lname
- Samples: [White, Green, Carson, O'Leary, Straight]
- Column: au_fname
- Samples: [Johnson, Marjorie, Cheryl, Michael, Dean]
- Column: phone
- Samples: [408 496-7223, 415 986-7020, 415 548-7723, 408 286-2428, 415 834-2919]
- Column: address
- Samples: [10932 Bigge Rd., 309 63rd St. #411, 589 Darwin Ln., 22 Cleveland Av. #14, 5420 College Av.]
- Column: city
- Samples: [Menlo Park, Oakland, Berkeley, San Jose, Oakland]
- Column: state
- Samples: [CA, CA, CA, CA, CA]
- Column: zip
- Samples: [94025, 94618, 94705, 95128, 94609]
- Column: contract
- Samples: [0, 0, 0, 0, 0]
- Table: jobs
- Column: job_id
- Samples: [1, 2, 3, 4, 5]
- Column: job_desc
- Samples: [New Hire - Job not specified, Chief Executive Officer, Business Operations Manager, Chief Financial Officier, Publisher]
- Column: min_lvl
- Samples: [10, 200, 175, 175, 150]
- Column: max_lvl
- Samples: [10, 250, 225, 250, 250]
- Table: publishers
- Column: pub_id
- Samples: [0736, 0877, 1389, 1622, 1756]
- Column: pub_name
- Samples: [New Moon Books, Binnet & Hardley, Algodata Infosystems, Five Lakes Publishing, Ramona Publishers]
- Column: city
- Samples: [Boston, Washington, Berkeley, Chicago, Dallas]
- Column: state
- Samples: [MA, DC, CA, IL, TX]
- Column: country
- Samples: [USA, USA, USA, USA, USA]
- Table: employee
- Column: emp_id
- Samples: [A-C71970F, A-R89858F, AMD15433F, ARD36773F, CFH28514M]
- Column: fname
- Samples: [Aria, Annette, Ann, Anabela, Carlos]
- Column: minit
- Samples: [, , M, R, F]
- Column: lname
- Samples: [Cruz, Roulet, Devon, Domingues, Hernadez]
- Column: job_id
- Samples: [10, 6, 3, 8, 5]
- Column: job_lvl
- Samples: [87, 152, 200, 100, 211]
- Column: pub_id
- Samples: [1389, 9999, 9952, 0877, 9999]
- Column: hire_date
- Samples: [1991-10-26 00:00:00.0, 1990-02-21 00:00:00.0, 1991-07-16 00:00:00.0, 1993-01-27 00:00:00.0, 1989-04-21 00:00:00.0]
- Table: pub_info
- Column: pub_id
- Samples: [0877, 1389, 1622, 1756, 9901]
- Column: logo
- Samples: [0x4749463839618B002F00B30F00000000800000008000808000000080800080008080..., 0x474946383961C2001D00B30F00000000800000008000808000000080800080008080..., 0x474946383961F5003400B30F00000000800000008000808000000080800080008080..., 0x474946383961E3002500B30F00000000800000008000808000000080800080008080..., 0x4749463839615D002200B30F00000000800000008000808000000080800080008080... (truncated)]
- Column: pr_info
- Samples: [This is sample text data for Binnet & Hardley, publisher 0877 in the p..., This is sample text data for Algodata Infosystems, publisher 1389 in t..., This is sample text data for Five Lakes Publishing, publisher 1622 in ..., This is sample text data for Ramona Publishers, publisher 1756 in the ..., This is sample text data for GGG&G, publisher 9901 in the pubs databas... (truncated)]
- Table: stores
- Column: stor_id
- Samples: [6380, 7066, 7067, 7131, 7896]
- Column: stor_name
- Samples: [Eric the Read Books, Barnum's, News & Brews, Doc-U-Mat: Quality Laundry and Books, Fricative Bookshop]
- Column: stor_address
- Samples: [788 Catamaugus Ave., 567 Pasadena Ave., 577 First St., 24-A Avogadro Way, 89 Madison St.]
- Column: city
- Samples: [Seattle, Tustin, Los Gatos, Remulade, Fremont]
- Column: state
- Samples: [WA, CA, CA, WA, CA]
- Column: zip
- Samples: [98056, 92789, 96745, 98014, 90019]
- Table: discounts
- Column: discounttype
- Samples: [Initial Customer, Volume Discount, Customer Discount]
- Column: stor_id
- Samples: [None, None, 8042]
- Column: lowqty
- Samples: [None, 100, None]
- Column: highqty
- Samples: [None, 1000, None]
- Column: discount
- Samples: [10.5, 6.7, 5.0]
- Table: titles
- Column: title_id
- Samples: [BU1032, BU1111, BU2075, BU7832, MC2222]
- Column: title
- Samples: [The Busy Executive's Database Guide, Cooking with Computers: Surreptitious Balance Sheets, You Can Combat Computer Stress!, Straight Talk About Computers, Silicon Valley Gastronomic Treats]
- Column: type
- Samples: [business, business, business, business, mod_cook]
- Column: pub_id
- Samples: [1389, 1389, 0736, 1389, 0877]
- Column: price
- Samples: [19.99, 11.95, 2.99, 19.99, 19.99]
- Column: advance
- Samples: [5000.0, 5000.0, 10125.0, 5000.0, 0.0]
- Column: royalty
- Samples: [10, 10, 24, 10, 12]
- Column: ytd_sales
- Samples: [4095, 3876, 18722, 4095, 2032]
- Column: notes
- Samples: [An overview of available database systems with emphasis on common busi..., Helpful hints on how to use your electronic resources to the best adva..., The latest medical and psychological techniques for living with the el..., Annotated analysis of what computers can do for you: a no-hype guide f..., Favorite recipes for quick, easy, and elegant meals. (truncated)]
- Column: pubdate
- Samples: [1991-06-12 00:00:00.0, 1991-06-09 00:00:00.0, 1991-06-30 00:00:00.0, 1991-06-22 00:00:00.0, 1991-06-09 00:00:00.0]
- Table: roysched
- Column: title_id
- Samples: [BU1032, BU1032, PC1035, PC1035, PC1035]
- Column: lorange
- Samples: [0, 5001, 0, 2001, 3001]
- Column: hirange
- Samples: [5000, 50000, 2000, 3000, 4000]
- Column: royalty
- Samples: [10, 12, 10, 12, 14]
- Table: sales
- Column: stor_id
- Samples: [6380, 6380, 7066, 7066, 7067]
- Column: ord_num
- Samples: [6871, 722a, A2976, QA7442.3, D4482]
- Column: ord_date
- Samples: [1994-09-14 00:00:00.0, 1994-09-13 00:00:00.0, 1993-05-24 00:00:00.0, 1994-09-13 00:00:00.0, 1994-09-14 00:00:00.0]
- Column: qty
- Samples: [5, 3, 50, 75, 10]
- Column: payterms
- Samples: [Net 60, Net 60, Net 30, ON invoice, Net 60]
- Column: title_id
- Samples: [BU1032, PS2091, PC8888, PS2091, PS2091]
- Table: titleauthor
- Column: au_id
- Samples: [172-32-1176, 213-46-8915, 213-46-8915, 238-95-7766, 267-41-2394]
- Column: title_id
- Samples: [PS3333, BU1032, BU2075, PC1035, BU1111]
- Column: au_ord
- Samples: [1, 2, 1, 1, 2]
- Column: royaltyper
- Samples: [100, 40, 100, 100, 40]
| SELECT T1.fname, T1.minit, T1.lname FROM employee AS T1 INNER JOIN jobs AS T2 ON T1.job_id = T2.job_id ORDER BY T1.job_lvl DESC LIMIT 1 |
|
Solve the following sql problem:
What's Pedro S Afonso's job title?
Schema:
SCHEMA:
- Table: authors
- Column: au_id
- Samples: [172-32-1176, 213-46-8915, 238-95-7766, 267-41-2394, 274-80-9391]
- Column: au_lname
- Samples: [White, Green, Carson, O'Leary, Straight]
- Column: au_fname
- Samples: [Johnson, Marjorie, Cheryl, Michael, Dean]
- Column: phone
- Samples: [408 496-7223, 415 986-7020, 415 548-7723, 408 286-2428, 415 834-2919]
- Column: address
- Samples: [10932 Bigge Rd., 309 63rd St. #411, 589 Darwin Ln., 22 Cleveland Av. #14, 5420 College Av.]
- Column: city
- Samples: [Menlo Park, Oakland, Berkeley, San Jose, Oakland]
- Column: state
- Samples: [CA, CA, CA, CA, CA]
- Column: zip
- Samples: [94025, 94618, 94705, 95128, 94609]
- Column: contract
- Samples: [0, 0, 0, 0, 0]
- Table: jobs
- Column: job_id
- Samples: [1, 2, 3, 4, 5]
- Column: job_desc
- Samples: [New Hire - Job not specified, Chief Executive Officer, Business Operations Manager, Chief Financial Officier, Publisher]
- Column: min_lvl
- Samples: [10, 200, 175, 175, 150]
- Column: max_lvl
- Samples: [10, 250, 225, 250, 250]
- Table: publishers
- Column: pub_id
- Samples: [0736, 0877, 1389, 1622, 1756]
- Column: pub_name
- Samples: [New Moon Books, Binnet & Hardley, Algodata Infosystems, Five Lakes Publishing, Ramona Publishers]
- Column: city
- Samples: [Boston, Washington, Berkeley, Chicago, Dallas]
- Column: state
- Samples: [MA, DC, CA, IL, TX]
- Column: country
- Samples: [USA, USA, USA, USA, USA]
- Table: employee
- Column: emp_id
- Samples: [A-C71970F, A-R89858F, AMD15433F, ARD36773F, CFH28514M]
- Column: fname
- Samples: [Aria, Annette, Ann, Anabela, Carlos]
- Column: minit
- Samples: [, , M, R, F]
- Column: lname
- Samples: [Cruz, Roulet, Devon, Domingues, Hernadez]
- Column: job_id
- Samples: [10, 6, 3, 8, 5]
- Column: job_lvl
- Samples: [87, 152, 200, 100, 211]
- Column: pub_id
- Samples: [1389, 9999, 9952, 0877, 9999]
- Column: hire_date
- Samples: [1991-10-26 00:00:00.0, 1990-02-21 00:00:00.0, 1991-07-16 00:00:00.0, 1993-01-27 00:00:00.0, 1989-04-21 00:00:00.0]
- Table: pub_info
- Column: pub_id
- Samples: [0877, 1389, 1622, 1756, 9901]
- Column: logo
- Samples: [0x4749463839618B002F00B30F00000000800000008000808000000080800080008080..., 0x474946383961C2001D00B30F00000000800000008000808000000080800080008080..., 0x474946383961F5003400B30F00000000800000008000808000000080800080008080..., 0x474946383961E3002500B30F00000000800000008000808000000080800080008080..., 0x4749463839615D002200B30F00000000800000008000808000000080800080008080... (truncated)]
- Column: pr_info
- Samples: [This is sample text data for Binnet & Hardley, publisher 0877 in the p..., This is sample text data for Algodata Infosystems, publisher 1389 in t..., This is sample text data for Five Lakes Publishing, publisher 1622 in ..., This is sample text data for Ramona Publishers, publisher 1756 in the ..., This is sample text data for GGG&G, publisher 9901 in the pubs databas... (truncated)]
- Table: stores
- Column: stor_id
- Samples: [6380, 7066, 7067, 7131, 7896]
- Column: stor_name
- Samples: [Eric the Read Books, Barnum's, News & Brews, Doc-U-Mat: Quality Laundry and Books, Fricative Bookshop]
- Column: stor_address
- Samples: [788 Catamaugus Ave., 567 Pasadena Ave., 577 First St., 24-A Avogadro Way, 89 Madison St.]
- Column: city
- Samples: [Seattle, Tustin, Los Gatos, Remulade, Fremont]
- Column: state
- Samples: [WA, CA, CA, WA, CA]
- Column: zip
- Samples: [98056, 92789, 96745, 98014, 90019]
- Table: discounts
- Column: discounttype
- Samples: [Initial Customer, Volume Discount, Customer Discount]
- Column: stor_id
- Samples: [None, None, 8042]
- Column: lowqty
- Samples: [None, 100, None]
- Column: highqty
- Samples: [None, 1000, None]
- Column: discount
- Samples: [10.5, 6.7, 5.0]
- Table: titles
- Column: title_id
- Samples: [BU1032, BU1111, BU2075, BU7832, MC2222]
- Column: title
- Samples: [The Busy Executive's Database Guide, Cooking with Computers: Surreptitious Balance Sheets, You Can Combat Computer Stress!, Straight Talk About Computers, Silicon Valley Gastronomic Treats]
- Column: type
- Samples: [business, business, business, business, mod_cook]
- Column: pub_id
- Samples: [1389, 1389, 0736, 1389, 0877]
- Column: price
- Samples: [19.99, 11.95, 2.99, 19.99, 19.99]
- Column: advance
- Samples: [5000.0, 5000.0, 10125.0, 5000.0, 0.0]
- Column: royalty
- Samples: [10, 10, 24, 10, 12]
- Column: ytd_sales
- Samples: [4095, 3876, 18722, 4095, 2032]
- Column: notes
- Samples: [An overview of available database systems with emphasis on common busi..., Helpful hints on how to use your electronic resources to the best adva..., The latest medical and psychological techniques for living with the el..., Annotated analysis of what computers can do for you: a no-hype guide f..., Favorite recipes for quick, easy, and elegant meals. (truncated)]
- Column: pubdate
- Samples: [1991-06-12 00:00:00.0, 1991-06-09 00:00:00.0, 1991-06-30 00:00:00.0, 1991-06-22 00:00:00.0, 1991-06-09 00:00:00.0]
- Table: roysched
- Column: title_id
- Samples: [BU1032, BU1032, PC1035, PC1035, PC1035]
- Column: lorange
- Samples: [0, 5001, 0, 2001, 3001]
- Column: hirange
- Samples: [5000, 50000, 2000, 3000, 4000]
- Column: royalty
- Samples: [10, 12, 10, 12, 14]
- Table: sales
- Column: stor_id
- Samples: [6380, 6380, 7066, 7066, 7067]
- Column: ord_num
- Samples: [6871, 722a, A2976, QA7442.3, D4482]
- Column: ord_date
- Samples: [1994-09-14 00:00:00.0, 1994-09-13 00:00:00.0, 1993-05-24 00:00:00.0, 1994-09-13 00:00:00.0, 1994-09-14 00:00:00.0]
- Column: qty
- Samples: [5, 3, 50, 75, 10]
- Column: payterms
- Samples: [Net 60, Net 60, Net 30, ON invoice, Net 60]
- Column: title_id
- Samples: [BU1032, PS2091, PC8888, PS2091, PS2091]
- Table: titleauthor
- Column: au_id
- Samples: [172-32-1176, 213-46-8915, 213-46-8915, 238-95-7766, 267-41-2394]
- Column: title_id
- Samples: [PS3333, BU1032, BU2075, PC1035, BU1111]
- Column: au_ord
- Samples: [1, 2, 1, 1, 2]
- Column: royaltyper
- Samples: [100, 40, 100, 100, 40]
| SELECT T2.job_desc FROM employee AS T1 INNER JOIN jobs AS T2 ON T1.job_id = T2.job_id WHERE T1.fname = 'Pedro' AND T1.minit = 'S' AND T1.lname = 'Afonso' |
|
Solve the following sql problem:
How many levels are there left for Diego W Roel to reach if he/she could go to the max level for his/her position?
Schema:
SCHEMA:
- Table: authors
- Column: au_id
- Samples: [172-32-1176, 213-46-8915, 238-95-7766, 267-41-2394, 274-80-9391]
- Column: au_lname
- Samples: [White, Green, Carson, O'Leary, Straight]
- Column: au_fname
- Samples: [Johnson, Marjorie, Cheryl, Michael, Dean]
- Column: phone
- Samples: [408 496-7223, 415 986-7020, 415 548-7723, 408 286-2428, 415 834-2919]
- Column: address
- Samples: [10932 Bigge Rd., 309 63rd St. #411, 589 Darwin Ln., 22 Cleveland Av. #14, 5420 College Av.]
- Column: city
- Samples: [Menlo Park, Oakland, Berkeley, San Jose, Oakland]
- Column: state
- Samples: [CA, CA, CA, CA, CA]
- Column: zip
- Samples: [94025, 94618, 94705, 95128, 94609]
- Column: contract
- Samples: [0, 0, 0, 0, 0]
- Table: jobs
- Column: job_id
- Samples: [1, 2, 3, 4, 5]
- Column: job_desc
- Samples: [New Hire - Job not specified, Chief Executive Officer, Business Operations Manager, Chief Financial Officier, Publisher]
- Column: min_lvl
- Samples: [10, 200, 175, 175, 150]
- Column: max_lvl
- Samples: [10, 250, 225, 250, 250]
- Table: publishers
- Column: pub_id
- Samples: [0736, 0877, 1389, 1622, 1756]
- Column: pub_name
- Samples: [New Moon Books, Binnet & Hardley, Algodata Infosystems, Five Lakes Publishing, Ramona Publishers]
- Column: city
- Samples: [Boston, Washington, Berkeley, Chicago, Dallas]
- Column: state
- Samples: [MA, DC, CA, IL, TX]
- Column: country
- Samples: [USA, USA, USA, USA, USA]
- Table: employee
- Column: emp_id
- Samples: [A-C71970F, A-R89858F, AMD15433F, ARD36773F, CFH28514M]
- Column: fname
- Samples: [Aria, Annette, Ann, Anabela, Carlos]
- Column: minit
- Samples: [, , M, R, F]
- Column: lname
- Samples: [Cruz, Roulet, Devon, Domingues, Hernadez]
- Column: job_id
- Samples: [10, 6, 3, 8, 5]
- Column: job_lvl
- Samples: [87, 152, 200, 100, 211]
- Column: pub_id
- Samples: [1389, 9999, 9952, 0877, 9999]
- Column: hire_date
- Samples: [1991-10-26 00:00:00.0, 1990-02-21 00:00:00.0, 1991-07-16 00:00:00.0, 1993-01-27 00:00:00.0, 1989-04-21 00:00:00.0]
- Table: pub_info
- Column: pub_id
- Samples: [0877, 1389, 1622, 1756, 9901]
- Column: logo
- Samples: [0x4749463839618B002F00B30F00000000800000008000808000000080800080008080..., 0x474946383961C2001D00B30F00000000800000008000808000000080800080008080..., 0x474946383961F5003400B30F00000000800000008000808000000080800080008080..., 0x474946383961E3002500B30F00000000800000008000808000000080800080008080..., 0x4749463839615D002200B30F00000000800000008000808000000080800080008080... (truncated)]
- Column: pr_info
- Samples: [This is sample text data for Binnet & Hardley, publisher 0877 in the p..., This is sample text data for Algodata Infosystems, publisher 1389 in t..., This is sample text data for Five Lakes Publishing, publisher 1622 in ..., This is sample text data for Ramona Publishers, publisher 1756 in the ..., This is sample text data for GGG&G, publisher 9901 in the pubs databas... (truncated)]
- Table: stores
- Column: stor_id
- Samples: [6380, 7066, 7067, 7131, 7896]
- Column: stor_name
- Samples: [Eric the Read Books, Barnum's, News & Brews, Doc-U-Mat: Quality Laundry and Books, Fricative Bookshop]
- Column: stor_address
- Samples: [788 Catamaugus Ave., 567 Pasadena Ave., 577 First St., 24-A Avogadro Way, 89 Madison St.]
- Column: city
- Samples: [Seattle, Tustin, Los Gatos, Remulade, Fremont]
- Column: state
- Samples: [WA, CA, CA, WA, CA]
- Column: zip
- Samples: [98056, 92789, 96745, 98014, 90019]
- Table: discounts
- Column: discounttype
- Samples: [Initial Customer, Volume Discount, Customer Discount]
- Column: stor_id
- Samples: [None, None, 8042]
- Column: lowqty
- Samples: [None, 100, None]
- Column: highqty
- Samples: [None, 1000, None]
- Column: discount
- Samples: [10.5, 6.7, 5.0]
- Table: titles
- Column: title_id
- Samples: [BU1032, BU1111, BU2075, BU7832, MC2222]
- Column: title
- Samples: [The Busy Executive's Database Guide, Cooking with Computers: Surreptitious Balance Sheets, You Can Combat Computer Stress!, Straight Talk About Computers, Silicon Valley Gastronomic Treats]
- Column: type
- Samples: [business, business, business, business, mod_cook]
- Column: pub_id
- Samples: [1389, 1389, 0736, 1389, 0877]
- Column: price
- Samples: [19.99, 11.95, 2.99, 19.99, 19.99]
- Column: advance
- Samples: [5000.0, 5000.0, 10125.0, 5000.0, 0.0]
- Column: royalty
- Samples: [10, 10, 24, 10, 12]
- Column: ytd_sales
- Samples: [4095, 3876, 18722, 4095, 2032]
- Column: notes
- Samples: [An overview of available database systems with emphasis on common busi..., Helpful hints on how to use your electronic resources to the best adva..., The latest medical and psychological techniques for living with the el..., Annotated analysis of what computers can do for you: a no-hype guide f..., Favorite recipes for quick, easy, and elegant meals. (truncated)]
- Column: pubdate
- Samples: [1991-06-12 00:00:00.0, 1991-06-09 00:00:00.0, 1991-06-30 00:00:00.0, 1991-06-22 00:00:00.0, 1991-06-09 00:00:00.0]
- Table: roysched
- Column: title_id
- Samples: [BU1032, BU1032, PC1035, PC1035, PC1035]
- Column: lorange
- Samples: [0, 5001, 0, 2001, 3001]
- Column: hirange
- Samples: [5000, 50000, 2000, 3000, 4000]
- Column: royalty
- Samples: [10, 12, 10, 12, 14]
- Table: sales
- Column: stor_id
- Samples: [6380, 6380, 7066, 7066, 7067]
- Column: ord_num
- Samples: [6871, 722a, A2976, QA7442.3, D4482]
- Column: ord_date
- Samples: [1994-09-14 00:00:00.0, 1994-09-13 00:00:00.0, 1993-05-24 00:00:00.0, 1994-09-13 00:00:00.0, 1994-09-14 00:00:00.0]
- Column: qty
- Samples: [5, 3, 50, 75, 10]
- Column: payterms
- Samples: [Net 60, Net 60, Net 30, ON invoice, Net 60]
- Column: title_id
- Samples: [BU1032, PS2091, PC8888, PS2091, PS2091]
- Table: titleauthor
- Column: au_id
- Samples: [172-32-1176, 213-46-8915, 213-46-8915, 238-95-7766, 267-41-2394]
- Column: title_id
- Samples: [PS3333, BU1032, BU2075, PC1035, BU1111]
- Column: au_ord
- Samples: [1, 2, 1, 1, 2]
- Column: royaltyper
- Samples: [100, 40, 100, 100, 40]
| SELECT T2.max_lvl - T1.job_lvl FROM employee AS T1 INNER JOIN jobs AS T2 ON T1.job_id = T2.job_id WHERE T1.fname = 'Diego' AND T1.minit = 'W' AND T1.lname = 'Roel' |
|
Solve the following sql problem:
What's on the notes for the order happened on 1994/9/14?
Schema:
SCHEMA:
- Table: authors
- Column: au_id
- Samples: [172-32-1176, 213-46-8915, 238-95-7766, 267-41-2394, 274-80-9391]
- Column: au_lname
- Samples: [White, Green, Carson, O'Leary, Straight]
- Column: au_fname
- Samples: [Johnson, Marjorie, Cheryl, Michael, Dean]
- Column: phone
- Samples: [408 496-7223, 415 986-7020, 415 548-7723, 408 286-2428, 415 834-2919]
- Column: address
- Samples: [10932 Bigge Rd., 309 63rd St. #411, 589 Darwin Ln., 22 Cleveland Av. #14, 5420 College Av.]
- Column: city
- Samples: [Menlo Park, Oakland, Berkeley, San Jose, Oakland]
- Column: state
- Samples: [CA, CA, CA, CA, CA]
- Column: zip
- Samples: [94025, 94618, 94705, 95128, 94609]
- Column: contract
- Samples: [0, 0, 0, 0, 0]
- Table: jobs
- Column: job_id
- Samples: [1, 2, 3, 4, 5]
- Column: job_desc
- Samples: [New Hire - Job not specified, Chief Executive Officer, Business Operations Manager, Chief Financial Officier, Publisher]
- Column: min_lvl
- Samples: [10, 200, 175, 175, 150]
- Column: max_lvl
- Samples: [10, 250, 225, 250, 250]
- Table: publishers
- Column: pub_id
- Samples: [0736, 0877, 1389, 1622, 1756]
- Column: pub_name
- Samples: [New Moon Books, Binnet & Hardley, Algodata Infosystems, Five Lakes Publishing, Ramona Publishers]
- Column: city
- Samples: [Boston, Washington, Berkeley, Chicago, Dallas]
- Column: state
- Samples: [MA, DC, CA, IL, TX]
- Column: country
- Samples: [USA, USA, USA, USA, USA]
- Table: employee
- Column: emp_id
- Samples: [A-C71970F, A-R89858F, AMD15433F, ARD36773F, CFH28514M]
- Column: fname
- Samples: [Aria, Annette, Ann, Anabela, Carlos]
- Column: minit
- Samples: [, , M, R, F]
- Column: lname
- Samples: [Cruz, Roulet, Devon, Domingues, Hernadez]
- Column: job_id
- Samples: [10, 6, 3, 8, 5]
- Column: job_lvl
- Samples: [87, 152, 200, 100, 211]
- Column: pub_id
- Samples: [1389, 9999, 9952, 0877, 9999]
- Column: hire_date
- Samples: [1991-10-26 00:00:00.0, 1990-02-21 00:00:00.0, 1991-07-16 00:00:00.0, 1993-01-27 00:00:00.0, 1989-04-21 00:00:00.0]
- Table: pub_info
- Column: pub_id
- Samples: [0877, 1389, 1622, 1756, 9901]
- Column: logo
- Samples: [0x4749463839618B002F00B30F00000000800000008000808000000080800080008080..., 0x474946383961C2001D00B30F00000000800000008000808000000080800080008080..., 0x474946383961F5003400B30F00000000800000008000808000000080800080008080..., 0x474946383961E3002500B30F00000000800000008000808000000080800080008080..., 0x4749463839615D002200B30F00000000800000008000808000000080800080008080... (truncated)]
- Column: pr_info
- Samples: [This is sample text data for Binnet & Hardley, publisher 0877 in the p..., This is sample text data for Algodata Infosystems, publisher 1389 in t..., This is sample text data for Five Lakes Publishing, publisher 1622 in ..., This is sample text data for Ramona Publishers, publisher 1756 in the ..., This is sample text data for GGG&G, publisher 9901 in the pubs databas... (truncated)]
- Table: stores
- Column: stor_id
- Samples: [6380, 7066, 7067, 7131, 7896]
- Column: stor_name
- Samples: [Eric the Read Books, Barnum's, News & Brews, Doc-U-Mat: Quality Laundry and Books, Fricative Bookshop]
- Column: stor_address
- Samples: [788 Catamaugus Ave., 567 Pasadena Ave., 577 First St., 24-A Avogadro Way, 89 Madison St.]
- Column: city
- Samples: [Seattle, Tustin, Los Gatos, Remulade, Fremont]
- Column: state
- Samples: [WA, CA, CA, WA, CA]
- Column: zip
- Samples: [98056, 92789, 96745, 98014, 90019]
- Table: discounts
- Column: discounttype
- Samples: [Initial Customer, Volume Discount, Customer Discount]
- Column: stor_id
- Samples: [None, None, 8042]
- Column: lowqty
- Samples: [None, 100, None]
- Column: highqty
- Samples: [None, 1000, None]
- Column: discount
- Samples: [10.5, 6.7, 5.0]
- Table: titles
- Column: title_id
- Samples: [BU1032, BU1111, BU2075, BU7832, MC2222]
- Column: title
- Samples: [The Busy Executive's Database Guide, Cooking with Computers: Surreptitious Balance Sheets, You Can Combat Computer Stress!, Straight Talk About Computers, Silicon Valley Gastronomic Treats]
- Column: type
- Samples: [business, business, business, business, mod_cook]
- Column: pub_id
- Samples: [1389, 1389, 0736, 1389, 0877]
- Column: price
- Samples: [19.99, 11.95, 2.99, 19.99, 19.99]
- Column: advance
- Samples: [5000.0, 5000.0, 10125.0, 5000.0, 0.0]
- Column: royalty
- Samples: [10, 10, 24, 10, 12]
- Column: ytd_sales
- Samples: [4095, 3876, 18722, 4095, 2032]
- Column: notes
- Samples: [An overview of available database systems with emphasis on common busi..., Helpful hints on how to use your electronic resources to the best adva..., The latest medical and psychological techniques for living with the el..., Annotated analysis of what computers can do for you: a no-hype guide f..., Favorite recipes for quick, easy, and elegant meals. (truncated)]
- Column: pubdate
- Samples: [1991-06-12 00:00:00.0, 1991-06-09 00:00:00.0, 1991-06-30 00:00:00.0, 1991-06-22 00:00:00.0, 1991-06-09 00:00:00.0]
- Table: roysched
- Column: title_id
- Samples: [BU1032, BU1032, PC1035, PC1035, PC1035]
- Column: lorange
- Samples: [0, 5001, 0, 2001, 3001]
- Column: hirange
- Samples: [5000, 50000, 2000, 3000, 4000]
- Column: royalty
- Samples: [10, 12, 10, 12, 14]
- Table: sales
- Column: stor_id
- Samples: [6380, 6380, 7066, 7066, 7067]
- Column: ord_num
- Samples: [6871, 722a, A2976, QA7442.3, D4482]
- Column: ord_date
- Samples: [1994-09-14 00:00:00.0, 1994-09-13 00:00:00.0, 1993-05-24 00:00:00.0, 1994-09-13 00:00:00.0, 1994-09-14 00:00:00.0]
- Column: qty
- Samples: [5, 3, 50, 75, 10]
- Column: payterms
- Samples: [Net 60, Net 60, Net 30, ON invoice, Net 60]
- Column: title_id
- Samples: [BU1032, PS2091, PC8888, PS2091, PS2091]
- Table: titleauthor
- Column: au_id
- Samples: [172-32-1176, 213-46-8915, 213-46-8915, 238-95-7766, 267-41-2394]
- Column: title_id
- Samples: [PS3333, BU1032, BU2075, PC1035, BU1111]
- Column: au_ord
- Samples: [1, 2, 1, 1, 2]
- Column: royaltyper
- Samples: [100, 40, 100, 100, 40]
| SELECT T1.notes FROM titles AS T1 INNER JOIN sales AS T2 ON T1.title_id = T2.title_id WHERE STRFTIME('%Y-%m-%d', T2.ord_date) = '1994-09-14' |
|
Solve the following sql problem:
List the type of the book for the order which was sold on 1993/5/29.
Schema:
SCHEMA:
- Table: authors
- Column: au_id
- Samples: [172-32-1176, 213-46-8915, 238-95-7766, 267-41-2394, 274-80-9391]
- Column: au_lname
- Samples: [White, Green, Carson, O'Leary, Straight]
- Column: au_fname
- Samples: [Johnson, Marjorie, Cheryl, Michael, Dean]
- Column: phone
- Samples: [408 496-7223, 415 986-7020, 415 548-7723, 408 286-2428, 415 834-2919]
- Column: address
- Samples: [10932 Bigge Rd., 309 63rd St. #411, 589 Darwin Ln., 22 Cleveland Av. #14, 5420 College Av.]
- Column: city
- Samples: [Menlo Park, Oakland, Berkeley, San Jose, Oakland]
- Column: state
- Samples: [CA, CA, CA, CA, CA]
- Column: zip
- Samples: [94025, 94618, 94705, 95128, 94609]
- Column: contract
- Samples: [0, 0, 0, 0, 0]
- Table: jobs
- Column: job_id
- Samples: [1, 2, 3, 4, 5]
- Column: job_desc
- Samples: [New Hire - Job not specified, Chief Executive Officer, Business Operations Manager, Chief Financial Officier, Publisher]
- Column: min_lvl
- Samples: [10, 200, 175, 175, 150]
- Column: max_lvl
- Samples: [10, 250, 225, 250, 250]
- Table: publishers
- Column: pub_id
- Samples: [0736, 0877, 1389, 1622, 1756]
- Column: pub_name
- Samples: [New Moon Books, Binnet & Hardley, Algodata Infosystems, Five Lakes Publishing, Ramona Publishers]
- Column: city
- Samples: [Boston, Washington, Berkeley, Chicago, Dallas]
- Column: state
- Samples: [MA, DC, CA, IL, TX]
- Column: country
- Samples: [USA, USA, USA, USA, USA]
- Table: employee
- Column: emp_id
- Samples: [A-C71970F, A-R89858F, AMD15433F, ARD36773F, CFH28514M]
- Column: fname
- Samples: [Aria, Annette, Ann, Anabela, Carlos]
- Column: minit
- Samples: [, , M, R, F]
- Column: lname
- Samples: [Cruz, Roulet, Devon, Domingues, Hernadez]
- Column: job_id
- Samples: [10, 6, 3, 8, 5]
- Column: job_lvl
- Samples: [87, 152, 200, 100, 211]
- Column: pub_id
- Samples: [1389, 9999, 9952, 0877, 9999]
- Column: hire_date
- Samples: [1991-10-26 00:00:00.0, 1990-02-21 00:00:00.0, 1991-07-16 00:00:00.0, 1993-01-27 00:00:00.0, 1989-04-21 00:00:00.0]
- Table: pub_info
- Column: pub_id
- Samples: [0877, 1389, 1622, 1756, 9901]
- Column: logo
- Samples: [0x4749463839618B002F00B30F00000000800000008000808000000080800080008080..., 0x474946383961C2001D00B30F00000000800000008000808000000080800080008080..., 0x474946383961F5003400B30F00000000800000008000808000000080800080008080..., 0x474946383961E3002500B30F00000000800000008000808000000080800080008080..., 0x4749463839615D002200B30F00000000800000008000808000000080800080008080... (truncated)]
- Column: pr_info
- Samples: [This is sample text data for Binnet & Hardley, publisher 0877 in the p..., This is sample text data for Algodata Infosystems, publisher 1389 in t..., This is sample text data for Five Lakes Publishing, publisher 1622 in ..., This is sample text data for Ramona Publishers, publisher 1756 in the ..., This is sample text data for GGG&G, publisher 9901 in the pubs databas... (truncated)]
- Table: stores
- Column: stor_id
- Samples: [6380, 7066, 7067, 7131, 7896]
- Column: stor_name
- Samples: [Eric the Read Books, Barnum's, News & Brews, Doc-U-Mat: Quality Laundry and Books, Fricative Bookshop]
- Column: stor_address
- Samples: [788 Catamaugus Ave., 567 Pasadena Ave., 577 First St., 24-A Avogadro Way, 89 Madison St.]
- Column: city
- Samples: [Seattle, Tustin, Los Gatos, Remulade, Fremont]
- Column: state
- Samples: [WA, CA, CA, WA, CA]
- Column: zip
- Samples: [98056, 92789, 96745, 98014, 90019]
- Table: discounts
- Column: discounttype
- Samples: [Initial Customer, Volume Discount, Customer Discount]
- Column: stor_id
- Samples: [None, None, 8042]
- Column: lowqty
- Samples: [None, 100, None]
- Column: highqty
- Samples: [None, 1000, None]
- Column: discount
- Samples: [10.5, 6.7, 5.0]
- Table: titles
- Column: title_id
- Samples: [BU1032, BU1111, BU2075, BU7832, MC2222]
- Column: title
- Samples: [The Busy Executive's Database Guide, Cooking with Computers: Surreptitious Balance Sheets, You Can Combat Computer Stress!, Straight Talk About Computers, Silicon Valley Gastronomic Treats]
- Column: type
- Samples: [business, business, business, business, mod_cook]
- Column: pub_id
- Samples: [1389, 1389, 0736, 1389, 0877]
- Column: price
- Samples: [19.99, 11.95, 2.99, 19.99, 19.99]
- Column: advance
- Samples: [5000.0, 5000.0, 10125.0, 5000.0, 0.0]
- Column: royalty
- Samples: [10, 10, 24, 10, 12]
- Column: ytd_sales
- Samples: [4095, 3876, 18722, 4095, 2032]
- Column: notes
- Samples: [An overview of available database systems with emphasis on common busi..., Helpful hints on how to use your electronic resources to the best adva..., The latest medical and psychological techniques for living with the el..., Annotated analysis of what computers can do for you: a no-hype guide f..., Favorite recipes for quick, easy, and elegant meals. (truncated)]
- Column: pubdate
- Samples: [1991-06-12 00:00:00.0, 1991-06-09 00:00:00.0, 1991-06-30 00:00:00.0, 1991-06-22 00:00:00.0, 1991-06-09 00:00:00.0]
- Table: roysched
- Column: title_id
- Samples: [BU1032, BU1032, PC1035, PC1035, PC1035]
- Column: lorange
- Samples: [0, 5001, 0, 2001, 3001]
- Column: hirange
- Samples: [5000, 50000, 2000, 3000, 4000]
- Column: royalty
- Samples: [10, 12, 10, 12, 14]
- Table: sales
- Column: stor_id
- Samples: [6380, 6380, 7066, 7066, 7067]
- Column: ord_num
- Samples: [6871, 722a, A2976, QA7442.3, D4482]
- Column: ord_date
- Samples: [1994-09-14 00:00:00.0, 1994-09-13 00:00:00.0, 1993-05-24 00:00:00.0, 1994-09-13 00:00:00.0, 1994-09-14 00:00:00.0]
- Column: qty
- Samples: [5, 3, 50, 75, 10]
- Column: payterms
- Samples: [Net 60, Net 60, Net 30, ON invoice, Net 60]
- Column: title_id
- Samples: [BU1032, PS2091, PC8888, PS2091, PS2091]
- Table: titleauthor
- Column: au_id
- Samples: [172-32-1176, 213-46-8915, 213-46-8915, 238-95-7766, 267-41-2394]
- Column: title_id
- Samples: [PS3333, BU1032, BU2075, PC1035, BU1111]
- Column: au_ord
- Samples: [1, 2, 1, 1, 2]
- Column: royaltyper
- Samples: [100, 40, 100, 100, 40]
| SELECT DISTINCT T1.type FROM titles AS T1 INNER JOIN sales AS T2 ON T1.title_id = T2.title_id WHERE STRFTIME('%Y-%m-%d', T2.ord_date) = '1993-05-29' |
|
Solve the following sql problem:
Tell me about the information of the French publisher.
Schema:
SCHEMA:
- Table: authors
- Column: au_id
- Samples: [172-32-1176, 213-46-8915, 238-95-7766, 267-41-2394, 274-80-9391]
- Column: au_lname
- Samples: [White, Green, Carson, O'Leary, Straight]
- Column: au_fname
- Samples: [Johnson, Marjorie, Cheryl, Michael, Dean]
- Column: phone
- Samples: [408 496-7223, 415 986-7020, 415 548-7723, 408 286-2428, 415 834-2919]
- Column: address
- Samples: [10932 Bigge Rd., 309 63rd St. #411, 589 Darwin Ln., 22 Cleveland Av. #14, 5420 College Av.]
- Column: city
- Samples: [Menlo Park, Oakland, Berkeley, San Jose, Oakland]
- Column: state
- Samples: [CA, CA, CA, CA, CA]
- Column: zip
- Samples: [94025, 94618, 94705, 95128, 94609]
- Column: contract
- Samples: [0, 0, 0, 0, 0]
- Table: jobs
- Column: job_id
- Samples: [1, 2, 3, 4, 5]
- Column: job_desc
- Samples: [New Hire - Job not specified, Chief Executive Officer, Business Operations Manager, Chief Financial Officier, Publisher]
- Column: min_lvl
- Samples: [10, 200, 175, 175, 150]
- Column: max_lvl
- Samples: [10, 250, 225, 250, 250]
- Table: publishers
- Column: pub_id
- Samples: [0736, 0877, 1389, 1622, 1756]
- Column: pub_name
- Samples: [New Moon Books, Binnet & Hardley, Algodata Infosystems, Five Lakes Publishing, Ramona Publishers]
- Column: city
- Samples: [Boston, Washington, Berkeley, Chicago, Dallas]
- Column: state
- Samples: [MA, DC, CA, IL, TX]
- Column: country
- Samples: [USA, USA, USA, USA, USA]
- Table: employee
- Column: emp_id
- Samples: [A-C71970F, A-R89858F, AMD15433F, ARD36773F, CFH28514M]
- Column: fname
- Samples: [Aria, Annette, Ann, Anabela, Carlos]
- Column: minit
- Samples: [, , M, R, F]
- Column: lname
- Samples: [Cruz, Roulet, Devon, Domingues, Hernadez]
- Column: job_id
- Samples: [10, 6, 3, 8, 5]
- Column: job_lvl
- Samples: [87, 152, 200, 100, 211]
- Column: pub_id
- Samples: [1389, 9999, 9952, 0877, 9999]
- Column: hire_date
- Samples: [1991-10-26 00:00:00.0, 1990-02-21 00:00:00.0, 1991-07-16 00:00:00.0, 1993-01-27 00:00:00.0, 1989-04-21 00:00:00.0]
- Table: pub_info
- Column: pub_id
- Samples: [0877, 1389, 1622, 1756, 9901]
- Column: logo
- Samples: [0x4749463839618B002F00B30F00000000800000008000808000000080800080008080..., 0x474946383961C2001D00B30F00000000800000008000808000000080800080008080..., 0x474946383961F5003400B30F00000000800000008000808000000080800080008080..., 0x474946383961E3002500B30F00000000800000008000808000000080800080008080..., 0x4749463839615D002200B30F00000000800000008000808000000080800080008080... (truncated)]
- Column: pr_info
- Samples: [This is sample text data for Binnet & Hardley, publisher 0877 in the p..., This is sample text data for Algodata Infosystems, publisher 1389 in t..., This is sample text data for Five Lakes Publishing, publisher 1622 in ..., This is sample text data for Ramona Publishers, publisher 1756 in the ..., This is sample text data for GGG&G, publisher 9901 in the pubs databas... (truncated)]
- Table: stores
- Column: stor_id
- Samples: [6380, 7066, 7067, 7131, 7896]
- Column: stor_name
- Samples: [Eric the Read Books, Barnum's, News & Brews, Doc-U-Mat: Quality Laundry and Books, Fricative Bookshop]
- Column: stor_address
- Samples: [788 Catamaugus Ave., 567 Pasadena Ave., 577 First St., 24-A Avogadro Way, 89 Madison St.]
- Column: city
- Samples: [Seattle, Tustin, Los Gatos, Remulade, Fremont]
- Column: state
- Samples: [WA, CA, CA, WA, CA]
- Column: zip
- Samples: [98056, 92789, 96745, 98014, 90019]
- Table: discounts
- Column: discounttype
- Samples: [Initial Customer, Volume Discount, Customer Discount]
- Column: stor_id
- Samples: [None, None, 8042]
- Column: lowqty
- Samples: [None, 100, None]
- Column: highqty
- Samples: [None, 1000, None]
- Column: discount
- Samples: [10.5, 6.7, 5.0]
- Table: titles
- Column: title_id
- Samples: [BU1032, BU1111, BU2075, BU7832, MC2222]
- Column: title
- Samples: [The Busy Executive's Database Guide, Cooking with Computers: Surreptitious Balance Sheets, You Can Combat Computer Stress!, Straight Talk About Computers, Silicon Valley Gastronomic Treats]
- Column: type
- Samples: [business, business, business, business, mod_cook]
- Column: pub_id
- Samples: [1389, 1389, 0736, 1389, 0877]
- Column: price
- Samples: [19.99, 11.95, 2.99, 19.99, 19.99]
- Column: advance
- Samples: [5000.0, 5000.0, 10125.0, 5000.0, 0.0]
- Column: royalty
- Samples: [10, 10, 24, 10, 12]
- Column: ytd_sales
- Samples: [4095, 3876, 18722, 4095, 2032]
- Column: notes
- Samples: [An overview of available database systems with emphasis on common busi..., Helpful hints on how to use your electronic resources to the best adva..., The latest medical and psychological techniques for living with the el..., Annotated analysis of what computers can do for you: a no-hype guide f..., Favorite recipes for quick, easy, and elegant meals. (truncated)]
- Column: pubdate
- Samples: [1991-06-12 00:00:00.0, 1991-06-09 00:00:00.0, 1991-06-30 00:00:00.0, 1991-06-22 00:00:00.0, 1991-06-09 00:00:00.0]
- Table: roysched
- Column: title_id
- Samples: [BU1032, BU1032, PC1035, PC1035, PC1035]
- Column: lorange
- Samples: [0, 5001, 0, 2001, 3001]
- Column: hirange
- Samples: [5000, 50000, 2000, 3000, 4000]
- Column: royalty
- Samples: [10, 12, 10, 12, 14]
- Table: sales
- Column: stor_id
- Samples: [6380, 6380, 7066, 7066, 7067]
- Column: ord_num
- Samples: [6871, 722a, A2976, QA7442.3, D4482]
- Column: ord_date
- Samples: [1994-09-14 00:00:00.0, 1994-09-13 00:00:00.0, 1993-05-24 00:00:00.0, 1994-09-13 00:00:00.0, 1994-09-14 00:00:00.0]
- Column: qty
- Samples: [5, 3, 50, 75, 10]
- Column: payterms
- Samples: [Net 60, Net 60, Net 30, ON invoice, Net 60]
- Column: title_id
- Samples: [BU1032, PS2091, PC8888, PS2091, PS2091]
- Table: titleauthor
- Column: au_id
- Samples: [172-32-1176, 213-46-8915, 213-46-8915, 238-95-7766, 267-41-2394]
- Column: title_id
- Samples: [PS3333, BU1032, BU2075, PC1035, BU1111]
- Column: au_ord
- Samples: [1, 2, 1, 1, 2]
- Column: royaltyper
- Samples: [100, 40, 100, 100, 40]
| SELECT T1.pr_info FROM pub_info AS T1 INNER JOIN publishers AS T2 ON T1.pub_id = T2.pub_id WHERE T2.country = 'France' |
|
Solve the following sql problem:
What's the publisher of the book "Silicon Valley Gastronomic Treats"? Give the publisher's name.
Schema:
SCHEMA:
- Table: authors
- Column: au_id
- Samples: [172-32-1176, 213-46-8915, 238-95-7766, 267-41-2394, 274-80-9391]
- Column: au_lname
- Samples: [White, Green, Carson, O'Leary, Straight]
- Column: au_fname
- Samples: [Johnson, Marjorie, Cheryl, Michael, Dean]
- Column: phone
- Samples: [408 496-7223, 415 986-7020, 415 548-7723, 408 286-2428, 415 834-2919]
- Column: address
- Samples: [10932 Bigge Rd., 309 63rd St. #411, 589 Darwin Ln., 22 Cleveland Av. #14, 5420 College Av.]
- Column: city
- Samples: [Menlo Park, Oakland, Berkeley, San Jose, Oakland]
- Column: state
- Samples: [CA, CA, CA, CA, CA]
- Column: zip
- Samples: [94025, 94618, 94705, 95128, 94609]
- Column: contract
- Samples: [0, 0, 0, 0, 0]
- Table: jobs
- Column: job_id
- Samples: [1, 2, 3, 4, 5]
- Column: job_desc
- Samples: [New Hire - Job not specified, Chief Executive Officer, Business Operations Manager, Chief Financial Officier, Publisher]
- Column: min_lvl
- Samples: [10, 200, 175, 175, 150]
- Column: max_lvl
- Samples: [10, 250, 225, 250, 250]
- Table: publishers
- Column: pub_id
- Samples: [0736, 0877, 1389, 1622, 1756]
- Column: pub_name
- Samples: [New Moon Books, Binnet & Hardley, Algodata Infosystems, Five Lakes Publishing, Ramona Publishers]
- Column: city
- Samples: [Boston, Washington, Berkeley, Chicago, Dallas]
- Column: state
- Samples: [MA, DC, CA, IL, TX]
- Column: country
- Samples: [USA, USA, USA, USA, USA]
- Table: employee
- Column: emp_id
- Samples: [A-C71970F, A-R89858F, AMD15433F, ARD36773F, CFH28514M]
- Column: fname
- Samples: [Aria, Annette, Ann, Anabela, Carlos]
- Column: minit
- Samples: [, , M, R, F]
- Column: lname
- Samples: [Cruz, Roulet, Devon, Domingues, Hernadez]
- Column: job_id
- Samples: [10, 6, 3, 8, 5]
- Column: job_lvl
- Samples: [87, 152, 200, 100, 211]
- Column: pub_id
- Samples: [1389, 9999, 9952, 0877, 9999]
- Column: hire_date
- Samples: [1991-10-26 00:00:00.0, 1990-02-21 00:00:00.0, 1991-07-16 00:00:00.0, 1993-01-27 00:00:00.0, 1989-04-21 00:00:00.0]
- Table: pub_info
- Column: pub_id
- Samples: [0877, 1389, 1622, 1756, 9901]
- Column: logo
- Samples: [0x4749463839618B002F00B30F00000000800000008000808000000080800080008080..., 0x474946383961C2001D00B30F00000000800000008000808000000080800080008080..., 0x474946383961F5003400B30F00000000800000008000808000000080800080008080..., 0x474946383961E3002500B30F00000000800000008000808000000080800080008080..., 0x4749463839615D002200B30F00000000800000008000808000000080800080008080... (truncated)]
- Column: pr_info
- Samples: [This is sample text data for Binnet & Hardley, publisher 0877 in the p..., This is sample text data for Algodata Infosystems, publisher 1389 in t..., This is sample text data for Five Lakes Publishing, publisher 1622 in ..., This is sample text data for Ramona Publishers, publisher 1756 in the ..., This is sample text data for GGG&G, publisher 9901 in the pubs databas... (truncated)]
- Table: stores
- Column: stor_id
- Samples: [6380, 7066, 7067, 7131, 7896]
- Column: stor_name
- Samples: [Eric the Read Books, Barnum's, News & Brews, Doc-U-Mat: Quality Laundry and Books, Fricative Bookshop]
- Column: stor_address
- Samples: [788 Catamaugus Ave., 567 Pasadena Ave., 577 First St., 24-A Avogadro Way, 89 Madison St.]
- Column: city
- Samples: [Seattle, Tustin, Los Gatos, Remulade, Fremont]
- Column: state
- Samples: [WA, CA, CA, WA, CA]
- Column: zip
- Samples: [98056, 92789, 96745, 98014, 90019]
- Table: discounts
- Column: discounttype
- Samples: [Initial Customer, Volume Discount, Customer Discount]
- Column: stor_id
- Samples: [None, None, 8042]
- Column: lowqty
- Samples: [None, 100, None]
- Column: highqty
- Samples: [None, 1000, None]
- Column: discount
- Samples: [10.5, 6.7, 5.0]
- Table: titles
- Column: title_id
- Samples: [BU1032, BU1111, BU2075, BU7832, MC2222]
- Column: title
- Samples: [The Busy Executive's Database Guide, Cooking with Computers: Surreptitious Balance Sheets, You Can Combat Computer Stress!, Straight Talk About Computers, Silicon Valley Gastronomic Treats]
- Column: type
- Samples: [business, business, business, business, mod_cook]
- Column: pub_id
- Samples: [1389, 1389, 0736, 1389, 0877]
- Column: price
- Samples: [19.99, 11.95, 2.99, 19.99, 19.99]
- Column: advance
- Samples: [5000.0, 5000.0, 10125.0, 5000.0, 0.0]
- Column: royalty
- Samples: [10, 10, 24, 10, 12]
- Column: ytd_sales
- Samples: [4095, 3876, 18722, 4095, 2032]
- Column: notes
- Samples: [An overview of available database systems with emphasis on common busi..., Helpful hints on how to use your electronic resources to the best adva..., The latest medical and psychological techniques for living with the el..., Annotated analysis of what computers can do for you: a no-hype guide f..., Favorite recipes for quick, easy, and elegant meals. (truncated)]
- Column: pubdate
- Samples: [1991-06-12 00:00:00.0, 1991-06-09 00:00:00.0, 1991-06-30 00:00:00.0, 1991-06-22 00:00:00.0, 1991-06-09 00:00:00.0]
- Table: roysched
- Column: title_id
- Samples: [BU1032, BU1032, PC1035, PC1035, PC1035]
- Column: lorange
- Samples: [0, 5001, 0, 2001, 3001]
- Column: hirange
- Samples: [5000, 50000, 2000, 3000, 4000]
- Column: royalty
- Samples: [10, 12, 10, 12, 14]
- Table: sales
- Column: stor_id
- Samples: [6380, 6380, 7066, 7066, 7067]
- Column: ord_num
- Samples: [6871, 722a, A2976, QA7442.3, D4482]
- Column: ord_date
- Samples: [1994-09-14 00:00:00.0, 1994-09-13 00:00:00.0, 1993-05-24 00:00:00.0, 1994-09-13 00:00:00.0, 1994-09-14 00:00:00.0]
- Column: qty
- Samples: [5, 3, 50, 75, 10]
- Column: payterms
- Samples: [Net 60, Net 60, Net 30, ON invoice, Net 60]
- Column: title_id
- Samples: [BU1032, PS2091, PC8888, PS2091, PS2091]
- Table: titleauthor
- Column: au_id
- Samples: [172-32-1176, 213-46-8915, 213-46-8915, 238-95-7766, 267-41-2394]
- Column: title_id
- Samples: [PS3333, BU1032, BU2075, PC1035, BU1111]
- Column: au_ord
- Samples: [1, 2, 1, 1, 2]
- Column: royaltyper
- Samples: [100, 40, 100, 100, 40]
| SELECT T2.pub_name FROM titles AS T1 INNER JOIN publishers AS T2 ON T1.pub_id = T2.pub_id WHERE T1.title = 'Silicon Valley Gastronomic Treats' |
|
Solve the following sql problem:
Which city did Victoria P Ashworth work in?
Schema:
SCHEMA:
- Table: authors
- Column: au_id
- Samples: [172-32-1176, 213-46-8915, 238-95-7766, 267-41-2394, 274-80-9391]
- Column: au_lname
- Samples: [White, Green, Carson, O'Leary, Straight]
- Column: au_fname
- Samples: [Johnson, Marjorie, Cheryl, Michael, Dean]
- Column: phone
- Samples: [408 496-7223, 415 986-7020, 415 548-7723, 408 286-2428, 415 834-2919]
- Column: address
- Samples: [10932 Bigge Rd., 309 63rd St. #411, 589 Darwin Ln., 22 Cleveland Av. #14, 5420 College Av.]
- Column: city
- Samples: [Menlo Park, Oakland, Berkeley, San Jose, Oakland]
- Column: state
- Samples: [CA, CA, CA, CA, CA]
- Column: zip
- Samples: [94025, 94618, 94705, 95128, 94609]
- Column: contract
- Samples: [0, 0, 0, 0, 0]
- Table: jobs
- Column: job_id
- Samples: [1, 2, 3, 4, 5]
- Column: job_desc
- Samples: [New Hire - Job not specified, Chief Executive Officer, Business Operations Manager, Chief Financial Officier, Publisher]
- Column: min_lvl
- Samples: [10, 200, 175, 175, 150]
- Column: max_lvl
- Samples: [10, 250, 225, 250, 250]
- Table: publishers
- Column: pub_id
- Samples: [0736, 0877, 1389, 1622, 1756]
- Column: pub_name
- Samples: [New Moon Books, Binnet & Hardley, Algodata Infosystems, Five Lakes Publishing, Ramona Publishers]
- Column: city
- Samples: [Boston, Washington, Berkeley, Chicago, Dallas]
- Column: state
- Samples: [MA, DC, CA, IL, TX]
- Column: country
- Samples: [USA, USA, USA, USA, USA]
- Table: employee
- Column: emp_id
- Samples: [A-C71970F, A-R89858F, AMD15433F, ARD36773F, CFH28514M]
- Column: fname
- Samples: [Aria, Annette, Ann, Anabela, Carlos]
- Column: minit
- Samples: [, , M, R, F]
- Column: lname
- Samples: [Cruz, Roulet, Devon, Domingues, Hernadez]
- Column: job_id
- Samples: [10, 6, 3, 8, 5]
- Column: job_lvl
- Samples: [87, 152, 200, 100, 211]
- Column: pub_id
- Samples: [1389, 9999, 9952, 0877, 9999]
- Column: hire_date
- Samples: [1991-10-26 00:00:00.0, 1990-02-21 00:00:00.0, 1991-07-16 00:00:00.0, 1993-01-27 00:00:00.0, 1989-04-21 00:00:00.0]
- Table: pub_info
- Column: pub_id
- Samples: [0877, 1389, 1622, 1756, 9901]
- Column: logo
- Samples: [0x4749463839618B002F00B30F00000000800000008000808000000080800080008080..., 0x474946383961C2001D00B30F00000000800000008000808000000080800080008080..., 0x474946383961F5003400B30F00000000800000008000808000000080800080008080..., 0x474946383961E3002500B30F00000000800000008000808000000080800080008080..., 0x4749463839615D002200B30F00000000800000008000808000000080800080008080... (truncated)]
- Column: pr_info
- Samples: [This is sample text data for Binnet & Hardley, publisher 0877 in the p..., This is sample text data for Algodata Infosystems, publisher 1389 in t..., This is sample text data for Five Lakes Publishing, publisher 1622 in ..., This is sample text data for Ramona Publishers, publisher 1756 in the ..., This is sample text data for GGG&G, publisher 9901 in the pubs databas... (truncated)]
- Table: stores
- Column: stor_id
- Samples: [6380, 7066, 7067, 7131, 7896]
- Column: stor_name
- Samples: [Eric the Read Books, Barnum's, News & Brews, Doc-U-Mat: Quality Laundry and Books, Fricative Bookshop]
- Column: stor_address
- Samples: [788 Catamaugus Ave., 567 Pasadena Ave., 577 First St., 24-A Avogadro Way, 89 Madison St.]
- Column: city
- Samples: [Seattle, Tustin, Los Gatos, Remulade, Fremont]
- Column: state
- Samples: [WA, CA, CA, WA, CA]
- Column: zip
- Samples: [98056, 92789, 96745, 98014, 90019]
- Table: discounts
- Column: discounttype
- Samples: [Initial Customer, Volume Discount, Customer Discount]
- Column: stor_id
- Samples: [None, None, 8042]
- Column: lowqty
- Samples: [None, 100, None]
- Column: highqty
- Samples: [None, 1000, None]
- Column: discount
- Samples: [10.5, 6.7, 5.0]
- Table: titles
- Column: title_id
- Samples: [BU1032, BU1111, BU2075, BU7832, MC2222]
- Column: title
- Samples: [The Busy Executive's Database Guide, Cooking with Computers: Surreptitious Balance Sheets, You Can Combat Computer Stress!, Straight Talk About Computers, Silicon Valley Gastronomic Treats]
- Column: type
- Samples: [business, business, business, business, mod_cook]
- Column: pub_id
- Samples: [1389, 1389, 0736, 1389, 0877]
- Column: price
- Samples: [19.99, 11.95, 2.99, 19.99, 19.99]
- Column: advance
- Samples: [5000.0, 5000.0, 10125.0, 5000.0, 0.0]
- Column: royalty
- Samples: [10, 10, 24, 10, 12]
- Column: ytd_sales
- Samples: [4095, 3876, 18722, 4095, 2032]
- Column: notes
- Samples: [An overview of available database systems with emphasis on common busi..., Helpful hints on how to use your electronic resources to the best adva..., The latest medical and psychological techniques for living with the el..., Annotated analysis of what computers can do for you: a no-hype guide f..., Favorite recipes for quick, easy, and elegant meals. (truncated)]
- Column: pubdate
- Samples: [1991-06-12 00:00:00.0, 1991-06-09 00:00:00.0, 1991-06-30 00:00:00.0, 1991-06-22 00:00:00.0, 1991-06-09 00:00:00.0]
- Table: roysched
- Column: title_id
- Samples: [BU1032, BU1032, PC1035, PC1035, PC1035]
- Column: lorange
- Samples: [0, 5001, 0, 2001, 3001]
- Column: hirange
- Samples: [5000, 50000, 2000, 3000, 4000]
- Column: royalty
- Samples: [10, 12, 10, 12, 14]
- Table: sales
- Column: stor_id
- Samples: [6380, 6380, 7066, 7066, 7067]
- Column: ord_num
- Samples: [6871, 722a, A2976, QA7442.3, D4482]
- Column: ord_date
- Samples: [1994-09-14 00:00:00.0, 1994-09-13 00:00:00.0, 1993-05-24 00:00:00.0, 1994-09-13 00:00:00.0, 1994-09-14 00:00:00.0]
- Column: qty
- Samples: [5, 3, 50, 75, 10]
- Column: payterms
- Samples: [Net 60, Net 60, Net 30, ON invoice, Net 60]
- Column: title_id
- Samples: [BU1032, PS2091, PC8888, PS2091, PS2091]
- Table: titleauthor
- Column: au_id
- Samples: [172-32-1176, 213-46-8915, 213-46-8915, 238-95-7766, 267-41-2394]
- Column: title_id
- Samples: [PS3333, BU1032, BU2075, PC1035, BU1111]
- Column: au_ord
- Samples: [1, 2, 1, 1, 2]
- Column: royaltyper
- Samples: [100, 40, 100, 100, 40]
| SELECT T2.city FROM employee AS T1 INNER JOIN publishers AS T2 ON T1.pub_id = T2.pub_id WHERE T1.fname = 'Victoria' AND T1.minit = 'P' AND T1.lname = 'Ashworth' |
|
Solve the following sql problem:
How many sales did the store in Remulade make?
Schema:
SCHEMA:
- Table: authors
- Column: au_id
- Samples: [172-32-1176, 213-46-8915, 238-95-7766, 267-41-2394, 274-80-9391]
- Column: au_lname
- Samples: [White, Green, Carson, O'Leary, Straight]
- Column: au_fname
- Samples: [Johnson, Marjorie, Cheryl, Michael, Dean]
- Column: phone
- Samples: [408 496-7223, 415 986-7020, 415 548-7723, 408 286-2428, 415 834-2919]
- Column: address
- Samples: [10932 Bigge Rd., 309 63rd St. #411, 589 Darwin Ln., 22 Cleveland Av. #14, 5420 College Av.]
- Column: city
- Samples: [Menlo Park, Oakland, Berkeley, San Jose, Oakland]
- Column: state
- Samples: [CA, CA, CA, CA, CA]
- Column: zip
- Samples: [94025, 94618, 94705, 95128, 94609]
- Column: contract
- Samples: [0, 0, 0, 0, 0]
- Table: jobs
- Column: job_id
- Samples: [1, 2, 3, 4, 5]
- Column: job_desc
- Samples: [New Hire - Job not specified, Chief Executive Officer, Business Operations Manager, Chief Financial Officier, Publisher]
- Column: min_lvl
- Samples: [10, 200, 175, 175, 150]
- Column: max_lvl
- Samples: [10, 250, 225, 250, 250]
- Table: publishers
- Column: pub_id
- Samples: [0736, 0877, 1389, 1622, 1756]
- Column: pub_name
- Samples: [New Moon Books, Binnet & Hardley, Algodata Infosystems, Five Lakes Publishing, Ramona Publishers]
- Column: city
- Samples: [Boston, Washington, Berkeley, Chicago, Dallas]
- Column: state
- Samples: [MA, DC, CA, IL, TX]
- Column: country
- Samples: [USA, USA, USA, USA, USA]
- Table: employee
- Column: emp_id
- Samples: [A-C71970F, A-R89858F, AMD15433F, ARD36773F, CFH28514M]
- Column: fname
- Samples: [Aria, Annette, Ann, Anabela, Carlos]
- Column: minit
- Samples: [, , M, R, F]
- Column: lname
- Samples: [Cruz, Roulet, Devon, Domingues, Hernadez]
- Column: job_id
- Samples: [10, 6, 3, 8, 5]
- Column: job_lvl
- Samples: [87, 152, 200, 100, 211]
- Column: pub_id
- Samples: [1389, 9999, 9952, 0877, 9999]
- Column: hire_date
- Samples: [1991-10-26 00:00:00.0, 1990-02-21 00:00:00.0, 1991-07-16 00:00:00.0, 1993-01-27 00:00:00.0, 1989-04-21 00:00:00.0]
- Table: pub_info
- Column: pub_id
- Samples: [0877, 1389, 1622, 1756, 9901]
- Column: logo
- Samples: [0x4749463839618B002F00B30F00000000800000008000808000000080800080008080..., 0x474946383961C2001D00B30F00000000800000008000808000000080800080008080..., 0x474946383961F5003400B30F00000000800000008000808000000080800080008080..., 0x474946383961E3002500B30F00000000800000008000808000000080800080008080..., 0x4749463839615D002200B30F00000000800000008000808000000080800080008080... (truncated)]
- Column: pr_info
- Samples: [This is sample text data for Binnet & Hardley, publisher 0877 in the p..., This is sample text data for Algodata Infosystems, publisher 1389 in t..., This is sample text data for Five Lakes Publishing, publisher 1622 in ..., This is sample text data for Ramona Publishers, publisher 1756 in the ..., This is sample text data for GGG&G, publisher 9901 in the pubs databas... (truncated)]
- Table: stores
- Column: stor_id
- Samples: [6380, 7066, 7067, 7131, 7896]
- Column: stor_name
- Samples: [Eric the Read Books, Barnum's, News & Brews, Doc-U-Mat: Quality Laundry and Books, Fricative Bookshop]
- Column: stor_address
- Samples: [788 Catamaugus Ave., 567 Pasadena Ave., 577 First St., 24-A Avogadro Way, 89 Madison St.]
- Column: city
- Samples: [Seattle, Tustin, Los Gatos, Remulade, Fremont]
- Column: state
- Samples: [WA, CA, CA, WA, CA]
- Column: zip
- Samples: [98056, 92789, 96745, 98014, 90019]
- Table: discounts
- Column: discounttype
- Samples: [Initial Customer, Volume Discount, Customer Discount]
- Column: stor_id
- Samples: [None, None, 8042]
- Column: lowqty
- Samples: [None, 100, None]
- Column: highqty
- Samples: [None, 1000, None]
- Column: discount
- Samples: [10.5, 6.7, 5.0]
- Table: titles
- Column: title_id
- Samples: [BU1032, BU1111, BU2075, BU7832, MC2222]
- Column: title
- Samples: [The Busy Executive's Database Guide, Cooking with Computers: Surreptitious Balance Sheets, You Can Combat Computer Stress!, Straight Talk About Computers, Silicon Valley Gastronomic Treats]
- Column: type
- Samples: [business, business, business, business, mod_cook]
- Column: pub_id
- Samples: [1389, 1389, 0736, 1389, 0877]
- Column: price
- Samples: [19.99, 11.95, 2.99, 19.99, 19.99]
- Column: advance
- Samples: [5000.0, 5000.0, 10125.0, 5000.0, 0.0]
- Column: royalty
- Samples: [10, 10, 24, 10, 12]
- Column: ytd_sales
- Samples: [4095, 3876, 18722, 4095, 2032]
- Column: notes
- Samples: [An overview of available database systems with emphasis on common busi..., Helpful hints on how to use your electronic resources to the best adva..., The latest medical and psychological techniques for living with the el..., Annotated analysis of what computers can do for you: a no-hype guide f..., Favorite recipes for quick, easy, and elegant meals. (truncated)]
- Column: pubdate
- Samples: [1991-06-12 00:00:00.0, 1991-06-09 00:00:00.0, 1991-06-30 00:00:00.0, 1991-06-22 00:00:00.0, 1991-06-09 00:00:00.0]
- Table: roysched
- Column: title_id
- Samples: [BU1032, BU1032, PC1035, PC1035, PC1035]
- Column: lorange
- Samples: [0, 5001, 0, 2001, 3001]
- Column: hirange
- Samples: [5000, 50000, 2000, 3000, 4000]
- Column: royalty
- Samples: [10, 12, 10, 12, 14]
- Table: sales
- Column: stor_id
- Samples: [6380, 6380, 7066, 7066, 7067]
- Column: ord_num
- Samples: [6871, 722a, A2976, QA7442.3, D4482]
- Column: ord_date
- Samples: [1994-09-14 00:00:00.0, 1994-09-13 00:00:00.0, 1993-05-24 00:00:00.0, 1994-09-13 00:00:00.0, 1994-09-14 00:00:00.0]
- Column: qty
- Samples: [5, 3, 50, 75, 10]
- Column: payterms
- Samples: [Net 60, Net 60, Net 30, ON invoice, Net 60]
- Column: title_id
- Samples: [BU1032, PS2091, PC8888, PS2091, PS2091]
- Table: titleauthor
- Column: au_id
- Samples: [172-32-1176, 213-46-8915, 213-46-8915, 238-95-7766, 267-41-2394]
- Column: title_id
- Samples: [PS3333, BU1032, BU2075, PC1035, BU1111]
- Column: au_ord
- Samples: [1, 2, 1, 1, 2]
- Column: royaltyper
- Samples: [100, 40, 100, 100, 40]
| SELECT COUNT(T1.ord_num) FROM sales AS T1 INNER JOIN stores AS T2 ON T1.stor_id = T2.stor_id WHERE T2.city = 'Remulade' |
|
Solve the following sql problem:
For the quantities, what percent more did the store in Fremont sell than the store in Portland in 1993?
Schema:
SCHEMA:
- Table: authors
- Column: au_id
- Samples: [172-32-1176, 213-46-8915, 238-95-7766, 267-41-2394, 274-80-9391]
- Column: au_lname
- Samples: [White, Green, Carson, O'Leary, Straight]
- Column: au_fname
- Samples: [Johnson, Marjorie, Cheryl, Michael, Dean]
- Column: phone
- Samples: [408 496-7223, 415 986-7020, 415 548-7723, 408 286-2428, 415 834-2919]
- Column: address
- Samples: [10932 Bigge Rd., 309 63rd St. #411, 589 Darwin Ln., 22 Cleveland Av. #14, 5420 College Av.]
- Column: city
- Samples: [Menlo Park, Oakland, Berkeley, San Jose, Oakland]
- Column: state
- Samples: [CA, CA, CA, CA, CA]
- Column: zip
- Samples: [94025, 94618, 94705, 95128, 94609]
- Column: contract
- Samples: [0, 0, 0, 0, 0]
- Table: jobs
- Column: job_id
- Samples: [1, 2, 3, 4, 5]
- Column: job_desc
- Samples: [New Hire - Job not specified, Chief Executive Officer, Business Operations Manager, Chief Financial Officier, Publisher]
- Column: min_lvl
- Samples: [10, 200, 175, 175, 150]
- Column: max_lvl
- Samples: [10, 250, 225, 250, 250]
- Table: publishers
- Column: pub_id
- Samples: [0736, 0877, 1389, 1622, 1756]
- Column: pub_name
- Samples: [New Moon Books, Binnet & Hardley, Algodata Infosystems, Five Lakes Publishing, Ramona Publishers]
- Column: city
- Samples: [Boston, Washington, Berkeley, Chicago, Dallas]
- Column: state
- Samples: [MA, DC, CA, IL, TX]
- Column: country
- Samples: [USA, USA, USA, USA, USA]
- Table: employee
- Column: emp_id
- Samples: [A-C71970F, A-R89858F, AMD15433F, ARD36773F, CFH28514M]
- Column: fname
- Samples: [Aria, Annette, Ann, Anabela, Carlos]
- Column: minit
- Samples: [, , M, R, F]
- Column: lname
- Samples: [Cruz, Roulet, Devon, Domingues, Hernadez]
- Column: job_id
- Samples: [10, 6, 3, 8, 5]
- Column: job_lvl
- Samples: [87, 152, 200, 100, 211]
- Column: pub_id
- Samples: [1389, 9999, 9952, 0877, 9999]
- Column: hire_date
- Samples: [1991-10-26 00:00:00.0, 1990-02-21 00:00:00.0, 1991-07-16 00:00:00.0, 1993-01-27 00:00:00.0, 1989-04-21 00:00:00.0]
- Table: pub_info
- Column: pub_id
- Samples: [0877, 1389, 1622, 1756, 9901]
- Column: logo
- Samples: [0x4749463839618B002F00B30F00000000800000008000808000000080800080008080..., 0x474946383961C2001D00B30F00000000800000008000808000000080800080008080..., 0x474946383961F5003400B30F00000000800000008000808000000080800080008080..., 0x474946383961E3002500B30F00000000800000008000808000000080800080008080..., 0x4749463839615D002200B30F00000000800000008000808000000080800080008080... (truncated)]
- Column: pr_info
- Samples: [This is sample text data for Binnet & Hardley, publisher 0877 in the p..., This is sample text data for Algodata Infosystems, publisher 1389 in t..., This is sample text data for Five Lakes Publishing, publisher 1622 in ..., This is sample text data for Ramona Publishers, publisher 1756 in the ..., This is sample text data for GGG&G, publisher 9901 in the pubs databas... (truncated)]
- Table: stores
- Column: stor_id
- Samples: [6380, 7066, 7067, 7131, 7896]
- Column: stor_name
- Samples: [Eric the Read Books, Barnum's, News & Brews, Doc-U-Mat: Quality Laundry and Books, Fricative Bookshop]
- Column: stor_address
- Samples: [788 Catamaugus Ave., 567 Pasadena Ave., 577 First St., 24-A Avogadro Way, 89 Madison St.]
- Column: city
- Samples: [Seattle, Tustin, Los Gatos, Remulade, Fremont]
- Column: state
- Samples: [WA, CA, CA, WA, CA]
- Column: zip
- Samples: [98056, 92789, 96745, 98014, 90019]
- Table: discounts
- Column: discounttype
- Samples: [Initial Customer, Volume Discount, Customer Discount]
- Column: stor_id
- Samples: [None, None, 8042]
- Column: lowqty
- Samples: [None, 100, None]
- Column: highqty
- Samples: [None, 1000, None]
- Column: discount
- Samples: [10.5, 6.7, 5.0]
- Table: titles
- Column: title_id
- Samples: [BU1032, BU1111, BU2075, BU7832, MC2222]
- Column: title
- Samples: [The Busy Executive's Database Guide, Cooking with Computers: Surreptitious Balance Sheets, You Can Combat Computer Stress!, Straight Talk About Computers, Silicon Valley Gastronomic Treats]
- Column: type
- Samples: [business, business, business, business, mod_cook]
- Column: pub_id
- Samples: [1389, 1389, 0736, 1389, 0877]
- Column: price
- Samples: [19.99, 11.95, 2.99, 19.99, 19.99]
- Column: advance
- Samples: [5000.0, 5000.0, 10125.0, 5000.0, 0.0]
- Column: royalty
- Samples: [10, 10, 24, 10, 12]
- Column: ytd_sales
- Samples: [4095, 3876, 18722, 4095, 2032]
- Column: notes
- Samples: [An overview of available database systems with emphasis on common busi..., Helpful hints on how to use your electronic resources to the best adva..., The latest medical and psychological techniques for living with the el..., Annotated analysis of what computers can do for you: a no-hype guide f..., Favorite recipes for quick, easy, and elegant meals. (truncated)]
- Column: pubdate
- Samples: [1991-06-12 00:00:00.0, 1991-06-09 00:00:00.0, 1991-06-30 00:00:00.0, 1991-06-22 00:00:00.0, 1991-06-09 00:00:00.0]
- Table: roysched
- Column: title_id
- Samples: [BU1032, BU1032, PC1035, PC1035, PC1035]
- Column: lorange
- Samples: [0, 5001, 0, 2001, 3001]
- Column: hirange
- Samples: [5000, 50000, 2000, 3000, 4000]
- Column: royalty
- Samples: [10, 12, 10, 12, 14]
- Table: sales
- Column: stor_id
- Samples: [6380, 6380, 7066, 7066, 7067]
- Column: ord_num
- Samples: [6871, 722a, A2976, QA7442.3, D4482]
- Column: ord_date
- Samples: [1994-09-14 00:00:00.0, 1994-09-13 00:00:00.0, 1993-05-24 00:00:00.0, 1994-09-13 00:00:00.0, 1994-09-14 00:00:00.0]
- Column: qty
- Samples: [5, 3, 50, 75, 10]
- Column: payterms
- Samples: [Net 60, Net 60, Net 30, ON invoice, Net 60]
- Column: title_id
- Samples: [BU1032, PS2091, PC8888, PS2091, PS2091]
- Table: titleauthor
- Column: au_id
- Samples: [172-32-1176, 213-46-8915, 213-46-8915, 238-95-7766, 267-41-2394]
- Column: title_id
- Samples: [PS3333, BU1032, BU2075, PC1035, BU1111]
- Column: au_ord
- Samples: [1, 2, 1, 1, 2]
- Column: royaltyper
- Samples: [100, 40, 100, 100, 40]
| SELECT CAST(SUM(CASE WHEN T2.city = 'Fremont' THEN qty END) - SUM(CASE WHEN T2.city = 'Portland' THEN qty END) AS REAL) * 100 / SUM(CASE WHEN T2.city = 'Fremont' THEN qty END) FROM sales AS T1 INNER JOIN stores AS T2 ON T1.stor_id = T2.stor_id WHERE STRFTIME('%Y', T1.ord_date) = '1993' |
|
Solve the following sql problem:
Among all the employees, how many percent more for the publishers than designers?
Schema:
SCHEMA:
- Table: authors
- Column: au_id
- Samples: [172-32-1176, 213-46-8915, 238-95-7766, 267-41-2394, 274-80-9391]
- Column: au_lname
- Samples: [White, Green, Carson, O'Leary, Straight]
- Column: au_fname
- Samples: [Johnson, Marjorie, Cheryl, Michael, Dean]
- Column: phone
- Samples: [408 496-7223, 415 986-7020, 415 548-7723, 408 286-2428, 415 834-2919]
- Column: address
- Samples: [10932 Bigge Rd., 309 63rd St. #411, 589 Darwin Ln., 22 Cleveland Av. #14, 5420 College Av.]
- Column: city
- Samples: [Menlo Park, Oakland, Berkeley, San Jose, Oakland]
- Column: state
- Samples: [CA, CA, CA, CA, CA]
- Column: zip
- Samples: [94025, 94618, 94705, 95128, 94609]
- Column: contract
- Samples: [0, 0, 0, 0, 0]
- Table: jobs
- Column: job_id
- Samples: [1, 2, 3, 4, 5]
- Column: job_desc
- Samples: [New Hire - Job not specified, Chief Executive Officer, Business Operations Manager, Chief Financial Officier, Publisher]
- Column: min_lvl
- Samples: [10, 200, 175, 175, 150]
- Column: max_lvl
- Samples: [10, 250, 225, 250, 250]
- Table: publishers
- Column: pub_id
- Samples: [0736, 0877, 1389, 1622, 1756]
- Column: pub_name
- Samples: [New Moon Books, Binnet & Hardley, Algodata Infosystems, Five Lakes Publishing, Ramona Publishers]
- Column: city
- Samples: [Boston, Washington, Berkeley, Chicago, Dallas]
- Column: state
- Samples: [MA, DC, CA, IL, TX]
- Column: country
- Samples: [USA, USA, USA, USA, USA]
- Table: employee
- Column: emp_id
- Samples: [A-C71970F, A-R89858F, AMD15433F, ARD36773F, CFH28514M]
- Column: fname
- Samples: [Aria, Annette, Ann, Anabela, Carlos]
- Column: minit
- Samples: [, , M, R, F]
- Column: lname
- Samples: [Cruz, Roulet, Devon, Domingues, Hernadez]
- Column: job_id
- Samples: [10, 6, 3, 8, 5]
- Column: job_lvl
- Samples: [87, 152, 200, 100, 211]
- Column: pub_id
- Samples: [1389, 9999, 9952, 0877, 9999]
- Column: hire_date
- Samples: [1991-10-26 00:00:00.0, 1990-02-21 00:00:00.0, 1991-07-16 00:00:00.0, 1993-01-27 00:00:00.0, 1989-04-21 00:00:00.0]
- Table: pub_info
- Column: pub_id
- Samples: [0877, 1389, 1622, 1756, 9901]
- Column: logo
- Samples: [0x4749463839618B002F00B30F00000000800000008000808000000080800080008080..., 0x474946383961C2001D00B30F00000000800000008000808000000080800080008080..., 0x474946383961F5003400B30F00000000800000008000808000000080800080008080..., 0x474946383961E3002500B30F00000000800000008000808000000080800080008080..., 0x4749463839615D002200B30F00000000800000008000808000000080800080008080... (truncated)]
- Column: pr_info
- Samples: [This is sample text data for Binnet & Hardley, publisher 0877 in the p..., This is sample text data for Algodata Infosystems, publisher 1389 in t..., This is sample text data for Five Lakes Publishing, publisher 1622 in ..., This is sample text data for Ramona Publishers, publisher 1756 in the ..., This is sample text data for GGG&G, publisher 9901 in the pubs databas... (truncated)]
- Table: stores
- Column: stor_id
- Samples: [6380, 7066, 7067, 7131, 7896]
- Column: stor_name
- Samples: [Eric the Read Books, Barnum's, News & Brews, Doc-U-Mat: Quality Laundry and Books, Fricative Bookshop]
- Column: stor_address
- Samples: [788 Catamaugus Ave., 567 Pasadena Ave., 577 First St., 24-A Avogadro Way, 89 Madison St.]
- Column: city
- Samples: [Seattle, Tustin, Los Gatos, Remulade, Fremont]
- Column: state
- Samples: [WA, CA, CA, WA, CA]
- Column: zip
- Samples: [98056, 92789, 96745, 98014, 90019]
- Table: discounts
- Column: discounttype
- Samples: [Initial Customer, Volume Discount, Customer Discount]
- Column: stor_id
- Samples: [None, None, 8042]
- Column: lowqty
- Samples: [None, 100, None]
- Column: highqty
- Samples: [None, 1000, None]
- Column: discount
- Samples: [10.5, 6.7, 5.0]
- Table: titles
- Column: title_id
- Samples: [BU1032, BU1111, BU2075, BU7832, MC2222]
- Column: title
- Samples: [The Busy Executive's Database Guide, Cooking with Computers: Surreptitious Balance Sheets, You Can Combat Computer Stress!, Straight Talk About Computers, Silicon Valley Gastronomic Treats]
- Column: type
- Samples: [business, business, business, business, mod_cook]
- Column: pub_id
- Samples: [1389, 1389, 0736, 1389, 0877]
- Column: price
- Samples: [19.99, 11.95, 2.99, 19.99, 19.99]
- Column: advance
- Samples: [5000.0, 5000.0, 10125.0, 5000.0, 0.0]
- Column: royalty
- Samples: [10, 10, 24, 10, 12]
- Column: ytd_sales
- Samples: [4095, 3876, 18722, 4095, 2032]
- Column: notes
- Samples: [An overview of available database systems with emphasis on common busi..., Helpful hints on how to use your electronic resources to the best adva..., The latest medical and psychological techniques for living with the el..., Annotated analysis of what computers can do for you: a no-hype guide f..., Favorite recipes for quick, easy, and elegant meals. (truncated)]
- Column: pubdate
- Samples: [1991-06-12 00:00:00.0, 1991-06-09 00:00:00.0, 1991-06-30 00:00:00.0, 1991-06-22 00:00:00.0, 1991-06-09 00:00:00.0]
- Table: roysched
- Column: title_id
- Samples: [BU1032, BU1032, PC1035, PC1035, PC1035]
- Column: lorange
- Samples: [0, 5001, 0, 2001, 3001]
- Column: hirange
- Samples: [5000, 50000, 2000, 3000, 4000]
- Column: royalty
- Samples: [10, 12, 10, 12, 14]
- Table: sales
- Column: stor_id
- Samples: [6380, 6380, 7066, 7066, 7067]
- Column: ord_num
- Samples: [6871, 722a, A2976, QA7442.3, D4482]
- Column: ord_date
- Samples: [1994-09-14 00:00:00.0, 1994-09-13 00:00:00.0, 1993-05-24 00:00:00.0, 1994-09-13 00:00:00.0, 1994-09-14 00:00:00.0]
- Column: qty
- Samples: [5, 3, 50, 75, 10]
- Column: payterms
- Samples: [Net 60, Net 60, Net 30, ON invoice, Net 60]
- Column: title_id
- Samples: [BU1032, PS2091, PC8888, PS2091, PS2091]
- Table: titleauthor
- Column: au_id
- Samples: [172-32-1176, 213-46-8915, 213-46-8915, 238-95-7766, 267-41-2394]
- Column: title_id
- Samples: [PS3333, BU1032, BU2075, PC1035, BU1111]
- Column: au_ord
- Samples: [1, 2, 1, 1, 2]
- Column: royaltyper
- Samples: [100, 40, 100, 100, 40]
| SELECT CAST(SUM(CASE WHEN T2.job_desc = 'publisher' THEN 1 ELSE 0 END) - SUM(CASE WHEN T2.job_desc = 'designer' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.job_id) FROM employee AS T1 INNER JOIN jobs AS T2 ON T1.job_id = T2.job_id |
|
Solve the following sql problem:
Find and list the full name of employees who were hired between 1990 and 1995. Also, arrange them in the descending order of job level.
Schema:
SCHEMA:
- Table: authors
- Column: au_id
- Samples: [172-32-1176, 213-46-8915, 238-95-7766, 267-41-2394, 274-80-9391]
- Column: au_lname
- Samples: [White, Green, Carson, O'Leary, Straight]
- Column: au_fname
- Samples: [Johnson, Marjorie, Cheryl, Michael, Dean]
- Column: phone
- Samples: [408 496-7223, 415 986-7020, 415 548-7723, 408 286-2428, 415 834-2919]
- Column: address
- Samples: [10932 Bigge Rd., 309 63rd St. #411, 589 Darwin Ln., 22 Cleveland Av. #14, 5420 College Av.]
- Column: city
- Samples: [Menlo Park, Oakland, Berkeley, San Jose, Oakland]
- Column: state
- Samples: [CA, CA, CA, CA, CA]
- Column: zip
- Samples: [94025, 94618, 94705, 95128, 94609]
- Column: contract
- Samples: [0, 0, 0, 0, 0]
- Table: jobs
- Column: job_id
- Samples: [1, 2, 3, 4, 5]
- Column: job_desc
- Samples: [New Hire - Job not specified, Chief Executive Officer, Business Operations Manager, Chief Financial Officier, Publisher]
- Column: min_lvl
- Samples: [10, 200, 175, 175, 150]
- Column: max_lvl
- Samples: [10, 250, 225, 250, 250]
- Table: publishers
- Column: pub_id
- Samples: [0736, 0877, 1389, 1622, 1756]
- Column: pub_name
- Samples: [New Moon Books, Binnet & Hardley, Algodata Infosystems, Five Lakes Publishing, Ramona Publishers]
- Column: city
- Samples: [Boston, Washington, Berkeley, Chicago, Dallas]
- Column: state
- Samples: [MA, DC, CA, IL, TX]
- Column: country
- Samples: [USA, USA, USA, USA, USA]
- Table: employee
- Column: emp_id
- Samples: [A-C71970F, A-R89858F, AMD15433F, ARD36773F, CFH28514M]
- Column: fname
- Samples: [Aria, Annette, Ann, Anabela, Carlos]
- Column: minit
- Samples: [, , M, R, F]
- Column: lname
- Samples: [Cruz, Roulet, Devon, Domingues, Hernadez]
- Column: job_id
- Samples: [10, 6, 3, 8, 5]
- Column: job_lvl
- Samples: [87, 152, 200, 100, 211]
- Column: pub_id
- Samples: [1389, 9999, 9952, 0877, 9999]
- Column: hire_date
- Samples: [1991-10-26 00:00:00.0, 1990-02-21 00:00:00.0, 1991-07-16 00:00:00.0, 1993-01-27 00:00:00.0, 1989-04-21 00:00:00.0]
- Table: pub_info
- Column: pub_id
- Samples: [0877, 1389, 1622, 1756, 9901]
- Column: logo
- Samples: [0x4749463839618B002F00B30F00000000800000008000808000000080800080008080..., 0x474946383961C2001D00B30F00000000800000008000808000000080800080008080..., 0x474946383961F5003400B30F00000000800000008000808000000080800080008080..., 0x474946383961E3002500B30F00000000800000008000808000000080800080008080..., 0x4749463839615D002200B30F00000000800000008000808000000080800080008080... (truncated)]
- Column: pr_info
- Samples: [This is sample text data for Binnet & Hardley, publisher 0877 in the p..., This is sample text data for Algodata Infosystems, publisher 1389 in t..., This is sample text data for Five Lakes Publishing, publisher 1622 in ..., This is sample text data for Ramona Publishers, publisher 1756 in the ..., This is sample text data for GGG&G, publisher 9901 in the pubs databas... (truncated)]
- Table: stores
- Column: stor_id
- Samples: [6380, 7066, 7067, 7131, 7896]
- Column: stor_name
- Samples: [Eric the Read Books, Barnum's, News & Brews, Doc-U-Mat: Quality Laundry and Books, Fricative Bookshop]
- Column: stor_address
- Samples: [788 Catamaugus Ave., 567 Pasadena Ave., 577 First St., 24-A Avogadro Way, 89 Madison St.]
- Column: city
- Samples: [Seattle, Tustin, Los Gatos, Remulade, Fremont]
- Column: state
- Samples: [WA, CA, CA, WA, CA]
- Column: zip
- Samples: [98056, 92789, 96745, 98014, 90019]
- Table: discounts
- Column: discounttype
- Samples: [Initial Customer, Volume Discount, Customer Discount]
- Column: stor_id
- Samples: [None, None, 8042]
- Column: lowqty
- Samples: [None, 100, None]
- Column: highqty
- Samples: [None, 1000, None]
- Column: discount
- Samples: [10.5, 6.7, 5.0]
- Table: titles
- Column: title_id
- Samples: [BU1032, BU1111, BU2075, BU7832, MC2222]
- Column: title
- Samples: [The Busy Executive's Database Guide, Cooking with Computers: Surreptitious Balance Sheets, You Can Combat Computer Stress!, Straight Talk About Computers, Silicon Valley Gastronomic Treats]
- Column: type
- Samples: [business, business, business, business, mod_cook]
- Column: pub_id
- Samples: [1389, 1389, 0736, 1389, 0877]
- Column: price
- Samples: [19.99, 11.95, 2.99, 19.99, 19.99]
- Column: advance
- Samples: [5000.0, 5000.0, 10125.0, 5000.0, 0.0]
- Column: royalty
- Samples: [10, 10, 24, 10, 12]
- Column: ytd_sales
- Samples: [4095, 3876, 18722, 4095, 2032]
- Column: notes
- Samples: [An overview of available database systems with emphasis on common busi..., Helpful hints on how to use your electronic resources to the best adva..., The latest medical and psychological techniques for living with the el..., Annotated analysis of what computers can do for you: a no-hype guide f..., Favorite recipes for quick, easy, and elegant meals. (truncated)]
- Column: pubdate
- Samples: [1991-06-12 00:00:00.0, 1991-06-09 00:00:00.0, 1991-06-30 00:00:00.0, 1991-06-22 00:00:00.0, 1991-06-09 00:00:00.0]
- Table: roysched
- Column: title_id
- Samples: [BU1032, BU1032, PC1035, PC1035, PC1035]
- Column: lorange
- Samples: [0, 5001, 0, 2001, 3001]
- Column: hirange
- Samples: [5000, 50000, 2000, 3000, 4000]
- Column: royalty
- Samples: [10, 12, 10, 12, 14]
- Table: sales
- Column: stor_id
- Samples: [6380, 6380, 7066, 7066, 7067]
- Column: ord_num
- Samples: [6871, 722a, A2976, QA7442.3, D4482]
- Column: ord_date
- Samples: [1994-09-14 00:00:00.0, 1994-09-13 00:00:00.0, 1993-05-24 00:00:00.0, 1994-09-13 00:00:00.0, 1994-09-14 00:00:00.0]
- Column: qty
- Samples: [5, 3, 50, 75, 10]
- Column: payterms
- Samples: [Net 60, Net 60, Net 30, ON invoice, Net 60]
- Column: title_id
- Samples: [BU1032, PS2091, PC8888, PS2091, PS2091]
- Table: titleauthor
- Column: au_id
- Samples: [172-32-1176, 213-46-8915, 213-46-8915, 238-95-7766, 267-41-2394]
- Column: title_id
- Samples: [PS3333, BU1032, BU2075, PC1035, BU1111]
- Column: au_ord
- Samples: [1, 2, 1, 1, 2]
- Column: royaltyper
- Samples: [100, 40, 100, 100, 40]
| SELECT fname, minit, lname FROM employee WHERE STRFTIME('%Y', hire_date) BETWEEN '1990' AND '1995' ORDER BY job_lvl DESC |
|
Solve the following sql problem:
Which titles has above average royalty rate? Give those title's name, type and price?
Schema:
SCHEMA:
- Table: authors
- Column: au_id
- Samples: [172-32-1176, 213-46-8915, 238-95-7766, 267-41-2394, 274-80-9391]
- Column: au_lname
- Samples: [White, Green, Carson, O'Leary, Straight]
- Column: au_fname
- Samples: [Johnson, Marjorie, Cheryl, Michael, Dean]
- Column: phone
- Samples: [408 496-7223, 415 986-7020, 415 548-7723, 408 286-2428, 415 834-2919]
- Column: address
- Samples: [10932 Bigge Rd., 309 63rd St. #411, 589 Darwin Ln., 22 Cleveland Av. #14, 5420 College Av.]
- Column: city
- Samples: [Menlo Park, Oakland, Berkeley, San Jose, Oakland]
- Column: state
- Samples: [CA, CA, CA, CA, CA]
- Column: zip
- Samples: [94025, 94618, 94705, 95128, 94609]
- Column: contract
- Samples: [0, 0, 0, 0, 0]
- Table: jobs
- Column: job_id
- Samples: [1, 2, 3, 4, 5]
- Column: job_desc
- Samples: [New Hire - Job not specified, Chief Executive Officer, Business Operations Manager, Chief Financial Officier, Publisher]
- Column: min_lvl
- Samples: [10, 200, 175, 175, 150]
- Column: max_lvl
- Samples: [10, 250, 225, 250, 250]
- Table: publishers
- Column: pub_id
- Samples: [0736, 0877, 1389, 1622, 1756]
- Column: pub_name
- Samples: [New Moon Books, Binnet & Hardley, Algodata Infosystems, Five Lakes Publishing, Ramona Publishers]
- Column: city
- Samples: [Boston, Washington, Berkeley, Chicago, Dallas]
- Column: state
- Samples: [MA, DC, CA, IL, TX]
- Column: country
- Samples: [USA, USA, USA, USA, USA]
- Table: employee
- Column: emp_id
- Samples: [A-C71970F, A-R89858F, AMD15433F, ARD36773F, CFH28514M]
- Column: fname
- Samples: [Aria, Annette, Ann, Anabela, Carlos]
- Column: minit
- Samples: [, , M, R, F]
- Column: lname
- Samples: [Cruz, Roulet, Devon, Domingues, Hernadez]
- Column: job_id
- Samples: [10, 6, 3, 8, 5]
- Column: job_lvl
- Samples: [87, 152, 200, 100, 211]
- Column: pub_id
- Samples: [1389, 9999, 9952, 0877, 9999]
- Column: hire_date
- Samples: [1991-10-26 00:00:00.0, 1990-02-21 00:00:00.0, 1991-07-16 00:00:00.0, 1993-01-27 00:00:00.0, 1989-04-21 00:00:00.0]
- Table: pub_info
- Column: pub_id
- Samples: [0877, 1389, 1622, 1756, 9901]
- Column: logo
- Samples: [0x4749463839618B002F00B30F00000000800000008000808000000080800080008080..., 0x474946383961C2001D00B30F00000000800000008000808000000080800080008080..., 0x474946383961F5003400B30F00000000800000008000808000000080800080008080..., 0x474946383961E3002500B30F00000000800000008000808000000080800080008080..., 0x4749463839615D002200B30F00000000800000008000808000000080800080008080... (truncated)]
- Column: pr_info
- Samples: [This is sample text data for Binnet & Hardley, publisher 0877 in the p..., This is sample text data for Algodata Infosystems, publisher 1389 in t..., This is sample text data for Five Lakes Publishing, publisher 1622 in ..., This is sample text data for Ramona Publishers, publisher 1756 in the ..., This is sample text data for GGG&G, publisher 9901 in the pubs databas... (truncated)]
- Table: stores
- Column: stor_id
- Samples: [6380, 7066, 7067, 7131, 7896]
- Column: stor_name
- Samples: [Eric the Read Books, Barnum's, News & Brews, Doc-U-Mat: Quality Laundry and Books, Fricative Bookshop]
- Column: stor_address
- Samples: [788 Catamaugus Ave., 567 Pasadena Ave., 577 First St., 24-A Avogadro Way, 89 Madison St.]
- Column: city
- Samples: [Seattle, Tustin, Los Gatos, Remulade, Fremont]
- Column: state
- Samples: [WA, CA, CA, WA, CA]
- Column: zip
- Samples: [98056, 92789, 96745, 98014, 90019]
- Table: discounts
- Column: discounttype
- Samples: [Initial Customer, Volume Discount, Customer Discount]
- Column: stor_id
- Samples: [None, None, 8042]
- Column: lowqty
- Samples: [None, 100, None]
- Column: highqty
- Samples: [None, 1000, None]
- Column: discount
- Samples: [10.5, 6.7, 5.0]
- Table: titles
- Column: title_id
- Samples: [BU1032, BU1111, BU2075, BU7832, MC2222]
- Column: title
- Samples: [The Busy Executive's Database Guide, Cooking with Computers: Surreptitious Balance Sheets, You Can Combat Computer Stress!, Straight Talk About Computers, Silicon Valley Gastronomic Treats]
- Column: type
- Samples: [business, business, business, business, mod_cook]
- Column: pub_id
- Samples: [1389, 1389, 0736, 1389, 0877]
- Column: price
- Samples: [19.99, 11.95, 2.99, 19.99, 19.99]
- Column: advance
- Samples: [5000.0, 5000.0, 10125.0, 5000.0, 0.0]
- Column: royalty
- Samples: [10, 10, 24, 10, 12]
- Column: ytd_sales
- Samples: [4095, 3876, 18722, 4095, 2032]
- Column: notes
- Samples: [An overview of available database systems with emphasis on common busi..., Helpful hints on how to use your electronic resources to the best adva..., The latest medical and psychological techniques for living with the el..., Annotated analysis of what computers can do for you: a no-hype guide f..., Favorite recipes for quick, easy, and elegant meals. (truncated)]
- Column: pubdate
- Samples: [1991-06-12 00:00:00.0, 1991-06-09 00:00:00.0, 1991-06-30 00:00:00.0, 1991-06-22 00:00:00.0, 1991-06-09 00:00:00.0]
- Table: roysched
- Column: title_id
- Samples: [BU1032, BU1032, PC1035, PC1035, PC1035]
- Column: lorange
- Samples: [0, 5001, 0, 2001, 3001]
- Column: hirange
- Samples: [5000, 50000, 2000, 3000, 4000]
- Column: royalty
- Samples: [10, 12, 10, 12, 14]
- Table: sales
- Column: stor_id
- Samples: [6380, 6380, 7066, 7066, 7067]
- Column: ord_num
- Samples: [6871, 722a, A2976, QA7442.3, D4482]
- Column: ord_date
- Samples: [1994-09-14 00:00:00.0, 1994-09-13 00:00:00.0, 1993-05-24 00:00:00.0, 1994-09-13 00:00:00.0, 1994-09-14 00:00:00.0]
- Column: qty
- Samples: [5, 3, 50, 75, 10]
- Column: payterms
- Samples: [Net 60, Net 60, Net 30, ON invoice, Net 60]
- Column: title_id
- Samples: [BU1032, PS2091, PC8888, PS2091, PS2091]
- Table: titleauthor
- Column: au_id
- Samples: [172-32-1176, 213-46-8915, 213-46-8915, 238-95-7766, 267-41-2394]
- Column: title_id
- Samples: [PS3333, BU1032, BU2075, PC1035, BU1111]
- Column: au_ord
- Samples: [1, 2, 1, 1, 2]
- Column: royaltyper
- Samples: [100, 40, 100, 100, 40]
| SELECT DISTINCT T1.title, T1.type, T1.price FROM titles AS T1 INNER JOIN roysched AS T2 ON T1.title_id = T2.title_id WHERE T2.royalty > ( SELECT CAST(SUM(royalty) AS REAL) / COUNT(title_id) FROM roysched ) |
|
Solve the following sql problem:
In 1994 which title had less order quanty than the average order quantity? Find the title name, type and price.
Schema:
SCHEMA:
- Table: authors
- Column: au_id
- Samples: [172-32-1176, 213-46-8915, 238-95-7766, 267-41-2394, 274-80-9391]
- Column: au_lname
- Samples: [White, Green, Carson, O'Leary, Straight]
- Column: au_fname
- Samples: [Johnson, Marjorie, Cheryl, Michael, Dean]
- Column: phone
- Samples: [408 496-7223, 415 986-7020, 415 548-7723, 408 286-2428, 415 834-2919]
- Column: address
- Samples: [10932 Bigge Rd., 309 63rd St. #411, 589 Darwin Ln., 22 Cleveland Av. #14, 5420 College Av.]
- Column: city
- Samples: [Menlo Park, Oakland, Berkeley, San Jose, Oakland]
- Column: state
- Samples: [CA, CA, CA, CA, CA]
- Column: zip
- Samples: [94025, 94618, 94705, 95128, 94609]
- Column: contract
- Samples: [0, 0, 0, 0, 0]
- Table: jobs
- Column: job_id
- Samples: [1, 2, 3, 4, 5]
- Column: job_desc
- Samples: [New Hire - Job not specified, Chief Executive Officer, Business Operations Manager, Chief Financial Officier, Publisher]
- Column: min_lvl
- Samples: [10, 200, 175, 175, 150]
- Column: max_lvl
- Samples: [10, 250, 225, 250, 250]
- Table: publishers
- Column: pub_id
- Samples: [0736, 0877, 1389, 1622, 1756]
- Column: pub_name
- Samples: [New Moon Books, Binnet & Hardley, Algodata Infosystems, Five Lakes Publishing, Ramona Publishers]
- Column: city
- Samples: [Boston, Washington, Berkeley, Chicago, Dallas]
- Column: state
- Samples: [MA, DC, CA, IL, TX]
- Column: country
- Samples: [USA, USA, USA, USA, USA]
- Table: employee
- Column: emp_id
- Samples: [A-C71970F, A-R89858F, AMD15433F, ARD36773F, CFH28514M]
- Column: fname
- Samples: [Aria, Annette, Ann, Anabela, Carlos]
- Column: minit
- Samples: [, , M, R, F]
- Column: lname
- Samples: [Cruz, Roulet, Devon, Domingues, Hernadez]
- Column: job_id
- Samples: [10, 6, 3, 8, 5]
- Column: job_lvl
- Samples: [87, 152, 200, 100, 211]
- Column: pub_id
- Samples: [1389, 9999, 9952, 0877, 9999]
- Column: hire_date
- Samples: [1991-10-26 00:00:00.0, 1990-02-21 00:00:00.0, 1991-07-16 00:00:00.0, 1993-01-27 00:00:00.0, 1989-04-21 00:00:00.0]
- Table: pub_info
- Column: pub_id
- Samples: [0877, 1389, 1622, 1756, 9901]
- Column: logo
- Samples: [0x4749463839618B002F00B30F00000000800000008000808000000080800080008080..., 0x474946383961C2001D00B30F00000000800000008000808000000080800080008080..., 0x474946383961F5003400B30F00000000800000008000808000000080800080008080..., 0x474946383961E3002500B30F00000000800000008000808000000080800080008080..., 0x4749463839615D002200B30F00000000800000008000808000000080800080008080... (truncated)]
- Column: pr_info
- Samples: [This is sample text data for Binnet & Hardley, publisher 0877 in the p..., This is sample text data for Algodata Infosystems, publisher 1389 in t..., This is sample text data for Five Lakes Publishing, publisher 1622 in ..., This is sample text data for Ramona Publishers, publisher 1756 in the ..., This is sample text data for GGG&G, publisher 9901 in the pubs databas... (truncated)]
- Table: stores
- Column: stor_id
- Samples: [6380, 7066, 7067, 7131, 7896]
- Column: stor_name
- Samples: [Eric the Read Books, Barnum's, News & Brews, Doc-U-Mat: Quality Laundry and Books, Fricative Bookshop]
- Column: stor_address
- Samples: [788 Catamaugus Ave., 567 Pasadena Ave., 577 First St., 24-A Avogadro Way, 89 Madison St.]
- Column: city
- Samples: [Seattle, Tustin, Los Gatos, Remulade, Fremont]
- Column: state
- Samples: [WA, CA, CA, WA, CA]
- Column: zip
- Samples: [98056, 92789, 96745, 98014, 90019]
- Table: discounts
- Column: discounttype
- Samples: [Initial Customer, Volume Discount, Customer Discount]
- Column: stor_id
- Samples: [None, None, 8042]
- Column: lowqty
- Samples: [None, 100, None]
- Column: highqty
- Samples: [None, 1000, None]
- Column: discount
- Samples: [10.5, 6.7, 5.0]
- Table: titles
- Column: title_id
- Samples: [BU1032, BU1111, BU2075, BU7832, MC2222]
- Column: title
- Samples: [The Busy Executive's Database Guide, Cooking with Computers: Surreptitious Balance Sheets, You Can Combat Computer Stress!, Straight Talk About Computers, Silicon Valley Gastronomic Treats]
- Column: type
- Samples: [business, business, business, business, mod_cook]
- Column: pub_id
- Samples: [1389, 1389, 0736, 1389, 0877]
- Column: price
- Samples: [19.99, 11.95, 2.99, 19.99, 19.99]
- Column: advance
- Samples: [5000.0, 5000.0, 10125.0, 5000.0, 0.0]
- Column: royalty
- Samples: [10, 10, 24, 10, 12]
- Column: ytd_sales
- Samples: [4095, 3876, 18722, 4095, 2032]
- Column: notes
- Samples: [An overview of available database systems with emphasis on common busi..., Helpful hints on how to use your electronic resources to the best adva..., The latest medical and psychological techniques for living with the el..., Annotated analysis of what computers can do for you: a no-hype guide f..., Favorite recipes for quick, easy, and elegant meals. (truncated)]
- Column: pubdate
- Samples: [1991-06-12 00:00:00.0, 1991-06-09 00:00:00.0, 1991-06-30 00:00:00.0, 1991-06-22 00:00:00.0, 1991-06-09 00:00:00.0]
- Table: roysched
- Column: title_id
- Samples: [BU1032, BU1032, PC1035, PC1035, PC1035]
- Column: lorange
- Samples: [0, 5001, 0, 2001, 3001]
- Column: hirange
- Samples: [5000, 50000, 2000, 3000, 4000]
- Column: royalty
- Samples: [10, 12, 10, 12, 14]
- Table: sales
- Column: stor_id
- Samples: [6380, 6380, 7066, 7066, 7067]
- Column: ord_num
- Samples: [6871, 722a, A2976, QA7442.3, D4482]
- Column: ord_date
- Samples: [1994-09-14 00:00:00.0, 1994-09-13 00:00:00.0, 1993-05-24 00:00:00.0, 1994-09-13 00:00:00.0, 1994-09-14 00:00:00.0]
- Column: qty
- Samples: [5, 3, 50, 75, 10]
- Column: payterms
- Samples: [Net 60, Net 60, Net 30, ON invoice, Net 60]
- Column: title_id
- Samples: [BU1032, PS2091, PC8888, PS2091, PS2091]
- Table: titleauthor
- Column: au_id
- Samples: [172-32-1176, 213-46-8915, 213-46-8915, 238-95-7766, 267-41-2394]
- Column: title_id
- Samples: [PS3333, BU1032, BU2075, PC1035, BU1111]
- Column: au_ord
- Samples: [1, 2, 1, 1, 2]
- Column: royaltyper
- Samples: [100, 40, 100, 100, 40]
| SELECT DISTINCT T1.title, T1.type, T1.price FROM titles AS T1 INNER JOIN sales AS T2 ON T1.title_id = T2.title_id WHERE T2.ord_date LIKE '1994%' AND T2.Qty < ( SELECT CAST(SUM(T4.qty) AS REAL) / COUNT(T3.title_id) FROM titles AS T3 INNER JOIN sales AS T4 ON T3.title_id = T4.title_id ) |
|
Solve the following sql problem:
List the title name, type, and price of the titles published by New Moon Books. Arrange the list in ascending order of price.
Schema:
SCHEMA:
- Table: authors
- Column: au_id
- Samples: [172-32-1176, 213-46-8915, 238-95-7766, 267-41-2394, 274-80-9391]
- Column: au_lname
- Samples: [White, Green, Carson, O'Leary, Straight]
- Column: au_fname
- Samples: [Johnson, Marjorie, Cheryl, Michael, Dean]
- Column: phone
- Samples: [408 496-7223, 415 986-7020, 415 548-7723, 408 286-2428, 415 834-2919]
- Column: address
- Samples: [10932 Bigge Rd., 309 63rd St. #411, 589 Darwin Ln., 22 Cleveland Av. #14, 5420 College Av.]
- Column: city
- Samples: [Menlo Park, Oakland, Berkeley, San Jose, Oakland]
- Column: state
- Samples: [CA, CA, CA, CA, CA]
- Column: zip
- Samples: [94025, 94618, 94705, 95128, 94609]
- Column: contract
- Samples: [0, 0, 0, 0, 0]
- Table: jobs
- Column: job_id
- Samples: [1, 2, 3, 4, 5]
- Column: job_desc
- Samples: [New Hire - Job not specified, Chief Executive Officer, Business Operations Manager, Chief Financial Officier, Publisher]
- Column: min_lvl
- Samples: [10, 200, 175, 175, 150]
- Column: max_lvl
- Samples: [10, 250, 225, 250, 250]
- Table: publishers
- Column: pub_id
- Samples: [0736, 0877, 1389, 1622, 1756]
- Column: pub_name
- Samples: [New Moon Books, Binnet & Hardley, Algodata Infosystems, Five Lakes Publishing, Ramona Publishers]
- Column: city
- Samples: [Boston, Washington, Berkeley, Chicago, Dallas]
- Column: state
- Samples: [MA, DC, CA, IL, TX]
- Column: country
- Samples: [USA, USA, USA, USA, USA]
- Table: employee
- Column: emp_id
- Samples: [A-C71970F, A-R89858F, AMD15433F, ARD36773F, CFH28514M]
- Column: fname
- Samples: [Aria, Annette, Ann, Anabela, Carlos]
- Column: minit
- Samples: [, , M, R, F]
- Column: lname
- Samples: [Cruz, Roulet, Devon, Domingues, Hernadez]
- Column: job_id
- Samples: [10, 6, 3, 8, 5]
- Column: job_lvl
- Samples: [87, 152, 200, 100, 211]
- Column: pub_id
- Samples: [1389, 9999, 9952, 0877, 9999]
- Column: hire_date
- Samples: [1991-10-26 00:00:00.0, 1990-02-21 00:00:00.0, 1991-07-16 00:00:00.0, 1993-01-27 00:00:00.0, 1989-04-21 00:00:00.0]
- Table: pub_info
- Column: pub_id
- Samples: [0877, 1389, 1622, 1756, 9901]
- Column: logo
- Samples: [0x4749463839618B002F00B30F00000000800000008000808000000080800080008080..., 0x474946383961C2001D00B30F00000000800000008000808000000080800080008080..., 0x474946383961F5003400B30F00000000800000008000808000000080800080008080..., 0x474946383961E3002500B30F00000000800000008000808000000080800080008080..., 0x4749463839615D002200B30F00000000800000008000808000000080800080008080... (truncated)]
- Column: pr_info
- Samples: [This is sample text data for Binnet & Hardley, publisher 0877 in the p..., This is sample text data for Algodata Infosystems, publisher 1389 in t..., This is sample text data for Five Lakes Publishing, publisher 1622 in ..., This is sample text data for Ramona Publishers, publisher 1756 in the ..., This is sample text data for GGG&G, publisher 9901 in the pubs databas... (truncated)]
- Table: stores
- Column: stor_id
- Samples: [6380, 7066, 7067, 7131, 7896]
- Column: stor_name
- Samples: [Eric the Read Books, Barnum's, News & Brews, Doc-U-Mat: Quality Laundry and Books, Fricative Bookshop]
- Column: stor_address
- Samples: [788 Catamaugus Ave., 567 Pasadena Ave., 577 First St., 24-A Avogadro Way, 89 Madison St.]
- Column: city
- Samples: [Seattle, Tustin, Los Gatos, Remulade, Fremont]
- Column: state
- Samples: [WA, CA, CA, WA, CA]
- Column: zip
- Samples: [98056, 92789, 96745, 98014, 90019]
- Table: discounts
- Column: discounttype
- Samples: [Initial Customer, Volume Discount, Customer Discount]
- Column: stor_id
- Samples: [None, None, 8042]
- Column: lowqty
- Samples: [None, 100, None]
- Column: highqty
- Samples: [None, 1000, None]
- Column: discount
- Samples: [10.5, 6.7, 5.0]
- Table: titles
- Column: title_id
- Samples: [BU1032, BU1111, BU2075, BU7832, MC2222]
- Column: title
- Samples: [The Busy Executive's Database Guide, Cooking with Computers: Surreptitious Balance Sheets, You Can Combat Computer Stress!, Straight Talk About Computers, Silicon Valley Gastronomic Treats]
- Column: type
- Samples: [business, business, business, business, mod_cook]
- Column: pub_id
- Samples: [1389, 1389, 0736, 1389, 0877]
- Column: price
- Samples: [19.99, 11.95, 2.99, 19.99, 19.99]
- Column: advance
- Samples: [5000.0, 5000.0, 10125.0, 5000.0, 0.0]
- Column: royalty
- Samples: [10, 10, 24, 10, 12]
- Column: ytd_sales
- Samples: [4095, 3876, 18722, 4095, 2032]
- Column: notes
- Samples: [An overview of available database systems with emphasis on common busi..., Helpful hints on how to use your electronic resources to the best adva..., The latest medical and psychological techniques for living with the el..., Annotated analysis of what computers can do for you: a no-hype guide f..., Favorite recipes for quick, easy, and elegant meals. (truncated)]
- Column: pubdate
- Samples: [1991-06-12 00:00:00.0, 1991-06-09 00:00:00.0, 1991-06-30 00:00:00.0, 1991-06-22 00:00:00.0, 1991-06-09 00:00:00.0]
- Table: roysched
- Column: title_id
- Samples: [BU1032, BU1032, PC1035, PC1035, PC1035]
- Column: lorange
- Samples: [0, 5001, 0, 2001, 3001]
- Column: hirange
- Samples: [5000, 50000, 2000, 3000, 4000]
- Column: royalty
- Samples: [10, 12, 10, 12, 14]
- Table: sales
- Column: stor_id
- Samples: [6380, 6380, 7066, 7066, 7067]
- Column: ord_num
- Samples: [6871, 722a, A2976, QA7442.3, D4482]
- Column: ord_date
- Samples: [1994-09-14 00:00:00.0, 1994-09-13 00:00:00.0, 1993-05-24 00:00:00.0, 1994-09-13 00:00:00.0, 1994-09-14 00:00:00.0]
- Column: qty
- Samples: [5, 3, 50, 75, 10]
- Column: payterms
- Samples: [Net 60, Net 60, Net 30, ON invoice, Net 60]
- Column: title_id
- Samples: [BU1032, PS2091, PC8888, PS2091, PS2091]
- Table: titleauthor
- Column: au_id
- Samples: [172-32-1176, 213-46-8915, 213-46-8915, 238-95-7766, 267-41-2394]
- Column: title_id
- Samples: [PS3333, BU1032, BU2075, PC1035, BU1111]
- Column: au_ord
- Samples: [1, 2, 1, 1, 2]
- Column: royaltyper
- Samples: [100, 40, 100, 100, 40]
| SELECT T1.title, T1.type, T1.price FROM titles AS T1 INNER JOIN publishers AS T2 ON T1.pub_id = T2.pub_id WHERE T2.pub_name = 'New Moon Books' ORDER BY T1.price |
|
Solve the following sql problem:
In the books published by US publishers, which book has the highest royalty? List these books in the descending order of royalty.
Schema:
SCHEMA:
- Table: authors
- Column: au_id
- Samples: [172-32-1176, 213-46-8915, 238-95-7766, 267-41-2394, 274-80-9391]
- Column: au_lname
- Samples: [White, Green, Carson, O'Leary, Straight]
- Column: au_fname
- Samples: [Johnson, Marjorie, Cheryl, Michael, Dean]
- Column: phone
- Samples: [408 496-7223, 415 986-7020, 415 548-7723, 408 286-2428, 415 834-2919]
- Column: address
- Samples: [10932 Bigge Rd., 309 63rd St. #411, 589 Darwin Ln., 22 Cleveland Av. #14, 5420 College Av.]
- Column: city
- Samples: [Menlo Park, Oakland, Berkeley, San Jose, Oakland]
- Column: state
- Samples: [CA, CA, CA, CA, CA]
- Column: zip
- Samples: [94025, 94618, 94705, 95128, 94609]
- Column: contract
- Samples: [0, 0, 0, 0, 0]
- Table: jobs
- Column: job_id
- Samples: [1, 2, 3, 4, 5]
- Column: job_desc
- Samples: [New Hire - Job not specified, Chief Executive Officer, Business Operations Manager, Chief Financial Officier, Publisher]
- Column: min_lvl
- Samples: [10, 200, 175, 175, 150]
- Column: max_lvl
- Samples: [10, 250, 225, 250, 250]
- Table: publishers
- Column: pub_id
- Samples: [0736, 0877, 1389, 1622, 1756]
- Column: pub_name
- Samples: [New Moon Books, Binnet & Hardley, Algodata Infosystems, Five Lakes Publishing, Ramona Publishers]
- Column: city
- Samples: [Boston, Washington, Berkeley, Chicago, Dallas]
- Column: state
- Samples: [MA, DC, CA, IL, TX]
- Column: country
- Samples: [USA, USA, USA, USA, USA]
- Table: employee
- Column: emp_id
- Samples: [A-C71970F, A-R89858F, AMD15433F, ARD36773F, CFH28514M]
- Column: fname
- Samples: [Aria, Annette, Ann, Anabela, Carlos]
- Column: minit
- Samples: [, , M, R, F]
- Column: lname
- Samples: [Cruz, Roulet, Devon, Domingues, Hernadez]
- Column: job_id
- Samples: [10, 6, 3, 8, 5]
- Column: job_lvl
- Samples: [87, 152, 200, 100, 211]
- Column: pub_id
- Samples: [1389, 9999, 9952, 0877, 9999]
- Column: hire_date
- Samples: [1991-10-26 00:00:00.0, 1990-02-21 00:00:00.0, 1991-07-16 00:00:00.0, 1993-01-27 00:00:00.0, 1989-04-21 00:00:00.0]
- Table: pub_info
- Column: pub_id
- Samples: [0877, 1389, 1622, 1756, 9901]
- Column: logo
- Samples: [0x4749463839618B002F00B30F00000000800000008000808000000080800080008080..., 0x474946383961C2001D00B30F00000000800000008000808000000080800080008080..., 0x474946383961F5003400B30F00000000800000008000808000000080800080008080..., 0x474946383961E3002500B30F00000000800000008000808000000080800080008080..., 0x4749463839615D002200B30F00000000800000008000808000000080800080008080... (truncated)]
- Column: pr_info
- Samples: [This is sample text data for Binnet & Hardley, publisher 0877 in the p..., This is sample text data for Algodata Infosystems, publisher 1389 in t..., This is sample text data for Five Lakes Publishing, publisher 1622 in ..., This is sample text data for Ramona Publishers, publisher 1756 in the ..., This is sample text data for GGG&G, publisher 9901 in the pubs databas... (truncated)]
- Table: stores
- Column: stor_id
- Samples: [6380, 7066, 7067, 7131, 7896]
- Column: stor_name
- Samples: [Eric the Read Books, Barnum's, News & Brews, Doc-U-Mat: Quality Laundry and Books, Fricative Bookshop]
- Column: stor_address
- Samples: [788 Catamaugus Ave., 567 Pasadena Ave., 577 First St., 24-A Avogadro Way, 89 Madison St.]
- Column: city
- Samples: [Seattle, Tustin, Los Gatos, Remulade, Fremont]
- Column: state
- Samples: [WA, CA, CA, WA, CA]
- Column: zip
- Samples: [98056, 92789, 96745, 98014, 90019]
- Table: discounts
- Column: discounttype
- Samples: [Initial Customer, Volume Discount, Customer Discount]
- Column: stor_id
- Samples: [None, None, 8042]
- Column: lowqty
- Samples: [None, 100, None]
- Column: highqty
- Samples: [None, 1000, None]
- Column: discount
- Samples: [10.5, 6.7, 5.0]
- Table: titles
- Column: title_id
- Samples: [BU1032, BU1111, BU2075, BU7832, MC2222]
- Column: title
- Samples: [The Busy Executive's Database Guide, Cooking with Computers: Surreptitious Balance Sheets, You Can Combat Computer Stress!, Straight Talk About Computers, Silicon Valley Gastronomic Treats]
- Column: type
- Samples: [business, business, business, business, mod_cook]
- Column: pub_id
- Samples: [1389, 1389, 0736, 1389, 0877]
- Column: price
- Samples: [19.99, 11.95, 2.99, 19.99, 19.99]
- Column: advance
- Samples: [5000.0, 5000.0, 10125.0, 5000.0, 0.0]
- Column: royalty
- Samples: [10, 10, 24, 10, 12]
- Column: ytd_sales
- Samples: [4095, 3876, 18722, 4095, 2032]
- Column: notes
- Samples: [An overview of available database systems with emphasis on common busi..., Helpful hints on how to use your electronic resources to the best adva..., The latest medical and psychological techniques for living with the el..., Annotated analysis of what computers can do for you: a no-hype guide f..., Favorite recipes for quick, easy, and elegant meals. (truncated)]
- Column: pubdate
- Samples: [1991-06-12 00:00:00.0, 1991-06-09 00:00:00.0, 1991-06-30 00:00:00.0, 1991-06-22 00:00:00.0, 1991-06-09 00:00:00.0]
- Table: roysched
- Column: title_id
- Samples: [BU1032, BU1032, PC1035, PC1035, PC1035]
- Column: lorange
- Samples: [0, 5001, 0, 2001, 3001]
- Column: hirange
- Samples: [5000, 50000, 2000, 3000, 4000]
- Column: royalty
- Samples: [10, 12, 10, 12, 14]
- Table: sales
- Column: stor_id
- Samples: [6380, 6380, 7066, 7066, 7067]
- Column: ord_num
- Samples: [6871, 722a, A2976, QA7442.3, D4482]
- Column: ord_date
- Samples: [1994-09-14 00:00:00.0, 1994-09-13 00:00:00.0, 1993-05-24 00:00:00.0, 1994-09-13 00:00:00.0, 1994-09-14 00:00:00.0]
- Column: qty
- Samples: [5, 3, 50, 75, 10]
- Column: payterms
- Samples: [Net 60, Net 60, Net 30, ON invoice, Net 60]
- Column: title_id
- Samples: [BU1032, PS2091, PC8888, PS2091, PS2091]
- Table: titleauthor
- Column: au_id
- Samples: [172-32-1176, 213-46-8915, 213-46-8915, 238-95-7766, 267-41-2394]
- Column: title_id
- Samples: [PS3333, BU1032, BU2075, PC1035, BU1111]
- Column: au_ord
- Samples: [1, 2, 1, 1, 2]
- Column: royaltyper
- Samples: [100, 40, 100, 100, 40]
| SELECT T1.title FROM titles AS T1 INNER JOIN publishers AS T2 ON T1.pub_id = T2.pub_id INNER JOIN roysched AS T3 ON T1.title_id = T3.title_id WHERE T2.country = 'USA' ORDER BY T1.royalty DESC |
|
Solve the following sql problem:
Find the difference between the average royalty of titles published by US and non US publishers?
Schema:
SCHEMA:
- Table: authors
- Column: au_id
- Samples: [172-32-1176, 213-46-8915, 238-95-7766, 267-41-2394, 274-80-9391]
- Column: au_lname
- Samples: [White, Green, Carson, O'Leary, Straight]
- Column: au_fname
- Samples: [Johnson, Marjorie, Cheryl, Michael, Dean]
- Column: phone
- Samples: [408 496-7223, 415 986-7020, 415 548-7723, 408 286-2428, 415 834-2919]
- Column: address
- Samples: [10932 Bigge Rd., 309 63rd St. #411, 589 Darwin Ln., 22 Cleveland Av. #14, 5420 College Av.]
- Column: city
- Samples: [Menlo Park, Oakland, Berkeley, San Jose, Oakland]
- Column: state
- Samples: [CA, CA, CA, CA, CA]
- Column: zip
- Samples: [94025, 94618, 94705, 95128, 94609]
- Column: contract
- Samples: [0, 0, 0, 0, 0]
- Table: jobs
- Column: job_id
- Samples: [1, 2, 3, 4, 5]
- Column: job_desc
- Samples: [New Hire - Job not specified, Chief Executive Officer, Business Operations Manager, Chief Financial Officier, Publisher]
- Column: min_lvl
- Samples: [10, 200, 175, 175, 150]
- Column: max_lvl
- Samples: [10, 250, 225, 250, 250]
- Table: publishers
- Column: pub_id
- Samples: [0736, 0877, 1389, 1622, 1756]
- Column: pub_name
- Samples: [New Moon Books, Binnet & Hardley, Algodata Infosystems, Five Lakes Publishing, Ramona Publishers]
- Column: city
- Samples: [Boston, Washington, Berkeley, Chicago, Dallas]
- Column: state
- Samples: [MA, DC, CA, IL, TX]
- Column: country
- Samples: [USA, USA, USA, USA, USA]
- Table: employee
- Column: emp_id
- Samples: [A-C71970F, A-R89858F, AMD15433F, ARD36773F, CFH28514M]
- Column: fname
- Samples: [Aria, Annette, Ann, Anabela, Carlos]
- Column: minit
- Samples: [, , M, R, F]
- Column: lname
- Samples: [Cruz, Roulet, Devon, Domingues, Hernadez]
- Column: job_id
- Samples: [10, 6, 3, 8, 5]
- Column: job_lvl
- Samples: [87, 152, 200, 100, 211]
- Column: pub_id
- Samples: [1389, 9999, 9952, 0877, 9999]
- Column: hire_date
- Samples: [1991-10-26 00:00:00.0, 1990-02-21 00:00:00.0, 1991-07-16 00:00:00.0, 1993-01-27 00:00:00.0, 1989-04-21 00:00:00.0]
- Table: pub_info
- Column: pub_id
- Samples: [0877, 1389, 1622, 1756, 9901]
- Column: logo
- Samples: [0x4749463839618B002F00B30F00000000800000008000808000000080800080008080..., 0x474946383961C2001D00B30F00000000800000008000808000000080800080008080..., 0x474946383961F5003400B30F00000000800000008000808000000080800080008080..., 0x474946383961E3002500B30F00000000800000008000808000000080800080008080..., 0x4749463839615D002200B30F00000000800000008000808000000080800080008080... (truncated)]
- Column: pr_info
- Samples: [This is sample text data for Binnet & Hardley, publisher 0877 in the p..., This is sample text data for Algodata Infosystems, publisher 1389 in t..., This is sample text data for Five Lakes Publishing, publisher 1622 in ..., This is sample text data for Ramona Publishers, publisher 1756 in the ..., This is sample text data for GGG&G, publisher 9901 in the pubs databas... (truncated)]
- Table: stores
- Column: stor_id
- Samples: [6380, 7066, 7067, 7131, 7896]
- Column: stor_name
- Samples: [Eric the Read Books, Barnum's, News & Brews, Doc-U-Mat: Quality Laundry and Books, Fricative Bookshop]
- Column: stor_address
- Samples: [788 Catamaugus Ave., 567 Pasadena Ave., 577 First St., 24-A Avogadro Way, 89 Madison St.]
- Column: city
- Samples: [Seattle, Tustin, Los Gatos, Remulade, Fremont]
- Column: state
- Samples: [WA, CA, CA, WA, CA]
- Column: zip
- Samples: [98056, 92789, 96745, 98014, 90019]
- Table: discounts
- Column: discounttype
- Samples: [Initial Customer, Volume Discount, Customer Discount]
- Column: stor_id
- Samples: [None, None, 8042]
- Column: lowqty
- Samples: [None, 100, None]
- Column: highqty
- Samples: [None, 1000, None]
- Column: discount
- Samples: [10.5, 6.7, 5.0]
- Table: titles
- Column: title_id
- Samples: [BU1032, BU1111, BU2075, BU7832, MC2222]
- Column: title
- Samples: [The Busy Executive's Database Guide, Cooking with Computers: Surreptitious Balance Sheets, You Can Combat Computer Stress!, Straight Talk About Computers, Silicon Valley Gastronomic Treats]
- Column: type
- Samples: [business, business, business, business, mod_cook]
- Column: pub_id
- Samples: [1389, 1389, 0736, 1389, 0877]
- Column: price
- Samples: [19.99, 11.95, 2.99, 19.99, 19.99]
- Column: advance
- Samples: [5000.0, 5000.0, 10125.0, 5000.0, 0.0]
- Column: royalty
- Samples: [10, 10, 24, 10, 12]
- Column: ytd_sales
- Samples: [4095, 3876, 18722, 4095, 2032]
- Column: notes
- Samples: [An overview of available database systems with emphasis on common busi..., Helpful hints on how to use your electronic resources to the best adva..., The latest medical and psychological techniques for living with the el..., Annotated analysis of what computers can do for you: a no-hype guide f..., Favorite recipes for quick, easy, and elegant meals. (truncated)]
- Column: pubdate
- Samples: [1991-06-12 00:00:00.0, 1991-06-09 00:00:00.0, 1991-06-30 00:00:00.0, 1991-06-22 00:00:00.0, 1991-06-09 00:00:00.0]
- Table: roysched
- Column: title_id
- Samples: [BU1032, BU1032, PC1035, PC1035, PC1035]
- Column: lorange
- Samples: [0, 5001, 0, 2001, 3001]
- Column: hirange
- Samples: [5000, 50000, 2000, 3000, 4000]
- Column: royalty
- Samples: [10, 12, 10, 12, 14]
- Table: sales
- Column: stor_id
- Samples: [6380, 6380, 7066, 7066, 7067]
- Column: ord_num
- Samples: [6871, 722a, A2976, QA7442.3, D4482]
- Column: ord_date
- Samples: [1994-09-14 00:00:00.0, 1994-09-13 00:00:00.0, 1993-05-24 00:00:00.0, 1994-09-13 00:00:00.0, 1994-09-14 00:00:00.0]
- Column: qty
- Samples: [5, 3, 50, 75, 10]
- Column: payterms
- Samples: [Net 60, Net 60, Net 30, ON invoice, Net 60]
- Column: title_id
- Samples: [BU1032, PS2091, PC8888, PS2091, PS2091]
- Table: titleauthor
- Column: au_id
- Samples: [172-32-1176, 213-46-8915, 213-46-8915, 238-95-7766, 267-41-2394]
- Column: title_id
- Samples: [PS3333, BU1032, BU2075, PC1035, BU1111]
- Column: au_ord
- Samples: [1, 2, 1, 1, 2]
- Column: royaltyper
- Samples: [100, 40, 100, 100, 40]
| SELECT (CAST(SUM(CASE WHEN T2.country = 'USA' THEN T1.royalty ELSE 0 END) AS REAL) / SUM(CASE WHEN T2.country = 'USA' THEN 1 ELSE 0 END)) - (CAST(SUM(CASE WHEN T2.country != 'USA' THEN T1.royalty ELSE 0 END) AS REAL) / SUM(CASE WHEN T2.country != 'USA' THEN 1 ELSE 0 END)) FROM titles AS T1 INNER JOIN publishers AS T2 ON T1.pub_id = T2.pub_id INNER JOIN roysched AS T3 ON T1.title_id = T3.title_id |
|
Solve the following sql problem:
Calculate the average level difference between the Marketing editors hired by the US and non-US publishers?
Schema:
SCHEMA:
- Table: authors
- Column: au_id
- Samples: [172-32-1176, 213-46-8915, 238-95-7766, 267-41-2394, 274-80-9391]
- Column: au_lname
- Samples: [White, Green, Carson, O'Leary, Straight]
- Column: au_fname
- Samples: [Johnson, Marjorie, Cheryl, Michael, Dean]
- Column: phone
- Samples: [408 496-7223, 415 986-7020, 415 548-7723, 408 286-2428, 415 834-2919]
- Column: address
- Samples: [10932 Bigge Rd., 309 63rd St. #411, 589 Darwin Ln., 22 Cleveland Av. #14, 5420 College Av.]
- Column: city
- Samples: [Menlo Park, Oakland, Berkeley, San Jose, Oakland]
- Column: state
- Samples: [CA, CA, CA, CA, CA]
- Column: zip
- Samples: [94025, 94618, 94705, 95128, 94609]
- Column: contract
- Samples: [0, 0, 0, 0, 0]
- Table: jobs
- Column: job_id
- Samples: [1, 2, 3, 4, 5]
- Column: job_desc
- Samples: [New Hire - Job not specified, Chief Executive Officer, Business Operations Manager, Chief Financial Officier, Publisher]
- Column: min_lvl
- Samples: [10, 200, 175, 175, 150]
- Column: max_lvl
- Samples: [10, 250, 225, 250, 250]
- Table: publishers
- Column: pub_id
- Samples: [0736, 0877, 1389, 1622, 1756]
- Column: pub_name
- Samples: [New Moon Books, Binnet & Hardley, Algodata Infosystems, Five Lakes Publishing, Ramona Publishers]
- Column: city
- Samples: [Boston, Washington, Berkeley, Chicago, Dallas]
- Column: state
- Samples: [MA, DC, CA, IL, TX]
- Column: country
- Samples: [USA, USA, USA, USA, USA]
- Table: employee
- Column: emp_id
- Samples: [A-C71970F, A-R89858F, AMD15433F, ARD36773F, CFH28514M]
- Column: fname
- Samples: [Aria, Annette, Ann, Anabela, Carlos]
- Column: minit
- Samples: [, , M, R, F]
- Column: lname
- Samples: [Cruz, Roulet, Devon, Domingues, Hernadez]
- Column: job_id
- Samples: [10, 6, 3, 8, 5]
- Column: job_lvl
- Samples: [87, 152, 200, 100, 211]
- Column: pub_id
- Samples: [1389, 9999, 9952, 0877, 9999]
- Column: hire_date
- Samples: [1991-10-26 00:00:00.0, 1990-02-21 00:00:00.0, 1991-07-16 00:00:00.0, 1993-01-27 00:00:00.0, 1989-04-21 00:00:00.0]
- Table: pub_info
- Column: pub_id
- Samples: [0877, 1389, 1622, 1756, 9901]
- Column: logo
- Samples: [0x4749463839618B002F00B30F00000000800000008000808000000080800080008080..., 0x474946383961C2001D00B30F00000000800000008000808000000080800080008080..., 0x474946383961F5003400B30F00000000800000008000808000000080800080008080..., 0x474946383961E3002500B30F00000000800000008000808000000080800080008080..., 0x4749463839615D002200B30F00000000800000008000808000000080800080008080... (truncated)]
- Column: pr_info
- Samples: [This is sample text data for Binnet & Hardley, publisher 0877 in the p..., This is sample text data for Algodata Infosystems, publisher 1389 in t..., This is sample text data for Five Lakes Publishing, publisher 1622 in ..., This is sample text data for Ramona Publishers, publisher 1756 in the ..., This is sample text data for GGG&G, publisher 9901 in the pubs databas... (truncated)]
- Table: stores
- Column: stor_id
- Samples: [6380, 7066, 7067, 7131, 7896]
- Column: stor_name
- Samples: [Eric the Read Books, Barnum's, News & Brews, Doc-U-Mat: Quality Laundry and Books, Fricative Bookshop]
- Column: stor_address
- Samples: [788 Catamaugus Ave., 567 Pasadena Ave., 577 First St., 24-A Avogadro Way, 89 Madison St.]
- Column: city
- Samples: [Seattle, Tustin, Los Gatos, Remulade, Fremont]
- Column: state
- Samples: [WA, CA, CA, WA, CA]
- Column: zip
- Samples: [98056, 92789, 96745, 98014, 90019]
- Table: discounts
- Column: discounttype
- Samples: [Initial Customer, Volume Discount, Customer Discount]
- Column: stor_id
- Samples: [None, None, 8042]
- Column: lowqty
- Samples: [None, 100, None]
- Column: highqty
- Samples: [None, 1000, None]
- Column: discount
- Samples: [10.5, 6.7, 5.0]
- Table: titles
- Column: title_id
- Samples: [BU1032, BU1111, BU2075, BU7832, MC2222]
- Column: title
- Samples: [The Busy Executive's Database Guide, Cooking with Computers: Surreptitious Balance Sheets, You Can Combat Computer Stress!, Straight Talk About Computers, Silicon Valley Gastronomic Treats]
- Column: type
- Samples: [business, business, business, business, mod_cook]
- Column: pub_id
- Samples: [1389, 1389, 0736, 1389, 0877]
- Column: price
- Samples: [19.99, 11.95, 2.99, 19.99, 19.99]
- Column: advance
- Samples: [5000.0, 5000.0, 10125.0, 5000.0, 0.0]
- Column: royalty
- Samples: [10, 10, 24, 10, 12]
- Column: ytd_sales
- Samples: [4095, 3876, 18722, 4095, 2032]
- Column: notes
- Samples: [An overview of available database systems with emphasis on common busi..., Helpful hints on how to use your electronic resources to the best adva..., The latest medical and psychological techniques for living with the el..., Annotated analysis of what computers can do for you: a no-hype guide f..., Favorite recipes for quick, easy, and elegant meals. (truncated)]
- Column: pubdate
- Samples: [1991-06-12 00:00:00.0, 1991-06-09 00:00:00.0, 1991-06-30 00:00:00.0, 1991-06-22 00:00:00.0, 1991-06-09 00:00:00.0]
- Table: roysched
- Column: title_id
- Samples: [BU1032, BU1032, PC1035, PC1035, PC1035]
- Column: lorange
- Samples: [0, 5001, 0, 2001, 3001]
- Column: hirange
- Samples: [5000, 50000, 2000, 3000, 4000]
- Column: royalty
- Samples: [10, 12, 10, 12, 14]
- Table: sales
- Column: stor_id
- Samples: [6380, 6380, 7066, 7066, 7067]
- Column: ord_num
- Samples: [6871, 722a, A2976, QA7442.3, D4482]
- Column: ord_date
- Samples: [1994-09-14 00:00:00.0, 1994-09-13 00:00:00.0, 1993-05-24 00:00:00.0, 1994-09-13 00:00:00.0, 1994-09-14 00:00:00.0]
- Column: qty
- Samples: [5, 3, 50, 75, 10]
- Column: payterms
- Samples: [Net 60, Net 60, Net 30, ON invoice, Net 60]
- Column: title_id
- Samples: [BU1032, PS2091, PC8888, PS2091, PS2091]
- Table: titleauthor
- Column: au_id
- Samples: [172-32-1176, 213-46-8915, 213-46-8915, 238-95-7766, 267-41-2394]
- Column: title_id
- Samples: [PS3333, BU1032, BU2075, PC1035, BU1111]
- Column: au_ord
- Samples: [1, 2, 1, 1, 2]
- Column: royaltyper
- Samples: [100, 40, 100, 100, 40]
| SELECT (CAST(SUM(CASE WHEN T1.country = 'USA' THEN job_lvl ELSE 0 END) AS REAL) / SUM(CASE WHEN T1.country = 'USA' THEN 1 ELSE 0 END)) - (CAST(SUM(CASE WHEN T1.country != 'USA' THEN job_lvl ELSE 0 END) AS REAL) / SUM(CASE WHEN T1.country != 'USA' THEN 1 ELSE 0 END)) FROM publishers AS T1 INNER JOIN employee AS T2 ON T1.pub_id = T2.pub_id INNER JOIN jobs AS T3 ON T2.job_id = T3.job_id WHERE T3.job_desc = 'Managing Editor' |
|
Solve the following sql problem:
Which title is about helpful hints on how to use your electronic resources, which publisher published it and what is the price of this book?
Schema:
SCHEMA:
- Table: authors
- Column: au_id
- Samples: [172-32-1176, 213-46-8915, 238-95-7766, 267-41-2394, 274-80-9391]
- Column: au_lname
- Samples: [White, Green, Carson, O'Leary, Straight]
- Column: au_fname
- Samples: [Johnson, Marjorie, Cheryl, Michael, Dean]
- Column: phone
- Samples: [408 496-7223, 415 986-7020, 415 548-7723, 408 286-2428, 415 834-2919]
- Column: address
- Samples: [10932 Bigge Rd., 309 63rd St. #411, 589 Darwin Ln., 22 Cleveland Av. #14, 5420 College Av.]
- Column: city
- Samples: [Menlo Park, Oakland, Berkeley, San Jose, Oakland]
- Column: state
- Samples: [CA, CA, CA, CA, CA]
- Column: zip
- Samples: [94025, 94618, 94705, 95128, 94609]
- Column: contract
- Samples: [0, 0, 0, 0, 0]
- Table: jobs
- Column: job_id
- Samples: [1, 2, 3, 4, 5]
- Column: job_desc
- Samples: [New Hire - Job not specified, Chief Executive Officer, Business Operations Manager, Chief Financial Officier, Publisher]
- Column: min_lvl
- Samples: [10, 200, 175, 175, 150]
- Column: max_lvl
- Samples: [10, 250, 225, 250, 250]
- Table: publishers
- Column: pub_id
- Samples: [0736, 0877, 1389, 1622, 1756]
- Column: pub_name
- Samples: [New Moon Books, Binnet & Hardley, Algodata Infosystems, Five Lakes Publishing, Ramona Publishers]
- Column: city
- Samples: [Boston, Washington, Berkeley, Chicago, Dallas]
- Column: state
- Samples: [MA, DC, CA, IL, TX]
- Column: country
- Samples: [USA, USA, USA, USA, USA]
- Table: employee
- Column: emp_id
- Samples: [A-C71970F, A-R89858F, AMD15433F, ARD36773F, CFH28514M]
- Column: fname
- Samples: [Aria, Annette, Ann, Anabela, Carlos]
- Column: minit
- Samples: [, , M, R, F]
- Column: lname
- Samples: [Cruz, Roulet, Devon, Domingues, Hernadez]
- Column: job_id
- Samples: [10, 6, 3, 8, 5]
- Column: job_lvl
- Samples: [87, 152, 200, 100, 211]
- Column: pub_id
- Samples: [1389, 9999, 9952, 0877, 9999]
- Column: hire_date
- Samples: [1991-10-26 00:00:00.0, 1990-02-21 00:00:00.0, 1991-07-16 00:00:00.0, 1993-01-27 00:00:00.0, 1989-04-21 00:00:00.0]
- Table: pub_info
- Column: pub_id
- Samples: [0877, 1389, 1622, 1756, 9901]
- Column: logo
- Samples: [0x4749463839618B002F00B30F00000000800000008000808000000080800080008080..., 0x474946383961C2001D00B30F00000000800000008000808000000080800080008080..., 0x474946383961F5003400B30F00000000800000008000808000000080800080008080..., 0x474946383961E3002500B30F00000000800000008000808000000080800080008080..., 0x4749463839615D002200B30F00000000800000008000808000000080800080008080... (truncated)]
- Column: pr_info
- Samples: [This is sample text data for Binnet & Hardley, publisher 0877 in the p..., This is sample text data for Algodata Infosystems, publisher 1389 in t..., This is sample text data for Five Lakes Publishing, publisher 1622 in ..., This is sample text data for Ramona Publishers, publisher 1756 in the ..., This is sample text data for GGG&G, publisher 9901 in the pubs databas... (truncated)]
- Table: stores
- Column: stor_id
- Samples: [6380, 7066, 7067, 7131, 7896]
- Column: stor_name
- Samples: [Eric the Read Books, Barnum's, News & Brews, Doc-U-Mat: Quality Laundry and Books, Fricative Bookshop]
- Column: stor_address
- Samples: [788 Catamaugus Ave., 567 Pasadena Ave., 577 First St., 24-A Avogadro Way, 89 Madison St.]
- Column: city
- Samples: [Seattle, Tustin, Los Gatos, Remulade, Fremont]
- Column: state
- Samples: [WA, CA, CA, WA, CA]
- Column: zip
- Samples: [98056, 92789, 96745, 98014, 90019]
- Table: discounts
- Column: discounttype
- Samples: [Initial Customer, Volume Discount, Customer Discount]
- Column: stor_id
- Samples: [None, None, 8042]
- Column: lowqty
- Samples: [None, 100, None]
- Column: highqty
- Samples: [None, 1000, None]
- Column: discount
- Samples: [10.5, 6.7, 5.0]
- Table: titles
- Column: title_id
- Samples: [BU1032, BU1111, BU2075, BU7832, MC2222]
- Column: title
- Samples: [The Busy Executive's Database Guide, Cooking with Computers: Surreptitious Balance Sheets, You Can Combat Computer Stress!, Straight Talk About Computers, Silicon Valley Gastronomic Treats]
- Column: type
- Samples: [business, business, business, business, mod_cook]
- Column: pub_id
- Samples: [1389, 1389, 0736, 1389, 0877]
- Column: price
- Samples: [19.99, 11.95, 2.99, 19.99, 19.99]
- Column: advance
- Samples: [5000.0, 5000.0, 10125.0, 5000.0, 0.0]
- Column: royalty
- Samples: [10, 10, 24, 10, 12]
- Column: ytd_sales
- Samples: [4095, 3876, 18722, 4095, 2032]
- Column: notes
- Samples: [An overview of available database systems with emphasis on common busi..., Helpful hints on how to use your electronic resources to the best adva..., The latest medical and psychological techniques for living with the el..., Annotated analysis of what computers can do for you: a no-hype guide f..., Favorite recipes for quick, easy, and elegant meals. (truncated)]
- Column: pubdate
- Samples: [1991-06-12 00:00:00.0, 1991-06-09 00:00:00.0, 1991-06-30 00:00:00.0, 1991-06-22 00:00:00.0, 1991-06-09 00:00:00.0]
- Table: roysched
- Column: title_id
- Samples: [BU1032, BU1032, PC1035, PC1035, PC1035]
- Column: lorange
- Samples: [0, 5001, 0, 2001, 3001]
- Column: hirange
- Samples: [5000, 50000, 2000, 3000, 4000]
- Column: royalty
- Samples: [10, 12, 10, 12, 14]
- Table: sales
- Column: stor_id
- Samples: [6380, 6380, 7066, 7066, 7067]
- Column: ord_num
- Samples: [6871, 722a, A2976, QA7442.3, D4482]
- Column: ord_date
- Samples: [1994-09-14 00:00:00.0, 1994-09-13 00:00:00.0, 1993-05-24 00:00:00.0, 1994-09-13 00:00:00.0, 1994-09-14 00:00:00.0]
- Column: qty
- Samples: [5, 3, 50, 75, 10]
- Column: payterms
- Samples: [Net 60, Net 60, Net 30, ON invoice, Net 60]
- Column: title_id
- Samples: [BU1032, PS2091, PC8888, PS2091, PS2091]
- Table: titleauthor
- Column: au_id
- Samples: [172-32-1176, 213-46-8915, 213-46-8915, 238-95-7766, 267-41-2394]
- Column: title_id
- Samples: [PS3333, BU1032, BU2075, PC1035, BU1111]
- Column: au_ord
- Samples: [1, 2, 1, 1, 2]
- Column: royaltyper
- Samples: [100, 40, 100, 100, 40]
| SELECT T1.title, T2.pub_name, T1.price FROM titles AS T1 INNER JOIN publishers AS T2 ON T1.pub_id = T2.pub_id WHERE T1.notes = 'Helpful hints on how to use your electronic resources to the best advantage.' |
|
Solve the following sql problem:
Of the titles, which title is about the Carefully researched study of the effects of strong emotions on the body, which state-based publisher published this book, and what is the year-to-date sale?
Schema:
SCHEMA:
- Table: authors
- Column: au_id
- Samples: [172-32-1176, 213-46-8915, 238-95-7766, 267-41-2394, 274-80-9391]
- Column: au_lname
- Samples: [White, Green, Carson, O'Leary, Straight]
- Column: au_fname
- Samples: [Johnson, Marjorie, Cheryl, Michael, Dean]
- Column: phone
- Samples: [408 496-7223, 415 986-7020, 415 548-7723, 408 286-2428, 415 834-2919]
- Column: address
- Samples: [10932 Bigge Rd., 309 63rd St. #411, 589 Darwin Ln., 22 Cleveland Av. #14, 5420 College Av.]
- Column: city
- Samples: [Menlo Park, Oakland, Berkeley, San Jose, Oakland]
- Column: state
- Samples: [CA, CA, CA, CA, CA]
- Column: zip
- Samples: [94025, 94618, 94705, 95128, 94609]
- Column: contract
- Samples: [0, 0, 0, 0, 0]
- Table: jobs
- Column: job_id
- Samples: [1, 2, 3, 4, 5]
- Column: job_desc
- Samples: [New Hire - Job not specified, Chief Executive Officer, Business Operations Manager, Chief Financial Officier, Publisher]
- Column: min_lvl
- Samples: [10, 200, 175, 175, 150]
- Column: max_lvl
- Samples: [10, 250, 225, 250, 250]
- Table: publishers
- Column: pub_id
- Samples: [0736, 0877, 1389, 1622, 1756]
- Column: pub_name
- Samples: [New Moon Books, Binnet & Hardley, Algodata Infosystems, Five Lakes Publishing, Ramona Publishers]
- Column: city
- Samples: [Boston, Washington, Berkeley, Chicago, Dallas]
- Column: state
- Samples: [MA, DC, CA, IL, TX]
- Column: country
- Samples: [USA, USA, USA, USA, USA]
- Table: employee
- Column: emp_id
- Samples: [A-C71970F, A-R89858F, AMD15433F, ARD36773F, CFH28514M]
- Column: fname
- Samples: [Aria, Annette, Ann, Anabela, Carlos]
- Column: minit
- Samples: [, , M, R, F]
- Column: lname
- Samples: [Cruz, Roulet, Devon, Domingues, Hernadez]
- Column: job_id
- Samples: [10, 6, 3, 8, 5]
- Column: job_lvl
- Samples: [87, 152, 200, 100, 211]
- Column: pub_id
- Samples: [1389, 9999, 9952, 0877, 9999]
- Column: hire_date
- Samples: [1991-10-26 00:00:00.0, 1990-02-21 00:00:00.0, 1991-07-16 00:00:00.0, 1993-01-27 00:00:00.0, 1989-04-21 00:00:00.0]
- Table: pub_info
- Column: pub_id
- Samples: [0877, 1389, 1622, 1756, 9901]
- Column: logo
- Samples: [0x4749463839618B002F00B30F00000000800000008000808000000080800080008080..., 0x474946383961C2001D00B30F00000000800000008000808000000080800080008080..., 0x474946383961F5003400B30F00000000800000008000808000000080800080008080..., 0x474946383961E3002500B30F00000000800000008000808000000080800080008080..., 0x4749463839615D002200B30F00000000800000008000808000000080800080008080... (truncated)]
- Column: pr_info
- Samples: [This is sample text data for Binnet & Hardley, publisher 0877 in the p..., This is sample text data for Algodata Infosystems, publisher 1389 in t..., This is sample text data for Five Lakes Publishing, publisher 1622 in ..., This is sample text data for Ramona Publishers, publisher 1756 in the ..., This is sample text data for GGG&G, publisher 9901 in the pubs databas... (truncated)]
- Table: stores
- Column: stor_id
- Samples: [6380, 7066, 7067, 7131, 7896]
- Column: stor_name
- Samples: [Eric the Read Books, Barnum's, News & Brews, Doc-U-Mat: Quality Laundry and Books, Fricative Bookshop]
- Column: stor_address
- Samples: [788 Catamaugus Ave., 567 Pasadena Ave., 577 First St., 24-A Avogadro Way, 89 Madison St.]
- Column: city
- Samples: [Seattle, Tustin, Los Gatos, Remulade, Fremont]
- Column: state
- Samples: [WA, CA, CA, WA, CA]
- Column: zip
- Samples: [98056, 92789, 96745, 98014, 90019]
- Table: discounts
- Column: discounttype
- Samples: [Initial Customer, Volume Discount, Customer Discount]
- Column: stor_id
- Samples: [None, None, 8042]
- Column: lowqty
- Samples: [None, 100, None]
- Column: highqty
- Samples: [None, 1000, None]
- Column: discount
- Samples: [10.5, 6.7, 5.0]
- Table: titles
- Column: title_id
- Samples: [BU1032, BU1111, BU2075, BU7832, MC2222]
- Column: title
- Samples: [The Busy Executive's Database Guide, Cooking with Computers: Surreptitious Balance Sheets, You Can Combat Computer Stress!, Straight Talk About Computers, Silicon Valley Gastronomic Treats]
- Column: type
- Samples: [business, business, business, business, mod_cook]
- Column: pub_id
- Samples: [1389, 1389, 0736, 1389, 0877]
- Column: price
- Samples: [19.99, 11.95, 2.99, 19.99, 19.99]
- Column: advance
- Samples: [5000.0, 5000.0, 10125.0, 5000.0, 0.0]
- Column: royalty
- Samples: [10, 10, 24, 10, 12]
- Column: ytd_sales
- Samples: [4095, 3876, 18722, 4095, 2032]
- Column: notes
- Samples: [An overview of available database systems with emphasis on common busi..., Helpful hints on how to use your electronic resources to the best adva..., The latest medical and psychological techniques for living with the el..., Annotated analysis of what computers can do for you: a no-hype guide f..., Favorite recipes for quick, easy, and elegant meals. (truncated)]
- Column: pubdate
- Samples: [1991-06-12 00:00:00.0, 1991-06-09 00:00:00.0, 1991-06-30 00:00:00.0, 1991-06-22 00:00:00.0, 1991-06-09 00:00:00.0]
- Table: roysched
- Column: title_id
- Samples: [BU1032, BU1032, PC1035, PC1035, PC1035]
- Column: lorange
- Samples: [0, 5001, 0, 2001, 3001]
- Column: hirange
- Samples: [5000, 50000, 2000, 3000, 4000]
- Column: royalty
- Samples: [10, 12, 10, 12, 14]
- Table: sales
- Column: stor_id
- Samples: [6380, 6380, 7066, 7066, 7067]
- Column: ord_num
- Samples: [6871, 722a, A2976, QA7442.3, D4482]
- Column: ord_date
- Samples: [1994-09-14 00:00:00.0, 1994-09-13 00:00:00.0, 1993-05-24 00:00:00.0, 1994-09-13 00:00:00.0, 1994-09-14 00:00:00.0]
- Column: qty
- Samples: [5, 3, 50, 75, 10]
- Column: payterms
- Samples: [Net 60, Net 60, Net 30, ON invoice, Net 60]
- Column: title_id
- Samples: [BU1032, PS2091, PC8888, PS2091, PS2091]
- Table: titleauthor
- Column: au_id
- Samples: [172-32-1176, 213-46-8915, 213-46-8915, 238-95-7766, 267-41-2394]
- Column: title_id
- Samples: [PS3333, BU1032, BU2075, PC1035, BU1111]
- Column: au_ord
- Samples: [1, 2, 1, 1, 2]
- Column: royaltyper
- Samples: [100, 40, 100, 100, 40]
| SELECT T1.title, T2.pub_name, T1.ytd_sales FROM titles AS T1 INNER JOIN publishers AS T2 ON T1.pub_id = T2.pub_id WHERE T1.notes = 'Carefully researched study of the effects of strong emotions on the body. Metabolic charts included.' |
|
Solve the following sql problem:
Name the top five titles that sold more than average and list them in descending order of the number of sales in California stores?
Schema:
SCHEMA:
- Table: authors
- Column: au_id
- Samples: [172-32-1176, 213-46-8915, 238-95-7766, 267-41-2394, 274-80-9391]
- Column: au_lname
- Samples: [White, Green, Carson, O'Leary, Straight]
- Column: au_fname
- Samples: [Johnson, Marjorie, Cheryl, Michael, Dean]
- Column: phone
- Samples: [408 496-7223, 415 986-7020, 415 548-7723, 408 286-2428, 415 834-2919]
- Column: address
- Samples: [10932 Bigge Rd., 309 63rd St. #411, 589 Darwin Ln., 22 Cleveland Av. #14, 5420 College Av.]
- Column: city
- Samples: [Menlo Park, Oakland, Berkeley, San Jose, Oakland]
- Column: state
- Samples: [CA, CA, CA, CA, CA]
- Column: zip
- Samples: [94025, 94618, 94705, 95128, 94609]
- Column: contract
- Samples: [0, 0, 0, 0, 0]
- Table: jobs
- Column: job_id
- Samples: [1, 2, 3, 4, 5]
- Column: job_desc
- Samples: [New Hire - Job not specified, Chief Executive Officer, Business Operations Manager, Chief Financial Officier, Publisher]
- Column: min_lvl
- Samples: [10, 200, 175, 175, 150]
- Column: max_lvl
- Samples: [10, 250, 225, 250, 250]
- Table: publishers
- Column: pub_id
- Samples: [0736, 0877, 1389, 1622, 1756]
- Column: pub_name
- Samples: [New Moon Books, Binnet & Hardley, Algodata Infosystems, Five Lakes Publishing, Ramona Publishers]
- Column: city
- Samples: [Boston, Washington, Berkeley, Chicago, Dallas]
- Column: state
- Samples: [MA, DC, CA, IL, TX]
- Column: country
- Samples: [USA, USA, USA, USA, USA]
- Table: employee
- Column: emp_id
- Samples: [A-C71970F, A-R89858F, AMD15433F, ARD36773F, CFH28514M]
- Column: fname
- Samples: [Aria, Annette, Ann, Anabela, Carlos]
- Column: minit
- Samples: [, , M, R, F]
- Column: lname
- Samples: [Cruz, Roulet, Devon, Domingues, Hernadez]
- Column: job_id
- Samples: [10, 6, 3, 8, 5]
- Column: job_lvl
- Samples: [87, 152, 200, 100, 211]
- Column: pub_id
- Samples: [1389, 9999, 9952, 0877, 9999]
- Column: hire_date
- Samples: [1991-10-26 00:00:00.0, 1990-02-21 00:00:00.0, 1991-07-16 00:00:00.0, 1993-01-27 00:00:00.0, 1989-04-21 00:00:00.0]
- Table: pub_info
- Column: pub_id
- Samples: [0877, 1389, 1622, 1756, 9901]
- Column: logo
- Samples: [0x4749463839618B002F00B30F00000000800000008000808000000080800080008080..., 0x474946383961C2001D00B30F00000000800000008000808000000080800080008080..., 0x474946383961F5003400B30F00000000800000008000808000000080800080008080..., 0x474946383961E3002500B30F00000000800000008000808000000080800080008080..., 0x4749463839615D002200B30F00000000800000008000808000000080800080008080... (truncated)]
- Column: pr_info
- Samples: [This is sample text data for Binnet & Hardley, publisher 0877 in the p..., This is sample text data for Algodata Infosystems, publisher 1389 in t..., This is sample text data for Five Lakes Publishing, publisher 1622 in ..., This is sample text data for Ramona Publishers, publisher 1756 in the ..., This is sample text data for GGG&G, publisher 9901 in the pubs databas... (truncated)]
- Table: stores
- Column: stor_id
- Samples: [6380, 7066, 7067, 7131, 7896]
- Column: stor_name
- Samples: [Eric the Read Books, Barnum's, News & Brews, Doc-U-Mat: Quality Laundry and Books, Fricative Bookshop]
- Column: stor_address
- Samples: [788 Catamaugus Ave., 567 Pasadena Ave., 577 First St., 24-A Avogadro Way, 89 Madison St.]
- Column: city
- Samples: [Seattle, Tustin, Los Gatos, Remulade, Fremont]
- Column: state
- Samples: [WA, CA, CA, WA, CA]
- Column: zip
- Samples: [98056, 92789, 96745, 98014, 90019]
- Table: discounts
- Column: discounttype
- Samples: [Initial Customer, Volume Discount, Customer Discount]
- Column: stor_id
- Samples: [None, None, 8042]
- Column: lowqty
- Samples: [None, 100, None]
- Column: highqty
- Samples: [None, 1000, None]
- Column: discount
- Samples: [10.5, 6.7, 5.0]
- Table: titles
- Column: title_id
- Samples: [BU1032, BU1111, BU2075, BU7832, MC2222]
- Column: title
- Samples: [The Busy Executive's Database Guide, Cooking with Computers: Surreptitious Balance Sheets, You Can Combat Computer Stress!, Straight Talk About Computers, Silicon Valley Gastronomic Treats]
- Column: type
- Samples: [business, business, business, business, mod_cook]
- Column: pub_id
- Samples: [1389, 1389, 0736, 1389, 0877]
- Column: price
- Samples: [19.99, 11.95, 2.99, 19.99, 19.99]
- Column: advance
- Samples: [5000.0, 5000.0, 10125.0, 5000.0, 0.0]
- Column: royalty
- Samples: [10, 10, 24, 10, 12]
- Column: ytd_sales
- Samples: [4095, 3876, 18722, 4095, 2032]
- Column: notes
- Samples: [An overview of available database systems with emphasis on common busi..., Helpful hints on how to use your electronic resources to the best adva..., The latest medical and psychological techniques for living with the el..., Annotated analysis of what computers can do for you: a no-hype guide f..., Favorite recipes for quick, easy, and elegant meals. (truncated)]
- Column: pubdate
- Samples: [1991-06-12 00:00:00.0, 1991-06-09 00:00:00.0, 1991-06-30 00:00:00.0, 1991-06-22 00:00:00.0, 1991-06-09 00:00:00.0]
- Table: roysched
- Column: title_id
- Samples: [BU1032, BU1032, PC1035, PC1035, PC1035]
- Column: lorange
- Samples: [0, 5001, 0, 2001, 3001]
- Column: hirange
- Samples: [5000, 50000, 2000, 3000, 4000]
- Column: royalty
- Samples: [10, 12, 10, 12, 14]
- Table: sales
- Column: stor_id
- Samples: [6380, 6380, 7066, 7066, 7067]
- Column: ord_num
- Samples: [6871, 722a, A2976, QA7442.3, D4482]
- Column: ord_date
- Samples: [1994-09-14 00:00:00.0, 1994-09-13 00:00:00.0, 1993-05-24 00:00:00.0, 1994-09-13 00:00:00.0, 1994-09-14 00:00:00.0]
- Column: qty
- Samples: [5, 3, 50, 75, 10]
- Column: payterms
- Samples: [Net 60, Net 60, Net 30, ON invoice, Net 60]
- Column: title_id
- Samples: [BU1032, PS2091, PC8888, PS2091, PS2091]
- Table: titleauthor
- Column: au_id
- Samples: [172-32-1176, 213-46-8915, 213-46-8915, 238-95-7766, 267-41-2394]
- Column: title_id
- Samples: [PS3333, BU1032, BU2075, PC1035, BU1111]
- Column: au_ord
- Samples: [1, 2, 1, 1, 2]
- Column: royaltyper
- Samples: [100, 40, 100, 100, 40]
| SELECT T1.title FROM titles AS T1 INNER JOIN sales AS T2 ON T1.title_id = T2.title_id INNER JOIN publishers AS T3 ON T1.pub_id = T3.pub_id WHERE T2.qty > ( SELECT CAST(SUM(qty) AS REAL) / COUNT(title_id) FROM sales ) AND T3.state = 'CA' ORDER BY T2.qty DESC LIMIT 5 |
|
Solve the following sql problem:
On which day was the most verbose complaint received?
Schema:
SCHEMA:
- Table: state
- Column: StateCode
- Samples: [AL, AR, AZ, CA, CO]
- Column: State
- Samples: [Alabama, Arkansas, Arizona, California, Colorado]
- Column: Region
- Samples: [South, South, West, West, West]
- Table: callcenterlogs
- Column: Date received
- Samples: [2017-03-27, 2017-03-27, 2017-03-27, 2017-03-23, 2017-03-22]
- Column: Complaint ID
- Samples: [CR2406263, CR2405641, CR2405629, CR2400594, CR2399607]
- Column: rand client
- Samples: [C00004587, C00003328, C00001685, C00001945, C00004303]
- Column: phonefinal
- Samples: [977-806-9726, 322-598-7152, 508-311-5237, 265-394-2727, 206-008-0460]
- Column: vru+line
- Samples: [AA0103, AA0205, AA0110, AA0113, AA0102]
- Column: call_id
- Samples: [34536, 34537, 34538, 34540, 34541]
- Column: priority
- Samples: [0, 0, 2, 2, 1]
- Column: type
- Samples: [NW, PS, PS, PS, PS]
- Column: outcome
- Samples: [AGENT, AGENT, AGENT, AGENT, AGENT]
- Column: server
- Samples: [MICHAL, TOVA, YIFAT, AVNI, STEREN]
- Column: ser_start
- Samples: [13:34:11, 10:58:22, 13:00:54, 16:18:21, 14:48:22]
- Column: ser_exit
- Samples: [13:40:23, 11:16:10, 13:13:31, 16:19:40, 14:55:19]
- Column: ser_time
- Samples: [00:06:12, 00:17:48, 00:12:37, 00:01:19, 00:06:57]
- Table: client
- Column: client_id
- Samples: [C00000001, C00000002, C00000003, C00000004, C00000005]
- Column: sex
- Samples: [Female, Male, Female, Male, Female]
- Column: day
- Samples: [13, 4, 9, 1, 3]
- Column: month
- Samples: [12, 2, 10, 12, 7]
- Column: year
- Samples: [1990, 1965, 1960, 1976, 1980]
- Column: age
- Samples: [29, 54, 59, 43, 39]
- Column: social
- Samples: [926-93-2157, 806-94-5725, 614-70-9100, 580-20-3414, 536-14-5809]
- Column: first
- Samples: [Emma, Noah, Olivia, Liam, Sophia]
- Column: middle
- Samples: [Avaya, Everest, Brooklynne, Irvin, Danae]
- Column: last
- Samples: [Smith, Thompson, Johnson, White, Williams]
- Column: phone
- Samples: [367-171-6840, 212-423-7734, 212-425-6932, 951-567-8925, 428-265-1568]
- Column: email
- Samples: [[email protected], [email protected], [email protected], [email protected], [email protected]]
- Column: address_1
- Samples: [387 Wellington Ave., 75 W. Berkshire St., 36 Second St., 7607 Sunnyslope Street, 755 Galvin Street]
- Column: address_2
- Samples: [Unit 1, None, None, None, None]
- Column: city
- Samples: [Albuquerque, New York City, New York City, Indianapolis, Indianapolis]
- Column: state
- Samples: [NM, NY, NY, IN, IN]
- Column: zipcode
- Samples: [47246, 10040, 10162, 49047, 40852]
- Column: district_id
- Samples: [18, 1, 1, 5, 5]
- Table: district
- Column: district_id
- Samples: [1, 2, 3, 4, 5]
- Column: city
- Samples: [New York City, Jacksonville, Columbus, Charlotte, Indianapolis]
- Column: state_abbrev
- Samples: [NY, FL, OH, NC, IN]
- Column: division
- Samples: [Middle Atlantic, South Atlantic, East North Central, South Atlantic, East North Central]
- Table: events
- Column: Date received
- Samples: [2014-07-03, 2012-04-12, 2012-04-03, 2012-03-14, 2012-03-05]
- Column: Product
- Samples: [Bank account or service, Bank account or service, Bank account or service, Credit card, Bank account or service]
- Column: Sub-product
- Samples: [Checking account, Savings account, Checking account, None, Checking account]
- Column: Issue
- Samples: [Deposits and withdrawals, Account opening, closing, or management, Account opening, closing, or management, Billing disputes, Account opening, closing, or management]
- Column: Sub-issue
- Samples: [None, None, None, None, None]
- Column: Consumer complaint narrative
- Samples: [None, None, None, None, None]
- Column: Tags
- Samples: [None, None, None, None, None]
- Column: Consumer consent provided?
- Samples: [N/A, N/A, N/A, N/A, N/A]
- Column: Submitted via
- Samples: [Email, Email, Email, Email, Email]
- Column: Date sent to company
- Samples: [2014-07-09, 2012-04-13, 2012-04-03, 2012-03-14, 2012-03-06]
- Column: Company response to consumer
- Samples: [Closed with explanation, Closed with relief, Closed without relief, Closed with relief, Closed with relief]
- Column: Timely response?
- Samples: [Yes, Yes, Yes, Yes, Yes]
- Column: Consumer disputed?
- Samples: [No, No, No, No, No]
- Column: Complaint ID
- Samples: [CR0922485, CR0057298, CR0043811, CR0035411, CR0030939]
- Column: Client_ID
- Samples: [C00001925, C00003141, C00000297, C00004275, C00000900]
- Table: reviews
- Column: Date
- Samples: [2017-10-04, 2017-10-02, 2017-08-21, 2017-12-17, 2016-05-27]
- Column: Stars
- Samples: [5, 5, 5, 5, 5]
- Column: Reviews
- Samples: [Great job, Eagle National! Each person was professional and helped us ..., Matthew Richardson is professional and helpful. He helped us find the ..., We had a past experience with Eagle National Mortgage and would withou..., We have been dealing with Brad Thomka from the beginning of what start..., I can't express how grateful I am for the support that Zach provided t... (truncated)]
- Column: Product
- Samples: [Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage]
- Column: district_id
- Samples: [65, 66, 23, 55, 24]
| SELECT `Date received` FROM callcenterlogs WHERE ser_time = ( SELECT MAX(ser_time) FROM callcenterlogs ) |
|
Solve the following sql problem:
When did the earliest complaint start on 2017/3/22?
Schema:
SCHEMA:
- Table: state
- Column: StateCode
- Samples: [AL, AR, AZ, CA, CO]
- Column: State
- Samples: [Alabama, Arkansas, Arizona, California, Colorado]
- Column: Region
- Samples: [South, South, West, West, West]
- Table: callcenterlogs
- Column: Date received
- Samples: [2017-03-27, 2017-03-27, 2017-03-27, 2017-03-23, 2017-03-22]
- Column: Complaint ID
- Samples: [CR2406263, CR2405641, CR2405629, CR2400594, CR2399607]
- Column: rand client
- Samples: [C00004587, C00003328, C00001685, C00001945, C00004303]
- Column: phonefinal
- Samples: [977-806-9726, 322-598-7152, 508-311-5237, 265-394-2727, 206-008-0460]
- Column: vru+line
- Samples: [AA0103, AA0205, AA0110, AA0113, AA0102]
- Column: call_id
- Samples: [34536, 34537, 34538, 34540, 34541]
- Column: priority
- Samples: [0, 0, 2, 2, 1]
- Column: type
- Samples: [NW, PS, PS, PS, PS]
- Column: outcome
- Samples: [AGENT, AGENT, AGENT, AGENT, AGENT]
- Column: server
- Samples: [MICHAL, TOVA, YIFAT, AVNI, STEREN]
- Column: ser_start
- Samples: [13:34:11, 10:58:22, 13:00:54, 16:18:21, 14:48:22]
- Column: ser_exit
- Samples: [13:40:23, 11:16:10, 13:13:31, 16:19:40, 14:55:19]
- Column: ser_time
- Samples: [00:06:12, 00:17:48, 00:12:37, 00:01:19, 00:06:57]
- Table: client
- Column: client_id
- Samples: [C00000001, C00000002, C00000003, C00000004, C00000005]
- Column: sex
- Samples: [Female, Male, Female, Male, Female]
- Column: day
- Samples: [13, 4, 9, 1, 3]
- Column: month
- Samples: [12, 2, 10, 12, 7]
- Column: year
- Samples: [1990, 1965, 1960, 1976, 1980]
- Column: age
- Samples: [29, 54, 59, 43, 39]
- Column: social
- Samples: [926-93-2157, 806-94-5725, 614-70-9100, 580-20-3414, 536-14-5809]
- Column: first
- Samples: [Emma, Noah, Olivia, Liam, Sophia]
- Column: middle
- Samples: [Avaya, Everest, Brooklynne, Irvin, Danae]
- Column: last
- Samples: [Smith, Thompson, Johnson, White, Williams]
- Column: phone
- Samples: [367-171-6840, 212-423-7734, 212-425-6932, 951-567-8925, 428-265-1568]
- Column: email
- Samples: [[email protected], [email protected], [email protected], [email protected], [email protected]]
- Column: address_1
- Samples: [387 Wellington Ave., 75 W. Berkshire St., 36 Second St., 7607 Sunnyslope Street, 755 Galvin Street]
- Column: address_2
- Samples: [Unit 1, None, None, None, None]
- Column: city
- Samples: [Albuquerque, New York City, New York City, Indianapolis, Indianapolis]
- Column: state
- Samples: [NM, NY, NY, IN, IN]
- Column: zipcode
- Samples: [47246, 10040, 10162, 49047, 40852]
- Column: district_id
- Samples: [18, 1, 1, 5, 5]
- Table: district
- Column: district_id
- Samples: [1, 2, 3, 4, 5]
- Column: city
- Samples: [New York City, Jacksonville, Columbus, Charlotte, Indianapolis]
- Column: state_abbrev
- Samples: [NY, FL, OH, NC, IN]
- Column: division
- Samples: [Middle Atlantic, South Atlantic, East North Central, South Atlantic, East North Central]
- Table: events
- Column: Date received
- Samples: [2014-07-03, 2012-04-12, 2012-04-03, 2012-03-14, 2012-03-05]
- Column: Product
- Samples: [Bank account or service, Bank account or service, Bank account or service, Credit card, Bank account or service]
- Column: Sub-product
- Samples: [Checking account, Savings account, Checking account, None, Checking account]
- Column: Issue
- Samples: [Deposits and withdrawals, Account opening, closing, or management, Account opening, closing, or management, Billing disputes, Account opening, closing, or management]
- Column: Sub-issue
- Samples: [None, None, None, None, None]
- Column: Consumer complaint narrative
- Samples: [None, None, None, None, None]
- Column: Tags
- Samples: [None, None, None, None, None]
- Column: Consumer consent provided?
- Samples: [N/A, N/A, N/A, N/A, N/A]
- Column: Submitted via
- Samples: [Email, Email, Email, Email, Email]
- Column: Date sent to company
- Samples: [2014-07-09, 2012-04-13, 2012-04-03, 2012-03-14, 2012-03-06]
- Column: Company response to consumer
- Samples: [Closed with explanation, Closed with relief, Closed without relief, Closed with relief, Closed with relief]
- Column: Timely response?
- Samples: [Yes, Yes, Yes, Yes, Yes]
- Column: Consumer disputed?
- Samples: [No, No, No, No, No]
- Column: Complaint ID
- Samples: [CR0922485, CR0057298, CR0043811, CR0035411, CR0030939]
- Column: Client_ID
- Samples: [C00001925, C00003141, C00000297, C00004275, C00000900]
- Table: reviews
- Column: Date
- Samples: [2017-10-04, 2017-10-02, 2017-08-21, 2017-12-17, 2016-05-27]
- Column: Stars
- Samples: [5, 5, 5, 5, 5]
- Column: Reviews
- Samples: [Great job, Eagle National! Each person was professional and helped us ..., Matthew Richardson is professional and helpful. He helped us find the ..., We had a past experience with Eagle National Mortgage and would withou..., We have been dealing with Brad Thomka from the beginning of what start..., I can't express how grateful I am for the support that Zach provided t... (truncated)]
- Column: Product
- Samples: [Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage]
- Column: district_id
- Samples: [65, 66, 23, 55, 24]
| SELECT MIN(ser_time) FROM callcenterlogs WHERE `Date received` = '2017-03-22' |
|
Solve the following sql problem:
Which complaint is more urgent, complaint ID CR2400594 or ID CR2405641?
Schema:
SCHEMA:
- Table: state
- Column: StateCode
- Samples: [AL, AR, AZ, CA, CO]
- Column: State
- Samples: [Alabama, Arkansas, Arizona, California, Colorado]
- Column: Region
- Samples: [South, South, West, West, West]
- Table: callcenterlogs
- Column: Date received
- Samples: [2017-03-27, 2017-03-27, 2017-03-27, 2017-03-23, 2017-03-22]
- Column: Complaint ID
- Samples: [CR2406263, CR2405641, CR2405629, CR2400594, CR2399607]
- Column: rand client
- Samples: [C00004587, C00003328, C00001685, C00001945, C00004303]
- Column: phonefinal
- Samples: [977-806-9726, 322-598-7152, 508-311-5237, 265-394-2727, 206-008-0460]
- Column: vru+line
- Samples: [AA0103, AA0205, AA0110, AA0113, AA0102]
- Column: call_id
- Samples: [34536, 34537, 34538, 34540, 34541]
- Column: priority
- Samples: [0, 0, 2, 2, 1]
- Column: type
- Samples: [NW, PS, PS, PS, PS]
- Column: outcome
- Samples: [AGENT, AGENT, AGENT, AGENT, AGENT]
- Column: server
- Samples: [MICHAL, TOVA, YIFAT, AVNI, STEREN]
- Column: ser_start
- Samples: [13:34:11, 10:58:22, 13:00:54, 16:18:21, 14:48:22]
- Column: ser_exit
- Samples: [13:40:23, 11:16:10, 13:13:31, 16:19:40, 14:55:19]
- Column: ser_time
- Samples: [00:06:12, 00:17:48, 00:12:37, 00:01:19, 00:06:57]
- Table: client
- Column: client_id
- Samples: [C00000001, C00000002, C00000003, C00000004, C00000005]
- Column: sex
- Samples: [Female, Male, Female, Male, Female]
- Column: day
- Samples: [13, 4, 9, 1, 3]
- Column: month
- Samples: [12, 2, 10, 12, 7]
- Column: year
- Samples: [1990, 1965, 1960, 1976, 1980]
- Column: age
- Samples: [29, 54, 59, 43, 39]
- Column: social
- Samples: [926-93-2157, 806-94-5725, 614-70-9100, 580-20-3414, 536-14-5809]
- Column: first
- Samples: [Emma, Noah, Olivia, Liam, Sophia]
- Column: middle
- Samples: [Avaya, Everest, Brooklynne, Irvin, Danae]
- Column: last
- Samples: [Smith, Thompson, Johnson, White, Williams]
- Column: phone
- Samples: [367-171-6840, 212-423-7734, 212-425-6932, 951-567-8925, 428-265-1568]
- Column: email
- Samples: [[email protected], [email protected], [email protected], [email protected], [email protected]]
- Column: address_1
- Samples: [387 Wellington Ave., 75 W. Berkshire St., 36 Second St., 7607 Sunnyslope Street, 755 Galvin Street]
- Column: address_2
- Samples: [Unit 1, None, None, None, None]
- Column: city
- Samples: [Albuquerque, New York City, New York City, Indianapolis, Indianapolis]
- Column: state
- Samples: [NM, NY, NY, IN, IN]
- Column: zipcode
- Samples: [47246, 10040, 10162, 49047, 40852]
- Column: district_id
- Samples: [18, 1, 1, 5, 5]
- Table: district
- Column: district_id
- Samples: [1, 2, 3, 4, 5]
- Column: city
- Samples: [New York City, Jacksonville, Columbus, Charlotte, Indianapolis]
- Column: state_abbrev
- Samples: [NY, FL, OH, NC, IN]
- Column: division
- Samples: [Middle Atlantic, South Atlantic, East North Central, South Atlantic, East North Central]
- Table: events
- Column: Date received
- Samples: [2014-07-03, 2012-04-12, 2012-04-03, 2012-03-14, 2012-03-05]
- Column: Product
- Samples: [Bank account or service, Bank account or service, Bank account or service, Credit card, Bank account or service]
- Column: Sub-product
- Samples: [Checking account, Savings account, Checking account, None, Checking account]
- Column: Issue
- Samples: [Deposits and withdrawals, Account opening, closing, or management, Account opening, closing, or management, Billing disputes, Account opening, closing, or management]
- Column: Sub-issue
- Samples: [None, None, None, None, None]
- Column: Consumer complaint narrative
- Samples: [None, None, None, None, None]
- Column: Tags
- Samples: [None, None, None, None, None]
- Column: Consumer consent provided?
- Samples: [N/A, N/A, N/A, N/A, N/A]
- Column: Submitted via
- Samples: [Email, Email, Email, Email, Email]
- Column: Date sent to company
- Samples: [2014-07-09, 2012-04-13, 2012-04-03, 2012-03-14, 2012-03-06]
- Column: Company response to consumer
- Samples: [Closed with explanation, Closed with relief, Closed without relief, Closed with relief, Closed with relief]
- Column: Timely response?
- Samples: [Yes, Yes, Yes, Yes, Yes]
- Column: Consumer disputed?
- Samples: [No, No, No, No, No]
- Column: Complaint ID
- Samples: [CR0922485, CR0057298, CR0043811, CR0035411, CR0030939]
- Column: Client_ID
- Samples: [C00001925, C00003141, C00000297, C00004275, C00000900]
- Table: reviews
- Column: Date
- Samples: [2017-10-04, 2017-10-02, 2017-08-21, 2017-12-17, 2016-05-27]
- Column: Stars
- Samples: [5, 5, 5, 5, 5]
- Column: Reviews
- Samples: [Great job, Eagle National! Each person was professional and helped us ..., Matthew Richardson is professional and helpful. He helped us find the ..., We had a past experience with Eagle National Mortgage and would withou..., We have been dealing with Brad Thomka from the beginning of what start..., I can't express how grateful I am for the support that Zach provided t... (truncated)]
- Column: Product
- Samples: [Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage]
- Column: district_id
- Samples: [65, 66, 23, 55, 24]
| SELECT CASE WHEN SUM(CASE WHEN `Complaint ID` = 'CR2400594' THEN priority END) > SUM(CASE WHEN `Complaint ID` = 'CR2405641' THEN priority END) THEN 'CR2400594' ELSE 'CR2405641' END FROM callcenterlogs |
|
Solve the following sql problem:
Please list the full names of all the male clients born after the year 1990.
Schema:
SCHEMA:
- Table: state
- Column: StateCode
- Samples: [AL, AR, AZ, CA, CO]
- Column: State
- Samples: [Alabama, Arkansas, Arizona, California, Colorado]
- Column: Region
- Samples: [South, South, West, West, West]
- Table: callcenterlogs
- Column: Date received
- Samples: [2017-03-27, 2017-03-27, 2017-03-27, 2017-03-23, 2017-03-22]
- Column: Complaint ID
- Samples: [CR2406263, CR2405641, CR2405629, CR2400594, CR2399607]
- Column: rand client
- Samples: [C00004587, C00003328, C00001685, C00001945, C00004303]
- Column: phonefinal
- Samples: [977-806-9726, 322-598-7152, 508-311-5237, 265-394-2727, 206-008-0460]
- Column: vru+line
- Samples: [AA0103, AA0205, AA0110, AA0113, AA0102]
- Column: call_id
- Samples: [34536, 34537, 34538, 34540, 34541]
- Column: priority
- Samples: [0, 0, 2, 2, 1]
- Column: type
- Samples: [NW, PS, PS, PS, PS]
- Column: outcome
- Samples: [AGENT, AGENT, AGENT, AGENT, AGENT]
- Column: server
- Samples: [MICHAL, TOVA, YIFAT, AVNI, STEREN]
- Column: ser_start
- Samples: [13:34:11, 10:58:22, 13:00:54, 16:18:21, 14:48:22]
- Column: ser_exit
- Samples: [13:40:23, 11:16:10, 13:13:31, 16:19:40, 14:55:19]
- Column: ser_time
- Samples: [00:06:12, 00:17:48, 00:12:37, 00:01:19, 00:06:57]
- Table: client
- Column: client_id
- Samples: [C00000001, C00000002, C00000003, C00000004, C00000005]
- Column: sex
- Samples: [Female, Male, Female, Male, Female]
- Column: day
- Samples: [13, 4, 9, 1, 3]
- Column: month
- Samples: [12, 2, 10, 12, 7]
- Column: year
- Samples: [1990, 1965, 1960, 1976, 1980]
- Column: age
- Samples: [29, 54, 59, 43, 39]
- Column: social
- Samples: [926-93-2157, 806-94-5725, 614-70-9100, 580-20-3414, 536-14-5809]
- Column: first
- Samples: [Emma, Noah, Olivia, Liam, Sophia]
- Column: middle
- Samples: [Avaya, Everest, Brooklynne, Irvin, Danae]
- Column: last
- Samples: [Smith, Thompson, Johnson, White, Williams]
- Column: phone
- Samples: [367-171-6840, 212-423-7734, 212-425-6932, 951-567-8925, 428-265-1568]
- Column: email
- Samples: [[email protected], [email protected], [email protected], [email protected], [email protected]]
- Column: address_1
- Samples: [387 Wellington Ave., 75 W. Berkshire St., 36 Second St., 7607 Sunnyslope Street, 755 Galvin Street]
- Column: address_2
- Samples: [Unit 1, None, None, None, None]
- Column: city
- Samples: [Albuquerque, New York City, New York City, Indianapolis, Indianapolis]
- Column: state
- Samples: [NM, NY, NY, IN, IN]
- Column: zipcode
- Samples: [47246, 10040, 10162, 49047, 40852]
- Column: district_id
- Samples: [18, 1, 1, 5, 5]
- Table: district
- Column: district_id
- Samples: [1, 2, 3, 4, 5]
- Column: city
- Samples: [New York City, Jacksonville, Columbus, Charlotte, Indianapolis]
- Column: state_abbrev
- Samples: [NY, FL, OH, NC, IN]
- Column: division
- Samples: [Middle Atlantic, South Atlantic, East North Central, South Atlantic, East North Central]
- Table: events
- Column: Date received
- Samples: [2014-07-03, 2012-04-12, 2012-04-03, 2012-03-14, 2012-03-05]
- Column: Product
- Samples: [Bank account or service, Bank account or service, Bank account or service, Credit card, Bank account or service]
- Column: Sub-product
- Samples: [Checking account, Savings account, Checking account, None, Checking account]
- Column: Issue
- Samples: [Deposits and withdrawals, Account opening, closing, or management, Account opening, closing, or management, Billing disputes, Account opening, closing, or management]
- Column: Sub-issue
- Samples: [None, None, None, None, None]
- Column: Consumer complaint narrative
- Samples: [None, None, None, None, None]
- Column: Tags
- Samples: [None, None, None, None, None]
- Column: Consumer consent provided?
- Samples: [N/A, N/A, N/A, N/A, N/A]
- Column: Submitted via
- Samples: [Email, Email, Email, Email, Email]
- Column: Date sent to company
- Samples: [2014-07-09, 2012-04-13, 2012-04-03, 2012-03-14, 2012-03-06]
- Column: Company response to consumer
- Samples: [Closed with explanation, Closed with relief, Closed without relief, Closed with relief, Closed with relief]
- Column: Timely response?
- Samples: [Yes, Yes, Yes, Yes, Yes]
- Column: Consumer disputed?
- Samples: [No, No, No, No, No]
- Column: Complaint ID
- Samples: [CR0922485, CR0057298, CR0043811, CR0035411, CR0030939]
- Column: Client_ID
- Samples: [C00001925, C00003141, C00000297, C00004275, C00000900]
- Table: reviews
- Column: Date
- Samples: [2017-10-04, 2017-10-02, 2017-08-21, 2017-12-17, 2016-05-27]
- Column: Stars
- Samples: [5, 5, 5, 5, 5]
- Column: Reviews
- Samples: [Great job, Eagle National! Each person was professional and helped us ..., Matthew Richardson is professional and helpful. He helped us find the ..., We had a past experience with Eagle National Mortgage and would withou..., We have been dealing with Brad Thomka from the beginning of what start..., I can't express how grateful I am for the support that Zach provided t... (truncated)]
- Column: Product
- Samples: [Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage]
- Column: district_id
- Samples: [65, 66, 23, 55, 24]
| SELECT first, middle, last FROM client WHERE year > 1990 |
|
Solve the following sql problem:
How many complaints have the client Diesel Galloway filed?
Schema:
SCHEMA:
- Table: state
- Column: StateCode
- Samples: [AL, AR, AZ, CA, CO]
- Column: State
- Samples: [Alabama, Arkansas, Arizona, California, Colorado]
- Column: Region
- Samples: [South, South, West, West, West]
- Table: callcenterlogs
- Column: Date received
- Samples: [2017-03-27, 2017-03-27, 2017-03-27, 2017-03-23, 2017-03-22]
- Column: Complaint ID
- Samples: [CR2406263, CR2405641, CR2405629, CR2400594, CR2399607]
- Column: rand client
- Samples: [C00004587, C00003328, C00001685, C00001945, C00004303]
- Column: phonefinal
- Samples: [977-806-9726, 322-598-7152, 508-311-5237, 265-394-2727, 206-008-0460]
- Column: vru+line
- Samples: [AA0103, AA0205, AA0110, AA0113, AA0102]
- Column: call_id
- Samples: [34536, 34537, 34538, 34540, 34541]
- Column: priority
- Samples: [0, 0, 2, 2, 1]
- Column: type
- Samples: [NW, PS, PS, PS, PS]
- Column: outcome
- Samples: [AGENT, AGENT, AGENT, AGENT, AGENT]
- Column: server
- Samples: [MICHAL, TOVA, YIFAT, AVNI, STEREN]
- Column: ser_start
- Samples: [13:34:11, 10:58:22, 13:00:54, 16:18:21, 14:48:22]
- Column: ser_exit
- Samples: [13:40:23, 11:16:10, 13:13:31, 16:19:40, 14:55:19]
- Column: ser_time
- Samples: [00:06:12, 00:17:48, 00:12:37, 00:01:19, 00:06:57]
- Table: client
- Column: client_id
- Samples: [C00000001, C00000002, C00000003, C00000004, C00000005]
- Column: sex
- Samples: [Female, Male, Female, Male, Female]
- Column: day
- Samples: [13, 4, 9, 1, 3]
- Column: month
- Samples: [12, 2, 10, 12, 7]
- Column: year
- Samples: [1990, 1965, 1960, 1976, 1980]
- Column: age
- Samples: [29, 54, 59, 43, 39]
- Column: social
- Samples: [926-93-2157, 806-94-5725, 614-70-9100, 580-20-3414, 536-14-5809]
- Column: first
- Samples: [Emma, Noah, Olivia, Liam, Sophia]
- Column: middle
- Samples: [Avaya, Everest, Brooklynne, Irvin, Danae]
- Column: last
- Samples: [Smith, Thompson, Johnson, White, Williams]
- Column: phone
- Samples: [367-171-6840, 212-423-7734, 212-425-6932, 951-567-8925, 428-265-1568]
- Column: email
- Samples: [[email protected], [email protected], [email protected], [email protected], [email protected]]
- Column: address_1
- Samples: [387 Wellington Ave., 75 W. Berkshire St., 36 Second St., 7607 Sunnyslope Street, 755 Galvin Street]
- Column: address_2
- Samples: [Unit 1, None, None, None, None]
- Column: city
- Samples: [Albuquerque, New York City, New York City, Indianapolis, Indianapolis]
- Column: state
- Samples: [NM, NY, NY, IN, IN]
- Column: zipcode
- Samples: [47246, 10040, 10162, 49047, 40852]
- Column: district_id
- Samples: [18, 1, 1, 5, 5]
- Table: district
- Column: district_id
- Samples: [1, 2, 3, 4, 5]
- Column: city
- Samples: [New York City, Jacksonville, Columbus, Charlotte, Indianapolis]
- Column: state_abbrev
- Samples: [NY, FL, OH, NC, IN]
- Column: division
- Samples: [Middle Atlantic, South Atlantic, East North Central, South Atlantic, East North Central]
- Table: events
- Column: Date received
- Samples: [2014-07-03, 2012-04-12, 2012-04-03, 2012-03-14, 2012-03-05]
- Column: Product
- Samples: [Bank account or service, Bank account or service, Bank account or service, Credit card, Bank account or service]
- Column: Sub-product
- Samples: [Checking account, Savings account, Checking account, None, Checking account]
- Column: Issue
- Samples: [Deposits and withdrawals, Account opening, closing, or management, Account opening, closing, or management, Billing disputes, Account opening, closing, or management]
- Column: Sub-issue
- Samples: [None, None, None, None, None]
- Column: Consumer complaint narrative
- Samples: [None, None, None, None, None]
- Column: Tags
- Samples: [None, None, None, None, None]
- Column: Consumer consent provided?
- Samples: [N/A, N/A, N/A, N/A, N/A]
- Column: Submitted via
- Samples: [Email, Email, Email, Email, Email]
- Column: Date sent to company
- Samples: [2014-07-09, 2012-04-13, 2012-04-03, 2012-03-14, 2012-03-06]
- Column: Company response to consumer
- Samples: [Closed with explanation, Closed with relief, Closed without relief, Closed with relief, Closed with relief]
- Column: Timely response?
- Samples: [Yes, Yes, Yes, Yes, Yes]
- Column: Consumer disputed?
- Samples: [No, No, No, No, No]
- Column: Complaint ID
- Samples: [CR0922485, CR0057298, CR0043811, CR0035411, CR0030939]
- Column: Client_ID
- Samples: [C00001925, C00003141, C00000297, C00004275, C00000900]
- Table: reviews
- Column: Date
- Samples: [2017-10-04, 2017-10-02, 2017-08-21, 2017-12-17, 2016-05-27]
- Column: Stars
- Samples: [5, 5, 5, 5, 5]
- Column: Reviews
- Samples: [Great job, Eagle National! Each person was professional and helped us ..., Matthew Richardson is professional and helpful. He helped us find the ..., We had a past experience with Eagle National Mortgage and would withou..., We have been dealing with Brad Thomka from the beginning of what start..., I can't express how grateful I am for the support that Zach provided t... (truncated)]
- Column: Product
- Samples: [Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage]
- Column: district_id
- Samples: [65, 66, 23, 55, 24]
| SELECT COUNT(T1.client_id) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T1.first = 'Diesel' AND T1.last = 'Galloway' |
|
Solve the following sql problem:
What is the detailed product of the complaint filed by Diesel Galloway on 2014/7/3?
Schema:
SCHEMA:
- Table: state
- Column: StateCode
- Samples: [AL, AR, AZ, CA, CO]
- Column: State
- Samples: [Alabama, Arkansas, Arizona, California, Colorado]
- Column: Region
- Samples: [South, South, West, West, West]
- Table: callcenterlogs
- Column: Date received
- Samples: [2017-03-27, 2017-03-27, 2017-03-27, 2017-03-23, 2017-03-22]
- Column: Complaint ID
- Samples: [CR2406263, CR2405641, CR2405629, CR2400594, CR2399607]
- Column: rand client
- Samples: [C00004587, C00003328, C00001685, C00001945, C00004303]
- Column: phonefinal
- Samples: [977-806-9726, 322-598-7152, 508-311-5237, 265-394-2727, 206-008-0460]
- Column: vru+line
- Samples: [AA0103, AA0205, AA0110, AA0113, AA0102]
- Column: call_id
- Samples: [34536, 34537, 34538, 34540, 34541]
- Column: priority
- Samples: [0, 0, 2, 2, 1]
- Column: type
- Samples: [NW, PS, PS, PS, PS]
- Column: outcome
- Samples: [AGENT, AGENT, AGENT, AGENT, AGENT]
- Column: server
- Samples: [MICHAL, TOVA, YIFAT, AVNI, STEREN]
- Column: ser_start
- Samples: [13:34:11, 10:58:22, 13:00:54, 16:18:21, 14:48:22]
- Column: ser_exit
- Samples: [13:40:23, 11:16:10, 13:13:31, 16:19:40, 14:55:19]
- Column: ser_time
- Samples: [00:06:12, 00:17:48, 00:12:37, 00:01:19, 00:06:57]
- Table: client
- Column: client_id
- Samples: [C00000001, C00000002, C00000003, C00000004, C00000005]
- Column: sex
- Samples: [Female, Male, Female, Male, Female]
- Column: day
- Samples: [13, 4, 9, 1, 3]
- Column: month
- Samples: [12, 2, 10, 12, 7]
- Column: year
- Samples: [1990, 1965, 1960, 1976, 1980]
- Column: age
- Samples: [29, 54, 59, 43, 39]
- Column: social
- Samples: [926-93-2157, 806-94-5725, 614-70-9100, 580-20-3414, 536-14-5809]
- Column: first
- Samples: [Emma, Noah, Olivia, Liam, Sophia]
- Column: middle
- Samples: [Avaya, Everest, Brooklynne, Irvin, Danae]
- Column: last
- Samples: [Smith, Thompson, Johnson, White, Williams]
- Column: phone
- Samples: [367-171-6840, 212-423-7734, 212-425-6932, 951-567-8925, 428-265-1568]
- Column: email
- Samples: [[email protected], [email protected], [email protected], [email protected], [email protected]]
- Column: address_1
- Samples: [387 Wellington Ave., 75 W. Berkshire St., 36 Second St., 7607 Sunnyslope Street, 755 Galvin Street]
- Column: address_2
- Samples: [Unit 1, None, None, None, None]
- Column: city
- Samples: [Albuquerque, New York City, New York City, Indianapolis, Indianapolis]
- Column: state
- Samples: [NM, NY, NY, IN, IN]
- Column: zipcode
- Samples: [47246, 10040, 10162, 49047, 40852]
- Column: district_id
- Samples: [18, 1, 1, 5, 5]
- Table: district
- Column: district_id
- Samples: [1, 2, 3, 4, 5]
- Column: city
- Samples: [New York City, Jacksonville, Columbus, Charlotte, Indianapolis]
- Column: state_abbrev
- Samples: [NY, FL, OH, NC, IN]
- Column: division
- Samples: [Middle Atlantic, South Atlantic, East North Central, South Atlantic, East North Central]
- Table: events
- Column: Date received
- Samples: [2014-07-03, 2012-04-12, 2012-04-03, 2012-03-14, 2012-03-05]
- Column: Product
- Samples: [Bank account or service, Bank account or service, Bank account or service, Credit card, Bank account or service]
- Column: Sub-product
- Samples: [Checking account, Savings account, Checking account, None, Checking account]
- Column: Issue
- Samples: [Deposits and withdrawals, Account opening, closing, or management, Account opening, closing, or management, Billing disputes, Account opening, closing, or management]
- Column: Sub-issue
- Samples: [None, None, None, None, None]
- Column: Consumer complaint narrative
- Samples: [None, None, None, None, None]
- Column: Tags
- Samples: [None, None, None, None, None]
- Column: Consumer consent provided?
- Samples: [N/A, N/A, N/A, N/A, N/A]
- Column: Submitted via
- Samples: [Email, Email, Email, Email, Email]
- Column: Date sent to company
- Samples: [2014-07-09, 2012-04-13, 2012-04-03, 2012-03-14, 2012-03-06]
- Column: Company response to consumer
- Samples: [Closed with explanation, Closed with relief, Closed without relief, Closed with relief, Closed with relief]
- Column: Timely response?
- Samples: [Yes, Yes, Yes, Yes, Yes]
- Column: Consumer disputed?
- Samples: [No, No, No, No, No]
- Column: Complaint ID
- Samples: [CR0922485, CR0057298, CR0043811, CR0035411, CR0030939]
- Column: Client_ID
- Samples: [C00001925, C00003141, C00000297, C00004275, C00000900]
- Table: reviews
- Column: Date
- Samples: [2017-10-04, 2017-10-02, 2017-08-21, 2017-12-17, 2016-05-27]
- Column: Stars
- Samples: [5, 5, 5, 5, 5]
- Column: Reviews
- Samples: [Great job, Eagle National! Each person was professional and helped us ..., Matthew Richardson is professional and helpful. He helped us find the ..., We had a past experience with Eagle National Mortgage and would withou..., We have been dealing with Brad Thomka from the beginning of what start..., I can't express how grateful I am for the support that Zach provided t... (truncated)]
- Column: Product
- Samples: [Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage]
- Column: district_id
- Samples: [65, 66, 23, 55, 24]
| SELECT T2.`Sub-product` FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T1.first = 'Diesel' AND T1.last = 'Galloway' AND T2.`Date received` = '2014-07-03' |
|
Solve the following sql problem:
Was the tag in the complaint filed by Matthew Pierce on 2016/10/28 approved by himself?
Schema:
SCHEMA:
- Table: state
- Column: StateCode
- Samples: [AL, AR, AZ, CA, CO]
- Column: State
- Samples: [Alabama, Arkansas, Arizona, California, Colorado]
- Column: Region
- Samples: [South, South, West, West, West]
- Table: callcenterlogs
- Column: Date received
- Samples: [2017-03-27, 2017-03-27, 2017-03-27, 2017-03-23, 2017-03-22]
- Column: Complaint ID
- Samples: [CR2406263, CR2405641, CR2405629, CR2400594, CR2399607]
- Column: rand client
- Samples: [C00004587, C00003328, C00001685, C00001945, C00004303]
- Column: phonefinal
- Samples: [977-806-9726, 322-598-7152, 508-311-5237, 265-394-2727, 206-008-0460]
- Column: vru+line
- Samples: [AA0103, AA0205, AA0110, AA0113, AA0102]
- Column: call_id
- Samples: [34536, 34537, 34538, 34540, 34541]
- Column: priority
- Samples: [0, 0, 2, 2, 1]
- Column: type
- Samples: [NW, PS, PS, PS, PS]
- Column: outcome
- Samples: [AGENT, AGENT, AGENT, AGENT, AGENT]
- Column: server
- Samples: [MICHAL, TOVA, YIFAT, AVNI, STEREN]
- Column: ser_start
- Samples: [13:34:11, 10:58:22, 13:00:54, 16:18:21, 14:48:22]
- Column: ser_exit
- Samples: [13:40:23, 11:16:10, 13:13:31, 16:19:40, 14:55:19]
- Column: ser_time
- Samples: [00:06:12, 00:17:48, 00:12:37, 00:01:19, 00:06:57]
- Table: client
- Column: client_id
- Samples: [C00000001, C00000002, C00000003, C00000004, C00000005]
- Column: sex
- Samples: [Female, Male, Female, Male, Female]
- Column: day
- Samples: [13, 4, 9, 1, 3]
- Column: month
- Samples: [12, 2, 10, 12, 7]
- Column: year
- Samples: [1990, 1965, 1960, 1976, 1980]
- Column: age
- Samples: [29, 54, 59, 43, 39]
- Column: social
- Samples: [926-93-2157, 806-94-5725, 614-70-9100, 580-20-3414, 536-14-5809]
- Column: first
- Samples: [Emma, Noah, Olivia, Liam, Sophia]
- Column: middle
- Samples: [Avaya, Everest, Brooklynne, Irvin, Danae]
- Column: last
- Samples: [Smith, Thompson, Johnson, White, Williams]
- Column: phone
- Samples: [367-171-6840, 212-423-7734, 212-425-6932, 951-567-8925, 428-265-1568]
- Column: email
- Samples: [[email protected], [email protected], [email protected], [email protected], [email protected]]
- Column: address_1
- Samples: [387 Wellington Ave., 75 W. Berkshire St., 36 Second St., 7607 Sunnyslope Street, 755 Galvin Street]
- Column: address_2
- Samples: [Unit 1, None, None, None, None]
- Column: city
- Samples: [Albuquerque, New York City, New York City, Indianapolis, Indianapolis]
- Column: state
- Samples: [NM, NY, NY, IN, IN]
- Column: zipcode
- Samples: [47246, 10040, 10162, 49047, 40852]
- Column: district_id
- Samples: [18, 1, 1, 5, 5]
- Table: district
- Column: district_id
- Samples: [1, 2, 3, 4, 5]
- Column: city
- Samples: [New York City, Jacksonville, Columbus, Charlotte, Indianapolis]
- Column: state_abbrev
- Samples: [NY, FL, OH, NC, IN]
- Column: division
- Samples: [Middle Atlantic, South Atlantic, East North Central, South Atlantic, East North Central]
- Table: events
- Column: Date received
- Samples: [2014-07-03, 2012-04-12, 2012-04-03, 2012-03-14, 2012-03-05]
- Column: Product
- Samples: [Bank account or service, Bank account or service, Bank account or service, Credit card, Bank account or service]
- Column: Sub-product
- Samples: [Checking account, Savings account, Checking account, None, Checking account]
- Column: Issue
- Samples: [Deposits and withdrawals, Account opening, closing, or management, Account opening, closing, or management, Billing disputes, Account opening, closing, or management]
- Column: Sub-issue
- Samples: [None, None, None, None, None]
- Column: Consumer complaint narrative
- Samples: [None, None, None, None, None]
- Column: Tags
- Samples: [None, None, None, None, None]
- Column: Consumer consent provided?
- Samples: [N/A, N/A, N/A, N/A, N/A]
- Column: Submitted via
- Samples: [Email, Email, Email, Email, Email]
- Column: Date sent to company
- Samples: [2014-07-09, 2012-04-13, 2012-04-03, 2012-03-14, 2012-03-06]
- Column: Company response to consumer
- Samples: [Closed with explanation, Closed with relief, Closed without relief, Closed with relief, Closed with relief]
- Column: Timely response?
- Samples: [Yes, Yes, Yes, Yes, Yes]
- Column: Consumer disputed?
- Samples: [No, No, No, No, No]
- Column: Complaint ID
- Samples: [CR0922485, CR0057298, CR0043811, CR0035411, CR0030939]
- Column: Client_ID
- Samples: [C00001925, C00003141, C00000297, C00004275, C00000900]
- Table: reviews
- Column: Date
- Samples: [2017-10-04, 2017-10-02, 2017-08-21, 2017-12-17, 2016-05-27]
- Column: Stars
- Samples: [5, 5, 5, 5, 5]
- Column: Reviews
- Samples: [Great job, Eagle National! Each person was professional and helped us ..., Matthew Richardson is professional and helpful. He helped us find the ..., We had a past experience with Eagle National Mortgage and would withou..., We have been dealing with Brad Thomka from the beginning of what start..., I can't express how grateful I am for the support that Zach provided t... (truncated)]
- Column: Product
- Samples: [Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage]
- Column: district_id
- Samples: [65, 66, 23, 55, 24]
| SELECT CASE WHEN T2.`Consumer consent provided?` IN (NULL, 'N/A', 'Empty') THEN 'No' ELSE 'Yes' END FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T1.first = 'Matthew' AND T1.last = 'Pierce' AND T2.`Date received` = '2016-10-28' |
|
Solve the following sql problem:
For how long was the complaint filed by Matthew Pierce on 2016/10/28 delayed?
Schema:
SCHEMA:
- Table: state
- Column: StateCode
- Samples: [AL, AR, AZ, CA, CO]
- Column: State
- Samples: [Alabama, Arkansas, Arizona, California, Colorado]
- Column: Region
- Samples: [South, South, West, West, West]
- Table: callcenterlogs
- Column: Date received
- Samples: [2017-03-27, 2017-03-27, 2017-03-27, 2017-03-23, 2017-03-22]
- Column: Complaint ID
- Samples: [CR2406263, CR2405641, CR2405629, CR2400594, CR2399607]
- Column: rand client
- Samples: [C00004587, C00003328, C00001685, C00001945, C00004303]
- Column: phonefinal
- Samples: [977-806-9726, 322-598-7152, 508-311-5237, 265-394-2727, 206-008-0460]
- Column: vru+line
- Samples: [AA0103, AA0205, AA0110, AA0113, AA0102]
- Column: call_id
- Samples: [34536, 34537, 34538, 34540, 34541]
- Column: priority
- Samples: [0, 0, 2, 2, 1]
- Column: type
- Samples: [NW, PS, PS, PS, PS]
- Column: outcome
- Samples: [AGENT, AGENT, AGENT, AGENT, AGENT]
- Column: server
- Samples: [MICHAL, TOVA, YIFAT, AVNI, STEREN]
- Column: ser_start
- Samples: [13:34:11, 10:58:22, 13:00:54, 16:18:21, 14:48:22]
- Column: ser_exit
- Samples: [13:40:23, 11:16:10, 13:13:31, 16:19:40, 14:55:19]
- Column: ser_time
- Samples: [00:06:12, 00:17:48, 00:12:37, 00:01:19, 00:06:57]
- Table: client
- Column: client_id
- Samples: [C00000001, C00000002, C00000003, C00000004, C00000005]
- Column: sex
- Samples: [Female, Male, Female, Male, Female]
- Column: day
- Samples: [13, 4, 9, 1, 3]
- Column: month
- Samples: [12, 2, 10, 12, 7]
- Column: year
- Samples: [1990, 1965, 1960, 1976, 1980]
- Column: age
- Samples: [29, 54, 59, 43, 39]
- Column: social
- Samples: [926-93-2157, 806-94-5725, 614-70-9100, 580-20-3414, 536-14-5809]
- Column: first
- Samples: [Emma, Noah, Olivia, Liam, Sophia]
- Column: middle
- Samples: [Avaya, Everest, Brooklynne, Irvin, Danae]
- Column: last
- Samples: [Smith, Thompson, Johnson, White, Williams]
- Column: phone
- Samples: [367-171-6840, 212-423-7734, 212-425-6932, 951-567-8925, 428-265-1568]
- Column: email
- Samples: [[email protected], [email protected], [email protected], [email protected], [email protected]]
- Column: address_1
- Samples: [387 Wellington Ave., 75 W. Berkshire St., 36 Second St., 7607 Sunnyslope Street, 755 Galvin Street]
- Column: address_2
- Samples: [Unit 1, None, None, None, None]
- Column: city
- Samples: [Albuquerque, New York City, New York City, Indianapolis, Indianapolis]
- Column: state
- Samples: [NM, NY, NY, IN, IN]
- Column: zipcode
- Samples: [47246, 10040, 10162, 49047, 40852]
- Column: district_id
- Samples: [18, 1, 1, 5, 5]
- Table: district
- Column: district_id
- Samples: [1, 2, 3, 4, 5]
- Column: city
- Samples: [New York City, Jacksonville, Columbus, Charlotte, Indianapolis]
- Column: state_abbrev
- Samples: [NY, FL, OH, NC, IN]
- Column: division
- Samples: [Middle Atlantic, South Atlantic, East North Central, South Atlantic, East North Central]
- Table: events
- Column: Date received
- Samples: [2014-07-03, 2012-04-12, 2012-04-03, 2012-03-14, 2012-03-05]
- Column: Product
- Samples: [Bank account or service, Bank account or service, Bank account or service, Credit card, Bank account or service]
- Column: Sub-product
- Samples: [Checking account, Savings account, Checking account, None, Checking account]
- Column: Issue
- Samples: [Deposits and withdrawals, Account opening, closing, or management, Account opening, closing, or management, Billing disputes, Account opening, closing, or management]
- Column: Sub-issue
- Samples: [None, None, None, None, None]
- Column: Consumer complaint narrative
- Samples: [None, None, None, None, None]
- Column: Tags
- Samples: [None, None, None, None, None]
- Column: Consumer consent provided?
- Samples: [N/A, N/A, N/A, N/A, N/A]
- Column: Submitted via
- Samples: [Email, Email, Email, Email, Email]
- Column: Date sent to company
- Samples: [2014-07-09, 2012-04-13, 2012-04-03, 2012-03-14, 2012-03-06]
- Column: Company response to consumer
- Samples: [Closed with explanation, Closed with relief, Closed without relief, Closed with relief, Closed with relief]
- Column: Timely response?
- Samples: [Yes, Yes, Yes, Yes, Yes]
- Column: Consumer disputed?
- Samples: [No, No, No, No, No]
- Column: Complaint ID
- Samples: [CR0922485, CR0057298, CR0043811, CR0035411, CR0030939]
- Column: Client_ID
- Samples: [C00001925, C00003141, C00000297, C00004275, C00000900]
- Table: reviews
- Column: Date
- Samples: [2017-10-04, 2017-10-02, 2017-08-21, 2017-12-17, 2016-05-27]
- Column: Stars
- Samples: [5, 5, 5, 5, 5]
- Column: Reviews
- Samples: [Great job, Eagle National! Each person was professional and helped us ..., Matthew Richardson is professional and helpful. He helped us find the ..., We had a past experience with Eagle National Mortgage and would withou..., We have been dealing with Brad Thomka from the beginning of what start..., I can't express how grateful I am for the support that Zach provided t... (truncated)]
- Column: Product
- Samples: [Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage]
- Column: district_id
- Samples: [65, 66, 23, 55, 24]
| SELECT 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`)) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T1.first = 'Matthew' AND T1.last = 'Pierce' AND T2.`Date received` = '2016-10-28' |
|
Solve the following sql problem:
What is the full name of the client whose complaint on 2017/3/27 was received by MICHAL?
Schema:
SCHEMA:
- Table: state
- Column: StateCode
- Samples: [AL, AR, AZ, CA, CO]
- Column: State
- Samples: [Alabama, Arkansas, Arizona, California, Colorado]
- Column: Region
- Samples: [South, South, West, West, West]
- Table: callcenterlogs
- Column: Date received
- Samples: [2017-03-27, 2017-03-27, 2017-03-27, 2017-03-23, 2017-03-22]
- Column: Complaint ID
- Samples: [CR2406263, CR2405641, CR2405629, CR2400594, CR2399607]
- Column: rand client
- Samples: [C00004587, C00003328, C00001685, C00001945, C00004303]
- Column: phonefinal
- Samples: [977-806-9726, 322-598-7152, 508-311-5237, 265-394-2727, 206-008-0460]
- Column: vru+line
- Samples: [AA0103, AA0205, AA0110, AA0113, AA0102]
- Column: call_id
- Samples: [34536, 34537, 34538, 34540, 34541]
- Column: priority
- Samples: [0, 0, 2, 2, 1]
- Column: type
- Samples: [NW, PS, PS, PS, PS]
- Column: outcome
- Samples: [AGENT, AGENT, AGENT, AGENT, AGENT]
- Column: server
- Samples: [MICHAL, TOVA, YIFAT, AVNI, STEREN]
- Column: ser_start
- Samples: [13:34:11, 10:58:22, 13:00:54, 16:18:21, 14:48:22]
- Column: ser_exit
- Samples: [13:40:23, 11:16:10, 13:13:31, 16:19:40, 14:55:19]
- Column: ser_time
- Samples: [00:06:12, 00:17:48, 00:12:37, 00:01:19, 00:06:57]
- Table: client
- Column: client_id
- Samples: [C00000001, C00000002, C00000003, C00000004, C00000005]
- Column: sex
- Samples: [Female, Male, Female, Male, Female]
- Column: day
- Samples: [13, 4, 9, 1, 3]
- Column: month
- Samples: [12, 2, 10, 12, 7]
- Column: year
- Samples: [1990, 1965, 1960, 1976, 1980]
- Column: age
- Samples: [29, 54, 59, 43, 39]
- Column: social
- Samples: [926-93-2157, 806-94-5725, 614-70-9100, 580-20-3414, 536-14-5809]
- Column: first
- Samples: [Emma, Noah, Olivia, Liam, Sophia]
- Column: middle
- Samples: [Avaya, Everest, Brooklynne, Irvin, Danae]
- Column: last
- Samples: [Smith, Thompson, Johnson, White, Williams]
- Column: phone
- Samples: [367-171-6840, 212-423-7734, 212-425-6932, 951-567-8925, 428-265-1568]
- Column: email
- Samples: [[email protected], [email protected], [email protected], [email protected], [email protected]]
- Column: address_1
- Samples: [387 Wellington Ave., 75 W. Berkshire St., 36 Second St., 7607 Sunnyslope Street, 755 Galvin Street]
- Column: address_2
- Samples: [Unit 1, None, None, None, None]
- Column: city
- Samples: [Albuquerque, New York City, New York City, Indianapolis, Indianapolis]
- Column: state
- Samples: [NM, NY, NY, IN, IN]
- Column: zipcode
- Samples: [47246, 10040, 10162, 49047, 40852]
- Column: district_id
- Samples: [18, 1, 1, 5, 5]
- Table: district
- Column: district_id
- Samples: [1, 2, 3, 4, 5]
- Column: city
- Samples: [New York City, Jacksonville, Columbus, Charlotte, Indianapolis]
- Column: state_abbrev
- Samples: [NY, FL, OH, NC, IN]
- Column: division
- Samples: [Middle Atlantic, South Atlantic, East North Central, South Atlantic, East North Central]
- Table: events
- Column: Date received
- Samples: [2014-07-03, 2012-04-12, 2012-04-03, 2012-03-14, 2012-03-05]
- Column: Product
- Samples: [Bank account or service, Bank account or service, Bank account or service, Credit card, Bank account or service]
- Column: Sub-product
- Samples: [Checking account, Savings account, Checking account, None, Checking account]
- Column: Issue
- Samples: [Deposits and withdrawals, Account opening, closing, or management, Account opening, closing, or management, Billing disputes, Account opening, closing, or management]
- Column: Sub-issue
- Samples: [None, None, None, None, None]
- Column: Consumer complaint narrative
- Samples: [None, None, None, None, None]
- Column: Tags
- Samples: [None, None, None, None, None]
- Column: Consumer consent provided?
- Samples: [N/A, N/A, N/A, N/A, N/A]
- Column: Submitted via
- Samples: [Email, Email, Email, Email, Email]
- Column: Date sent to company
- Samples: [2014-07-09, 2012-04-13, 2012-04-03, 2012-03-14, 2012-03-06]
- Column: Company response to consumer
- Samples: [Closed with explanation, Closed with relief, Closed without relief, Closed with relief, Closed with relief]
- Column: Timely response?
- Samples: [Yes, Yes, Yes, Yes, Yes]
- Column: Consumer disputed?
- Samples: [No, No, No, No, No]
- Column: Complaint ID
- Samples: [CR0922485, CR0057298, CR0043811, CR0035411, CR0030939]
- Column: Client_ID
- Samples: [C00001925, C00003141, C00000297, C00004275, C00000900]
- Table: reviews
- Column: Date
- Samples: [2017-10-04, 2017-10-02, 2017-08-21, 2017-12-17, 2016-05-27]
- Column: Stars
- Samples: [5, 5, 5, 5, 5]
- Column: Reviews
- Samples: [Great job, Eagle National! Each person was professional and helped us ..., Matthew Richardson is professional and helpful. He helped us find the ..., We had a past experience with Eagle National Mortgage and would withou..., We have been dealing with Brad Thomka from the beginning of what start..., I can't express how grateful I am for the support that Zach provided t... (truncated)]
- Column: Product
- Samples: [Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage]
- Column: district_id
- Samples: [65, 66, 23, 55, 24]
| 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.`Date received` = '2017-03-27' AND T2.server = 'MICHAL' |
|
Solve the following sql problem:
For how long did the complaint filed on 2017/3/27 by Rachel Hicks last?
Schema:
SCHEMA:
- Table: state
- Column: StateCode
- Samples: [AL, AR, AZ, CA, CO]
- Column: State
- Samples: [Alabama, Arkansas, Arizona, California, Colorado]
- Column: Region
- Samples: [South, South, West, West, West]
- Table: callcenterlogs
- Column: Date received
- Samples: [2017-03-27, 2017-03-27, 2017-03-27, 2017-03-23, 2017-03-22]
- Column: Complaint ID
- Samples: [CR2406263, CR2405641, CR2405629, CR2400594, CR2399607]
- Column: rand client
- Samples: [C00004587, C00003328, C00001685, C00001945, C00004303]
- Column: phonefinal
- Samples: [977-806-9726, 322-598-7152, 508-311-5237, 265-394-2727, 206-008-0460]
- Column: vru+line
- Samples: [AA0103, AA0205, AA0110, AA0113, AA0102]
- Column: call_id
- Samples: [34536, 34537, 34538, 34540, 34541]
- Column: priority
- Samples: [0, 0, 2, 2, 1]
- Column: type
- Samples: [NW, PS, PS, PS, PS]
- Column: outcome
- Samples: [AGENT, AGENT, AGENT, AGENT, AGENT]
- Column: server
- Samples: [MICHAL, TOVA, YIFAT, AVNI, STEREN]
- Column: ser_start
- Samples: [13:34:11, 10:58:22, 13:00:54, 16:18:21, 14:48:22]
- Column: ser_exit
- Samples: [13:40:23, 11:16:10, 13:13:31, 16:19:40, 14:55:19]
- Column: ser_time
- Samples: [00:06:12, 00:17:48, 00:12:37, 00:01:19, 00:06:57]
- Table: client
- Column: client_id
- Samples: [C00000001, C00000002, C00000003, C00000004, C00000005]
- Column: sex
- Samples: [Female, Male, Female, Male, Female]
- Column: day
- Samples: [13, 4, 9, 1, 3]
- Column: month
- Samples: [12, 2, 10, 12, 7]
- Column: year
- Samples: [1990, 1965, 1960, 1976, 1980]
- Column: age
- Samples: [29, 54, 59, 43, 39]
- Column: social
- Samples: [926-93-2157, 806-94-5725, 614-70-9100, 580-20-3414, 536-14-5809]
- Column: first
- Samples: [Emma, Noah, Olivia, Liam, Sophia]
- Column: middle
- Samples: [Avaya, Everest, Brooklynne, Irvin, Danae]
- Column: last
- Samples: [Smith, Thompson, Johnson, White, Williams]
- Column: phone
- Samples: [367-171-6840, 212-423-7734, 212-425-6932, 951-567-8925, 428-265-1568]
- Column: email
- Samples: [[email protected], [email protected], [email protected], [email protected], [email protected]]
- Column: address_1
- Samples: [387 Wellington Ave., 75 W. Berkshire St., 36 Second St., 7607 Sunnyslope Street, 755 Galvin Street]
- Column: address_2
- Samples: [Unit 1, None, None, None, None]
- Column: city
- Samples: [Albuquerque, New York City, New York City, Indianapolis, Indianapolis]
- Column: state
- Samples: [NM, NY, NY, IN, IN]
- Column: zipcode
- Samples: [47246, 10040, 10162, 49047, 40852]
- Column: district_id
- Samples: [18, 1, 1, 5, 5]
- Table: district
- Column: district_id
- Samples: [1, 2, 3, 4, 5]
- Column: city
- Samples: [New York City, Jacksonville, Columbus, Charlotte, Indianapolis]
- Column: state_abbrev
- Samples: [NY, FL, OH, NC, IN]
- Column: division
- Samples: [Middle Atlantic, South Atlantic, East North Central, South Atlantic, East North Central]
- Table: events
- Column: Date received
- Samples: [2014-07-03, 2012-04-12, 2012-04-03, 2012-03-14, 2012-03-05]
- Column: Product
- Samples: [Bank account or service, Bank account or service, Bank account or service, Credit card, Bank account or service]
- Column: Sub-product
- Samples: [Checking account, Savings account, Checking account, None, Checking account]
- Column: Issue
- Samples: [Deposits and withdrawals, Account opening, closing, or management, Account opening, closing, or management, Billing disputes, Account opening, closing, or management]
- Column: Sub-issue
- Samples: [None, None, None, None, None]
- Column: Consumer complaint narrative
- Samples: [None, None, None, None, None]
- Column: Tags
- Samples: [None, None, None, None, None]
- Column: Consumer consent provided?
- Samples: [N/A, N/A, N/A, N/A, N/A]
- Column: Submitted via
- Samples: [Email, Email, Email, Email, Email]
- Column: Date sent to company
- Samples: [2014-07-09, 2012-04-13, 2012-04-03, 2012-03-14, 2012-03-06]
- Column: Company response to consumer
- Samples: [Closed with explanation, Closed with relief, Closed without relief, Closed with relief, Closed with relief]
- Column: Timely response?
- Samples: [Yes, Yes, Yes, Yes, Yes]
- Column: Consumer disputed?
- Samples: [No, No, No, No, No]
- Column: Complaint ID
- Samples: [CR0922485, CR0057298, CR0043811, CR0035411, CR0030939]
- Column: Client_ID
- Samples: [C00001925, C00003141, C00000297, C00004275, C00000900]
- Table: reviews
- Column: Date
- Samples: [2017-10-04, 2017-10-02, 2017-08-21, 2017-12-17, 2016-05-27]
- Column: Stars
- Samples: [5, 5, 5, 5, 5]
- Column: Reviews
- Samples: [Great job, Eagle National! Each person was professional and helped us ..., Matthew Richardson is professional and helpful. He helped us find the ..., We had a past experience with Eagle National Mortgage and would withou..., We have been dealing with Brad Thomka from the beginning of what start..., I can't express how grateful I am for the support that Zach provided t... (truncated)]
- Column: Product
- Samples: [Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage]
- Column: district_id
- Samples: [65, 66, 23, 55, 24]
| SELECT T2.ser_time FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client` WHERE T1.first = 'Rachel' AND T1.last = 'Hicks' AND T2.`Date received` = '2017-03-27' |
|
Solve the following sql problem:
Among all the clients from the New York city, how many of them have filed a complaint on the issue of Deposits and withdrawals?
Schema:
SCHEMA:
- Table: state
- Column: StateCode
- Samples: [AL, AR, AZ, CA, CO]
- Column: State
- Samples: [Alabama, Arkansas, Arizona, California, Colorado]
- Column: Region
- Samples: [South, South, West, West, West]
- Table: callcenterlogs
- Column: Date received
- Samples: [2017-03-27, 2017-03-27, 2017-03-27, 2017-03-23, 2017-03-22]
- Column: Complaint ID
- Samples: [CR2406263, CR2405641, CR2405629, CR2400594, CR2399607]
- Column: rand client
- Samples: [C00004587, C00003328, C00001685, C00001945, C00004303]
- Column: phonefinal
- Samples: [977-806-9726, 322-598-7152, 508-311-5237, 265-394-2727, 206-008-0460]
- Column: vru+line
- Samples: [AA0103, AA0205, AA0110, AA0113, AA0102]
- Column: call_id
- Samples: [34536, 34537, 34538, 34540, 34541]
- Column: priority
- Samples: [0, 0, 2, 2, 1]
- Column: type
- Samples: [NW, PS, PS, PS, PS]
- Column: outcome
- Samples: [AGENT, AGENT, AGENT, AGENT, AGENT]
- Column: server
- Samples: [MICHAL, TOVA, YIFAT, AVNI, STEREN]
- Column: ser_start
- Samples: [13:34:11, 10:58:22, 13:00:54, 16:18:21, 14:48:22]
- Column: ser_exit
- Samples: [13:40:23, 11:16:10, 13:13:31, 16:19:40, 14:55:19]
- Column: ser_time
- Samples: [00:06:12, 00:17:48, 00:12:37, 00:01:19, 00:06:57]
- Table: client
- Column: client_id
- Samples: [C00000001, C00000002, C00000003, C00000004, C00000005]
- Column: sex
- Samples: [Female, Male, Female, Male, Female]
- Column: day
- Samples: [13, 4, 9, 1, 3]
- Column: month
- Samples: [12, 2, 10, 12, 7]
- Column: year
- Samples: [1990, 1965, 1960, 1976, 1980]
- Column: age
- Samples: [29, 54, 59, 43, 39]
- Column: social
- Samples: [926-93-2157, 806-94-5725, 614-70-9100, 580-20-3414, 536-14-5809]
- Column: first
- Samples: [Emma, Noah, Olivia, Liam, Sophia]
- Column: middle
- Samples: [Avaya, Everest, Brooklynne, Irvin, Danae]
- Column: last
- Samples: [Smith, Thompson, Johnson, White, Williams]
- Column: phone
- Samples: [367-171-6840, 212-423-7734, 212-425-6932, 951-567-8925, 428-265-1568]
- Column: email
- Samples: [[email protected], [email protected], [email protected], [email protected], [email protected]]
- Column: address_1
- Samples: [387 Wellington Ave., 75 W. Berkshire St., 36 Second St., 7607 Sunnyslope Street, 755 Galvin Street]
- Column: address_2
- Samples: [Unit 1, None, None, None, None]
- Column: city
- Samples: [Albuquerque, New York City, New York City, Indianapolis, Indianapolis]
- Column: state
- Samples: [NM, NY, NY, IN, IN]
- Column: zipcode
- Samples: [47246, 10040, 10162, 49047, 40852]
- Column: district_id
- Samples: [18, 1, 1, 5, 5]
- Table: district
- Column: district_id
- Samples: [1, 2, 3, 4, 5]
- Column: city
- Samples: [New York City, Jacksonville, Columbus, Charlotte, Indianapolis]
- Column: state_abbrev
- Samples: [NY, FL, OH, NC, IN]
- Column: division
- Samples: [Middle Atlantic, South Atlantic, East North Central, South Atlantic, East North Central]
- Table: events
- Column: Date received
- Samples: [2014-07-03, 2012-04-12, 2012-04-03, 2012-03-14, 2012-03-05]
- Column: Product
- Samples: [Bank account or service, Bank account or service, Bank account or service, Credit card, Bank account or service]
- Column: Sub-product
- Samples: [Checking account, Savings account, Checking account, None, Checking account]
- Column: Issue
- Samples: [Deposits and withdrawals, Account opening, closing, or management, Account opening, closing, or management, Billing disputes, Account opening, closing, or management]
- Column: Sub-issue
- Samples: [None, None, None, None, None]
- Column: Consumer complaint narrative
- Samples: [None, None, None, None, None]
- Column: Tags
- Samples: [None, None, None, None, None]
- Column: Consumer consent provided?
- Samples: [N/A, N/A, N/A, N/A, N/A]
- Column: Submitted via
- Samples: [Email, Email, Email, Email, Email]
- Column: Date sent to company
- Samples: [2014-07-09, 2012-04-13, 2012-04-03, 2012-03-14, 2012-03-06]
- Column: Company response to consumer
- Samples: [Closed with explanation, Closed with relief, Closed without relief, Closed with relief, Closed with relief]
- Column: Timely response?
- Samples: [Yes, Yes, Yes, Yes, Yes]
- Column: Consumer disputed?
- Samples: [No, No, No, No, No]
- Column: Complaint ID
- Samples: [CR0922485, CR0057298, CR0043811, CR0035411, CR0030939]
- Column: Client_ID
- Samples: [C00001925, C00003141, C00000297, C00004275, C00000900]
- Table: reviews
- Column: Date
- Samples: [2017-10-04, 2017-10-02, 2017-08-21, 2017-12-17, 2016-05-27]
- Column: Stars
- Samples: [5, 5, 5, 5, 5]
- Column: Reviews
- Samples: [Great job, Eagle National! Each person was professional and helped us ..., Matthew Richardson is professional and helpful. He helped us find the ..., We had a past experience with Eagle National Mortgage and would withou..., We have been dealing with Brad Thomka from the beginning of what start..., I can't express how grateful I am for the support that Zach provided t... (truncated)]
- Column: Product
- Samples: [Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage]
- Column: district_id
- Samples: [65, 66, 23, 55, 24]
| SELECT COUNT(T2.Issue) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.Issue = 'Deposits and withdrawals' AND T1.city = 'New York City' |
|
Solve the following sql problem:
Please list the full names of all the clients whose complaints are still in progress.
Schema:
SCHEMA:
- Table: state
- Column: StateCode
- Samples: [AL, AR, AZ, CA, CO]
- Column: State
- Samples: [Alabama, Arkansas, Arizona, California, Colorado]
- Column: Region
- Samples: [South, South, West, West, West]
- Table: callcenterlogs
- Column: Date received
- Samples: [2017-03-27, 2017-03-27, 2017-03-27, 2017-03-23, 2017-03-22]
- Column: Complaint ID
- Samples: [CR2406263, CR2405641, CR2405629, CR2400594, CR2399607]
- Column: rand client
- Samples: [C00004587, C00003328, C00001685, C00001945, C00004303]
- Column: phonefinal
- Samples: [977-806-9726, 322-598-7152, 508-311-5237, 265-394-2727, 206-008-0460]
- Column: vru+line
- Samples: [AA0103, AA0205, AA0110, AA0113, AA0102]
- Column: call_id
- Samples: [34536, 34537, 34538, 34540, 34541]
- Column: priority
- Samples: [0, 0, 2, 2, 1]
- Column: type
- Samples: [NW, PS, PS, PS, PS]
- Column: outcome
- Samples: [AGENT, AGENT, AGENT, AGENT, AGENT]
- Column: server
- Samples: [MICHAL, TOVA, YIFAT, AVNI, STEREN]
- Column: ser_start
- Samples: [13:34:11, 10:58:22, 13:00:54, 16:18:21, 14:48:22]
- Column: ser_exit
- Samples: [13:40:23, 11:16:10, 13:13:31, 16:19:40, 14:55:19]
- Column: ser_time
- Samples: [00:06:12, 00:17:48, 00:12:37, 00:01:19, 00:06:57]
- Table: client
- Column: client_id
- Samples: [C00000001, C00000002, C00000003, C00000004, C00000005]
- Column: sex
- Samples: [Female, Male, Female, Male, Female]
- Column: day
- Samples: [13, 4, 9, 1, 3]
- Column: month
- Samples: [12, 2, 10, 12, 7]
- Column: year
- Samples: [1990, 1965, 1960, 1976, 1980]
- Column: age
- Samples: [29, 54, 59, 43, 39]
- Column: social
- Samples: [926-93-2157, 806-94-5725, 614-70-9100, 580-20-3414, 536-14-5809]
- Column: first
- Samples: [Emma, Noah, Olivia, Liam, Sophia]
- Column: middle
- Samples: [Avaya, Everest, Brooklynne, Irvin, Danae]
- Column: last
- Samples: [Smith, Thompson, Johnson, White, Williams]
- Column: phone
- Samples: [367-171-6840, 212-423-7734, 212-425-6932, 951-567-8925, 428-265-1568]
- Column: email
- Samples: [[email protected], [email protected], [email protected], [email protected], [email protected]]
- Column: address_1
- Samples: [387 Wellington Ave., 75 W. Berkshire St., 36 Second St., 7607 Sunnyslope Street, 755 Galvin Street]
- Column: address_2
- Samples: [Unit 1, None, None, None, None]
- Column: city
- Samples: [Albuquerque, New York City, New York City, Indianapolis, Indianapolis]
- Column: state
- Samples: [NM, NY, NY, IN, IN]
- Column: zipcode
- Samples: [47246, 10040, 10162, 49047, 40852]
- Column: district_id
- Samples: [18, 1, 1, 5, 5]
- Table: district
- Column: district_id
- Samples: [1, 2, 3, 4, 5]
- Column: city
- Samples: [New York City, Jacksonville, Columbus, Charlotte, Indianapolis]
- Column: state_abbrev
- Samples: [NY, FL, OH, NC, IN]
- Column: division
- Samples: [Middle Atlantic, South Atlantic, East North Central, South Atlantic, East North Central]
- Table: events
- Column: Date received
- Samples: [2014-07-03, 2012-04-12, 2012-04-03, 2012-03-14, 2012-03-05]
- Column: Product
- Samples: [Bank account or service, Bank account or service, Bank account or service, Credit card, Bank account or service]
- Column: Sub-product
- Samples: [Checking account, Savings account, Checking account, None, Checking account]
- Column: Issue
- Samples: [Deposits and withdrawals, Account opening, closing, or management, Account opening, closing, or management, Billing disputes, Account opening, closing, or management]
- Column: Sub-issue
- Samples: [None, None, None, None, None]
- Column: Consumer complaint narrative
- Samples: [None, None, None, None, None]
- Column: Tags
- Samples: [None, None, None, None, None]
- Column: Consumer consent provided?
- Samples: [N/A, N/A, N/A, N/A, N/A]
- Column: Submitted via
- Samples: [Email, Email, Email, Email, Email]
- Column: Date sent to company
- Samples: [2014-07-09, 2012-04-13, 2012-04-03, 2012-03-14, 2012-03-06]
- Column: Company response to consumer
- Samples: [Closed with explanation, Closed with relief, Closed without relief, Closed with relief, Closed with relief]
- Column: Timely response?
- Samples: [Yes, Yes, Yes, Yes, Yes]
- Column: Consumer disputed?
- Samples: [No, No, No, No, No]
- Column: Complaint ID
- Samples: [CR0922485, CR0057298, CR0043811, CR0035411, CR0030939]
- Column: Client_ID
- Samples: [C00001925, C00003141, C00000297, C00004275, C00000900]
- Table: reviews
- Column: Date
- Samples: [2017-10-04, 2017-10-02, 2017-08-21, 2017-12-17, 2016-05-27]
- Column: Stars
- Samples: [5, 5, 5, 5, 5]
- Column: Reviews
- Samples: [Great job, Eagle National! Each person was professional and helped us ..., Matthew Richardson is professional and helpful. He helped us find the ..., We had a past experience with Eagle National Mortgage and would withou..., We have been dealing with Brad Thomka from the beginning of what start..., I can't express how grateful I am for the support that Zach provided t... (truncated)]
- Column: Product
- Samples: [Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage]
- Column: district_id
- Samples: [65, 66, 23, 55, 24]
| 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.`Company response to consumer` = 'In progress' |
|
Solve the following sql problem:
Among the clients who did receive a timely response for their complaint, how many of them are from New York?
Schema:
SCHEMA:
- Table: state
- Column: StateCode
- Samples: [AL, AR, AZ, CA, CO]
- Column: State
- Samples: [Alabama, Arkansas, Arizona, California, Colorado]
- Column: Region
- Samples: [South, South, West, West, West]
- Table: callcenterlogs
- Column: Date received
- Samples: [2017-03-27, 2017-03-27, 2017-03-27, 2017-03-23, 2017-03-22]
- Column: Complaint ID
- Samples: [CR2406263, CR2405641, CR2405629, CR2400594, CR2399607]
- Column: rand client
- Samples: [C00004587, C00003328, C00001685, C00001945, C00004303]
- Column: phonefinal
- Samples: [977-806-9726, 322-598-7152, 508-311-5237, 265-394-2727, 206-008-0460]
- Column: vru+line
- Samples: [AA0103, AA0205, AA0110, AA0113, AA0102]
- Column: call_id
- Samples: [34536, 34537, 34538, 34540, 34541]
- Column: priority
- Samples: [0, 0, 2, 2, 1]
- Column: type
- Samples: [NW, PS, PS, PS, PS]
- Column: outcome
- Samples: [AGENT, AGENT, AGENT, AGENT, AGENT]
- Column: server
- Samples: [MICHAL, TOVA, YIFAT, AVNI, STEREN]
- Column: ser_start
- Samples: [13:34:11, 10:58:22, 13:00:54, 16:18:21, 14:48:22]
- Column: ser_exit
- Samples: [13:40:23, 11:16:10, 13:13:31, 16:19:40, 14:55:19]
- Column: ser_time
- Samples: [00:06:12, 00:17:48, 00:12:37, 00:01:19, 00:06:57]
- Table: client
- Column: client_id
- Samples: [C00000001, C00000002, C00000003, C00000004, C00000005]
- Column: sex
- Samples: [Female, Male, Female, Male, Female]
- Column: day
- Samples: [13, 4, 9, 1, 3]
- Column: month
- Samples: [12, 2, 10, 12, 7]
- Column: year
- Samples: [1990, 1965, 1960, 1976, 1980]
- Column: age
- Samples: [29, 54, 59, 43, 39]
- Column: social
- Samples: [926-93-2157, 806-94-5725, 614-70-9100, 580-20-3414, 536-14-5809]
- Column: first
- Samples: [Emma, Noah, Olivia, Liam, Sophia]
- Column: middle
- Samples: [Avaya, Everest, Brooklynne, Irvin, Danae]
- Column: last
- Samples: [Smith, Thompson, Johnson, White, Williams]
- Column: phone
- Samples: [367-171-6840, 212-423-7734, 212-425-6932, 951-567-8925, 428-265-1568]
- Column: email
- Samples: [[email protected], [email protected], [email protected], [email protected], [email protected]]
- Column: address_1
- Samples: [387 Wellington Ave., 75 W. Berkshire St., 36 Second St., 7607 Sunnyslope Street, 755 Galvin Street]
- Column: address_2
- Samples: [Unit 1, None, None, None, None]
- Column: city
- Samples: [Albuquerque, New York City, New York City, Indianapolis, Indianapolis]
- Column: state
- Samples: [NM, NY, NY, IN, IN]
- Column: zipcode
- Samples: [47246, 10040, 10162, 49047, 40852]
- Column: district_id
- Samples: [18, 1, 1, 5, 5]
- Table: district
- Column: district_id
- Samples: [1, 2, 3, 4, 5]
- Column: city
- Samples: [New York City, Jacksonville, Columbus, Charlotte, Indianapolis]
- Column: state_abbrev
- Samples: [NY, FL, OH, NC, IN]
- Column: division
- Samples: [Middle Atlantic, South Atlantic, East North Central, South Atlantic, East North Central]
- Table: events
- Column: Date received
- Samples: [2014-07-03, 2012-04-12, 2012-04-03, 2012-03-14, 2012-03-05]
- Column: Product
- Samples: [Bank account or service, Bank account or service, Bank account or service, Credit card, Bank account or service]
- Column: Sub-product
- Samples: [Checking account, Savings account, Checking account, None, Checking account]
- Column: Issue
- Samples: [Deposits and withdrawals, Account opening, closing, or management, Account opening, closing, or management, Billing disputes, Account opening, closing, or management]
- Column: Sub-issue
- Samples: [None, None, None, None, None]
- Column: Consumer complaint narrative
- Samples: [None, None, None, None, None]
- Column: Tags
- Samples: [None, None, None, None, None]
- Column: Consumer consent provided?
- Samples: [N/A, N/A, N/A, N/A, N/A]
- Column: Submitted via
- Samples: [Email, Email, Email, Email, Email]
- Column: Date sent to company
- Samples: [2014-07-09, 2012-04-13, 2012-04-03, 2012-03-14, 2012-03-06]
- Column: Company response to consumer
- Samples: [Closed with explanation, Closed with relief, Closed without relief, Closed with relief, Closed with relief]
- Column: Timely response?
- Samples: [Yes, Yes, Yes, Yes, Yes]
- Column: Consumer disputed?
- Samples: [No, No, No, No, No]
- Column: Complaint ID
- Samples: [CR0922485, CR0057298, CR0043811, CR0035411, CR0030939]
- Column: Client_ID
- Samples: [C00001925, C00003141, C00000297, C00004275, C00000900]
- Table: reviews
- Column: Date
- Samples: [2017-10-04, 2017-10-02, 2017-08-21, 2017-12-17, 2016-05-27]
- Column: Stars
- Samples: [5, 5, 5, 5, 5]
- Column: Reviews
- Samples: [Great job, Eagle National! Each person was professional and helped us ..., Matthew Richardson is professional and helpful. He helped us find the ..., We had a past experience with Eagle National Mortgage and would withou..., We have been dealing with Brad Thomka from the beginning of what start..., I can't express how grateful I am for the support that Zach provided t... (truncated)]
- Column: Product
- Samples: [Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage]
- Column: district_id
- Samples: [65, 66, 23, 55, 24]
| SELECT COUNT(T1.city) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Timely response?` = 'No' AND T1.city = 'New York City' |
|
Solve the following sql problem:
How many complaints on credit cards in the year 2016 were filed by male clients?
Schema:
SCHEMA:
- Table: state
- Column: StateCode
- Samples: [AL, AR, AZ, CA, CO]
- Column: State
- Samples: [Alabama, Arkansas, Arizona, California, Colorado]
- Column: Region
- Samples: [South, South, West, West, West]
- Table: callcenterlogs
- Column: Date received
- Samples: [2017-03-27, 2017-03-27, 2017-03-27, 2017-03-23, 2017-03-22]
- Column: Complaint ID
- Samples: [CR2406263, CR2405641, CR2405629, CR2400594, CR2399607]
- Column: rand client
- Samples: [C00004587, C00003328, C00001685, C00001945, C00004303]
- Column: phonefinal
- Samples: [977-806-9726, 322-598-7152, 508-311-5237, 265-394-2727, 206-008-0460]
- Column: vru+line
- Samples: [AA0103, AA0205, AA0110, AA0113, AA0102]
- Column: call_id
- Samples: [34536, 34537, 34538, 34540, 34541]
- Column: priority
- Samples: [0, 0, 2, 2, 1]
- Column: type
- Samples: [NW, PS, PS, PS, PS]
- Column: outcome
- Samples: [AGENT, AGENT, AGENT, AGENT, AGENT]
- Column: server
- Samples: [MICHAL, TOVA, YIFAT, AVNI, STEREN]
- Column: ser_start
- Samples: [13:34:11, 10:58:22, 13:00:54, 16:18:21, 14:48:22]
- Column: ser_exit
- Samples: [13:40:23, 11:16:10, 13:13:31, 16:19:40, 14:55:19]
- Column: ser_time
- Samples: [00:06:12, 00:17:48, 00:12:37, 00:01:19, 00:06:57]
- Table: client
- Column: client_id
- Samples: [C00000001, C00000002, C00000003, C00000004, C00000005]
- Column: sex
- Samples: [Female, Male, Female, Male, Female]
- Column: day
- Samples: [13, 4, 9, 1, 3]
- Column: month
- Samples: [12, 2, 10, 12, 7]
- Column: year
- Samples: [1990, 1965, 1960, 1976, 1980]
- Column: age
- Samples: [29, 54, 59, 43, 39]
- Column: social
- Samples: [926-93-2157, 806-94-5725, 614-70-9100, 580-20-3414, 536-14-5809]
- Column: first
- Samples: [Emma, Noah, Olivia, Liam, Sophia]
- Column: middle
- Samples: [Avaya, Everest, Brooklynne, Irvin, Danae]
- Column: last
- Samples: [Smith, Thompson, Johnson, White, Williams]
- Column: phone
- Samples: [367-171-6840, 212-423-7734, 212-425-6932, 951-567-8925, 428-265-1568]
- Column: email
- Samples: [[email protected], [email protected], [email protected], [email protected], [email protected]]
- Column: address_1
- Samples: [387 Wellington Ave., 75 W. Berkshire St., 36 Second St., 7607 Sunnyslope Street, 755 Galvin Street]
- Column: address_2
- Samples: [Unit 1, None, None, None, None]
- Column: city
- Samples: [Albuquerque, New York City, New York City, Indianapolis, Indianapolis]
- Column: state
- Samples: [NM, NY, NY, IN, IN]
- Column: zipcode
- Samples: [47246, 10040, 10162, 49047, 40852]
- Column: district_id
- Samples: [18, 1, 1, 5, 5]
- Table: district
- Column: district_id
- Samples: [1, 2, 3, 4, 5]
- Column: city
- Samples: [New York City, Jacksonville, Columbus, Charlotte, Indianapolis]
- Column: state_abbrev
- Samples: [NY, FL, OH, NC, IN]
- Column: division
- Samples: [Middle Atlantic, South Atlantic, East North Central, South Atlantic, East North Central]
- Table: events
- Column: Date received
- Samples: [2014-07-03, 2012-04-12, 2012-04-03, 2012-03-14, 2012-03-05]
- Column: Product
- Samples: [Bank account or service, Bank account or service, Bank account or service, Credit card, Bank account or service]
- Column: Sub-product
- Samples: [Checking account, Savings account, Checking account, None, Checking account]
- Column: Issue
- Samples: [Deposits and withdrawals, Account opening, closing, or management, Account opening, closing, or management, Billing disputes, Account opening, closing, or management]
- Column: Sub-issue
- Samples: [None, None, None, None, None]
- Column: Consumer complaint narrative
- Samples: [None, None, None, None, None]
- Column: Tags
- Samples: [None, None, None, None, None]
- Column: Consumer consent provided?
- Samples: [N/A, N/A, N/A, N/A, N/A]
- Column: Submitted via
- Samples: [Email, Email, Email, Email, Email]
- Column: Date sent to company
- Samples: [2014-07-09, 2012-04-13, 2012-04-03, 2012-03-14, 2012-03-06]
- Column: Company response to consumer
- Samples: [Closed with explanation, Closed with relief, Closed without relief, Closed with relief, Closed with relief]
- Column: Timely response?
- Samples: [Yes, Yes, Yes, Yes, Yes]
- Column: Consumer disputed?
- Samples: [No, No, No, No, No]
- Column: Complaint ID
- Samples: [CR0922485, CR0057298, CR0043811, CR0035411, CR0030939]
- Column: Client_ID
- Samples: [C00001925, C00003141, C00000297, C00004275, C00000900]
- Table: reviews
- Column: Date
- Samples: [2017-10-04, 2017-10-02, 2017-08-21, 2017-12-17, 2016-05-27]
- Column: Stars
- Samples: [5, 5, 5, 5, 5]
- Column: Reviews
- Samples: [Great job, Eagle National! Each person was professional and helped us ..., Matthew Richardson is professional and helpful. He helped us find the ..., We had a past experience with Eagle National Mortgage and would withou..., We have been dealing with Brad Thomka from the beginning of what start..., I can't express how grateful I am for the support that Zach provided t... (truncated)]
- Column: Product
- Samples: [Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage]
- Column: district_id
- Samples: [65, 66, 23, 55, 24]
| SELECT COUNT(T1.sex) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE strftime('%Y', T2.`Date received`) = '2016' AND T1.sex = 'Male' AND T2.Product = 'Credit card' |
|
Solve the following sql problem:
Which division is Diesel Galloway in?
Schema:
SCHEMA:
- Table: state
- Column: StateCode
- Samples: [AL, AR, AZ, CA, CO]
- Column: State
- Samples: [Alabama, Arkansas, Arizona, California, Colorado]
- Column: Region
- Samples: [South, South, West, West, West]
- Table: callcenterlogs
- Column: Date received
- Samples: [2017-03-27, 2017-03-27, 2017-03-27, 2017-03-23, 2017-03-22]
- Column: Complaint ID
- Samples: [CR2406263, CR2405641, CR2405629, CR2400594, CR2399607]
- Column: rand client
- Samples: [C00004587, C00003328, C00001685, C00001945, C00004303]
- Column: phonefinal
- Samples: [977-806-9726, 322-598-7152, 508-311-5237, 265-394-2727, 206-008-0460]
- Column: vru+line
- Samples: [AA0103, AA0205, AA0110, AA0113, AA0102]
- Column: call_id
- Samples: [34536, 34537, 34538, 34540, 34541]
- Column: priority
- Samples: [0, 0, 2, 2, 1]
- Column: type
- Samples: [NW, PS, PS, PS, PS]
- Column: outcome
- Samples: [AGENT, AGENT, AGENT, AGENT, AGENT]
- Column: server
- Samples: [MICHAL, TOVA, YIFAT, AVNI, STEREN]
- Column: ser_start
- Samples: [13:34:11, 10:58:22, 13:00:54, 16:18:21, 14:48:22]
- Column: ser_exit
- Samples: [13:40:23, 11:16:10, 13:13:31, 16:19:40, 14:55:19]
- Column: ser_time
- Samples: [00:06:12, 00:17:48, 00:12:37, 00:01:19, 00:06:57]
- Table: client
- Column: client_id
- Samples: [C00000001, C00000002, C00000003, C00000004, C00000005]
- Column: sex
- Samples: [Female, Male, Female, Male, Female]
- Column: day
- Samples: [13, 4, 9, 1, 3]
- Column: month
- Samples: [12, 2, 10, 12, 7]
- Column: year
- Samples: [1990, 1965, 1960, 1976, 1980]
- Column: age
- Samples: [29, 54, 59, 43, 39]
- Column: social
- Samples: [926-93-2157, 806-94-5725, 614-70-9100, 580-20-3414, 536-14-5809]
- Column: first
- Samples: [Emma, Noah, Olivia, Liam, Sophia]
- Column: middle
- Samples: [Avaya, Everest, Brooklynne, Irvin, Danae]
- Column: last
- Samples: [Smith, Thompson, Johnson, White, Williams]
- Column: phone
- Samples: [367-171-6840, 212-423-7734, 212-425-6932, 951-567-8925, 428-265-1568]
- Column: email
- Samples: [[email protected], [email protected], [email protected], [email protected], [email protected]]
- Column: address_1
- Samples: [387 Wellington Ave., 75 W. Berkshire St., 36 Second St., 7607 Sunnyslope Street, 755 Galvin Street]
- Column: address_2
- Samples: [Unit 1, None, None, None, None]
- Column: city
- Samples: [Albuquerque, New York City, New York City, Indianapolis, Indianapolis]
- Column: state
- Samples: [NM, NY, NY, IN, IN]
- Column: zipcode
- Samples: [47246, 10040, 10162, 49047, 40852]
- Column: district_id
- Samples: [18, 1, 1, 5, 5]
- Table: district
- Column: district_id
- Samples: [1, 2, 3, 4, 5]
- Column: city
- Samples: [New York City, Jacksonville, Columbus, Charlotte, Indianapolis]
- Column: state_abbrev
- Samples: [NY, FL, OH, NC, IN]
- Column: division
- Samples: [Middle Atlantic, South Atlantic, East North Central, South Atlantic, East North Central]
- Table: events
- Column: Date received
- Samples: [2014-07-03, 2012-04-12, 2012-04-03, 2012-03-14, 2012-03-05]
- Column: Product
- Samples: [Bank account or service, Bank account or service, Bank account or service, Credit card, Bank account or service]
- Column: Sub-product
- Samples: [Checking account, Savings account, Checking account, None, Checking account]
- Column: Issue
- Samples: [Deposits and withdrawals, Account opening, closing, or management, Account opening, closing, or management, Billing disputes, Account opening, closing, or management]
- Column: Sub-issue
- Samples: [None, None, None, None, None]
- Column: Consumer complaint narrative
- Samples: [None, None, None, None, None]
- Column: Tags
- Samples: [None, None, None, None, None]
- Column: Consumer consent provided?
- Samples: [N/A, N/A, N/A, N/A, N/A]
- Column: Submitted via
- Samples: [Email, Email, Email, Email, Email]
- Column: Date sent to company
- Samples: [2014-07-09, 2012-04-13, 2012-04-03, 2012-03-14, 2012-03-06]
- Column: Company response to consumer
- Samples: [Closed with explanation, Closed with relief, Closed without relief, Closed with relief, Closed with relief]
- Column: Timely response?
- Samples: [Yes, Yes, Yes, Yes, Yes]
- Column: Consumer disputed?
- Samples: [No, No, No, No, No]
- Column: Complaint ID
- Samples: [CR0922485, CR0057298, CR0043811, CR0035411, CR0030939]
- Column: Client_ID
- Samples: [C00001925, C00003141, C00000297, C00004275, C00000900]
- Table: reviews
- Column: Date
- Samples: [2017-10-04, 2017-10-02, 2017-08-21, 2017-12-17, 2016-05-27]
- Column: Stars
- Samples: [5, 5, 5, 5, 5]
- Column: Reviews
- Samples: [Great job, Eagle National! Each person was professional and helped us ..., Matthew Richardson is professional and helpful. He helped us find the ..., We had a past experience with Eagle National Mortgage and would withou..., We have been dealing with Brad Thomka from the beginning of what start..., I can't express how grateful I am for the support that Zach provided t... (truncated)]
- Column: Product
- Samples: [Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage]
- Column: district_id
- Samples: [65, 66, 23, 55, 24]
| SELECT T2.division FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T1.first = 'Diesel' AND T1.last = 'Galloway' |
|
Solve the following sql problem:
Please list the full names of all the male clients in the Pacific division.
Schema:
SCHEMA:
- Table: state
- Column: StateCode
- Samples: [AL, AR, AZ, CA, CO]
- Column: State
- Samples: [Alabama, Arkansas, Arizona, California, Colorado]
- Column: Region
- Samples: [South, South, West, West, West]
- Table: callcenterlogs
- Column: Date received
- Samples: [2017-03-27, 2017-03-27, 2017-03-27, 2017-03-23, 2017-03-22]
- Column: Complaint ID
- Samples: [CR2406263, CR2405641, CR2405629, CR2400594, CR2399607]
- Column: rand client
- Samples: [C00004587, C00003328, C00001685, C00001945, C00004303]
- Column: phonefinal
- Samples: [977-806-9726, 322-598-7152, 508-311-5237, 265-394-2727, 206-008-0460]
- Column: vru+line
- Samples: [AA0103, AA0205, AA0110, AA0113, AA0102]
- Column: call_id
- Samples: [34536, 34537, 34538, 34540, 34541]
- Column: priority
- Samples: [0, 0, 2, 2, 1]
- Column: type
- Samples: [NW, PS, PS, PS, PS]
- Column: outcome
- Samples: [AGENT, AGENT, AGENT, AGENT, AGENT]
- Column: server
- Samples: [MICHAL, TOVA, YIFAT, AVNI, STEREN]
- Column: ser_start
- Samples: [13:34:11, 10:58:22, 13:00:54, 16:18:21, 14:48:22]
- Column: ser_exit
- Samples: [13:40:23, 11:16:10, 13:13:31, 16:19:40, 14:55:19]
- Column: ser_time
- Samples: [00:06:12, 00:17:48, 00:12:37, 00:01:19, 00:06:57]
- Table: client
- Column: client_id
- Samples: [C00000001, C00000002, C00000003, C00000004, C00000005]
- Column: sex
- Samples: [Female, Male, Female, Male, Female]
- Column: day
- Samples: [13, 4, 9, 1, 3]
- Column: month
- Samples: [12, 2, 10, 12, 7]
- Column: year
- Samples: [1990, 1965, 1960, 1976, 1980]
- Column: age
- Samples: [29, 54, 59, 43, 39]
- Column: social
- Samples: [926-93-2157, 806-94-5725, 614-70-9100, 580-20-3414, 536-14-5809]
- Column: first
- Samples: [Emma, Noah, Olivia, Liam, Sophia]
- Column: middle
- Samples: [Avaya, Everest, Brooklynne, Irvin, Danae]
- Column: last
- Samples: [Smith, Thompson, Johnson, White, Williams]
- Column: phone
- Samples: [367-171-6840, 212-423-7734, 212-425-6932, 951-567-8925, 428-265-1568]
- Column: email
- Samples: [[email protected], [email protected], [email protected], [email protected], [email protected]]
- Column: address_1
- Samples: [387 Wellington Ave., 75 W. Berkshire St., 36 Second St., 7607 Sunnyslope Street, 755 Galvin Street]
- Column: address_2
- Samples: [Unit 1, None, None, None, None]
- Column: city
- Samples: [Albuquerque, New York City, New York City, Indianapolis, Indianapolis]
- Column: state
- Samples: [NM, NY, NY, IN, IN]
- Column: zipcode
- Samples: [47246, 10040, 10162, 49047, 40852]
- Column: district_id
- Samples: [18, 1, 1, 5, 5]
- Table: district
- Column: district_id
- Samples: [1, 2, 3, 4, 5]
- Column: city
- Samples: [New York City, Jacksonville, Columbus, Charlotte, Indianapolis]
- Column: state_abbrev
- Samples: [NY, FL, OH, NC, IN]
- Column: division
- Samples: [Middle Atlantic, South Atlantic, East North Central, South Atlantic, East North Central]
- Table: events
- Column: Date received
- Samples: [2014-07-03, 2012-04-12, 2012-04-03, 2012-03-14, 2012-03-05]
- Column: Product
- Samples: [Bank account or service, Bank account or service, Bank account or service, Credit card, Bank account or service]
- Column: Sub-product
- Samples: [Checking account, Savings account, Checking account, None, Checking account]
- Column: Issue
- Samples: [Deposits and withdrawals, Account opening, closing, or management, Account opening, closing, or management, Billing disputes, Account opening, closing, or management]
- Column: Sub-issue
- Samples: [None, None, None, None, None]
- Column: Consumer complaint narrative
- Samples: [None, None, None, None, None]
- Column: Tags
- Samples: [None, None, None, None, None]
- Column: Consumer consent provided?
- Samples: [N/A, N/A, N/A, N/A, N/A]
- Column: Submitted via
- Samples: [Email, Email, Email, Email, Email]
- Column: Date sent to company
- Samples: [2014-07-09, 2012-04-13, 2012-04-03, 2012-03-14, 2012-03-06]
- Column: Company response to consumer
- Samples: [Closed with explanation, Closed with relief, Closed without relief, Closed with relief, Closed with relief]
- Column: Timely response?
- Samples: [Yes, Yes, Yes, Yes, Yes]
- Column: Consumer disputed?
- Samples: [No, No, No, No, No]
- Column: Complaint ID
- Samples: [CR0922485, CR0057298, CR0043811, CR0035411, CR0030939]
- Column: Client_ID
- Samples: [C00001925, C00003141, C00000297, C00004275, C00000900]
- Table: reviews
- Column: Date
- Samples: [2017-10-04, 2017-10-02, 2017-08-21, 2017-12-17, 2016-05-27]
- Column: Stars
- Samples: [5, 5, 5, 5, 5]
- Column: Reviews
- Samples: [Great job, Eagle National! Each person was professional and helped us ..., Matthew Richardson is professional and helpful. He helped us find the ..., We had a past experience with Eagle National Mortgage and would withou..., We have been dealing with Brad Thomka from the beginning of what start..., I can't express how grateful I am for the support that Zach provided t... (truncated)]
- Column: Product
- Samples: [Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage]
- Column: district_id
- Samples: [65, 66, 23, 55, 24]
| SELECT T1.first, T1.middle, T1.last FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T2.division = 'Pacific' AND T1.sex = 'Male' |
|
Solve the following sql problem:
What is the average number of complaints on credit cards filed by clients from New York in the 3 consecutive years starting from 2015?
Schema:
SCHEMA:
- Table: state
- Column: StateCode
- Samples: [AL, AR, AZ, CA, CO]
- Column: State
- Samples: [Alabama, Arkansas, Arizona, California, Colorado]
- Column: Region
- Samples: [South, South, West, West, West]
- Table: callcenterlogs
- Column: Date received
- Samples: [2017-03-27, 2017-03-27, 2017-03-27, 2017-03-23, 2017-03-22]
- Column: Complaint ID
- Samples: [CR2406263, CR2405641, CR2405629, CR2400594, CR2399607]
- Column: rand client
- Samples: [C00004587, C00003328, C00001685, C00001945, C00004303]
- Column: phonefinal
- Samples: [977-806-9726, 322-598-7152, 508-311-5237, 265-394-2727, 206-008-0460]
- Column: vru+line
- Samples: [AA0103, AA0205, AA0110, AA0113, AA0102]
- Column: call_id
- Samples: [34536, 34537, 34538, 34540, 34541]
- Column: priority
- Samples: [0, 0, 2, 2, 1]
- Column: type
- Samples: [NW, PS, PS, PS, PS]
- Column: outcome
- Samples: [AGENT, AGENT, AGENT, AGENT, AGENT]
- Column: server
- Samples: [MICHAL, TOVA, YIFAT, AVNI, STEREN]
- Column: ser_start
- Samples: [13:34:11, 10:58:22, 13:00:54, 16:18:21, 14:48:22]
- Column: ser_exit
- Samples: [13:40:23, 11:16:10, 13:13:31, 16:19:40, 14:55:19]
- Column: ser_time
- Samples: [00:06:12, 00:17:48, 00:12:37, 00:01:19, 00:06:57]
- Table: client
- Column: client_id
- Samples: [C00000001, C00000002, C00000003, C00000004, C00000005]
- Column: sex
- Samples: [Female, Male, Female, Male, Female]
- Column: day
- Samples: [13, 4, 9, 1, 3]
- Column: month
- Samples: [12, 2, 10, 12, 7]
- Column: year
- Samples: [1990, 1965, 1960, 1976, 1980]
- Column: age
- Samples: [29, 54, 59, 43, 39]
- Column: social
- Samples: [926-93-2157, 806-94-5725, 614-70-9100, 580-20-3414, 536-14-5809]
- Column: first
- Samples: [Emma, Noah, Olivia, Liam, Sophia]
- Column: middle
- Samples: [Avaya, Everest, Brooklynne, Irvin, Danae]
- Column: last
- Samples: [Smith, Thompson, Johnson, White, Williams]
- Column: phone
- Samples: [367-171-6840, 212-423-7734, 212-425-6932, 951-567-8925, 428-265-1568]
- Column: email
- Samples: [[email protected], [email protected], [email protected], [email protected], [email protected]]
- Column: address_1
- Samples: [387 Wellington Ave., 75 W. Berkshire St., 36 Second St., 7607 Sunnyslope Street, 755 Galvin Street]
- Column: address_2
- Samples: [Unit 1, None, None, None, None]
- Column: city
- Samples: [Albuquerque, New York City, New York City, Indianapolis, Indianapolis]
- Column: state
- Samples: [NM, NY, NY, IN, IN]
- Column: zipcode
- Samples: [47246, 10040, 10162, 49047, 40852]
- Column: district_id
- Samples: [18, 1, 1, 5, 5]
- Table: district
- Column: district_id
- Samples: [1, 2, 3, 4, 5]
- Column: city
- Samples: [New York City, Jacksonville, Columbus, Charlotte, Indianapolis]
- Column: state_abbrev
- Samples: [NY, FL, OH, NC, IN]
- Column: division
- Samples: [Middle Atlantic, South Atlantic, East North Central, South Atlantic, East North Central]
- Table: events
- Column: Date received
- Samples: [2014-07-03, 2012-04-12, 2012-04-03, 2012-03-14, 2012-03-05]
- Column: Product
- Samples: [Bank account or service, Bank account or service, Bank account or service, Credit card, Bank account or service]
- Column: Sub-product
- Samples: [Checking account, Savings account, Checking account, None, Checking account]
- Column: Issue
- Samples: [Deposits and withdrawals, Account opening, closing, or management, Account opening, closing, or management, Billing disputes, Account opening, closing, or management]
- Column: Sub-issue
- Samples: [None, None, None, None, None]
- Column: Consumer complaint narrative
- Samples: [None, None, None, None, None]
- Column: Tags
- Samples: [None, None, None, None, None]
- Column: Consumer consent provided?
- Samples: [N/A, N/A, N/A, N/A, N/A]
- Column: Submitted via
- Samples: [Email, Email, Email, Email, Email]
- Column: Date sent to company
- Samples: [2014-07-09, 2012-04-13, 2012-04-03, 2012-03-14, 2012-03-06]
- Column: Company response to consumer
- Samples: [Closed with explanation, Closed with relief, Closed without relief, Closed with relief, Closed with relief]
- Column: Timely response?
- Samples: [Yes, Yes, Yes, Yes, Yes]
- Column: Consumer disputed?
- Samples: [No, No, No, No, No]
- Column: Complaint ID
- Samples: [CR0922485, CR0057298, CR0043811, CR0035411, CR0030939]
- Column: Client_ID
- Samples: [C00001925, C00003141, C00000297, C00004275, C00000900]
- Table: reviews
- Column: Date
- Samples: [2017-10-04, 2017-10-02, 2017-08-21, 2017-12-17, 2016-05-27]
- Column: Stars
- Samples: [5, 5, 5, 5, 5]
- Column: Reviews
- Samples: [Great job, Eagle National! Each person was professional and helped us ..., Matthew Richardson is professional and helpful. He helped us find the ..., We had a past experience with Eagle National Mortgage and would withou..., We have been dealing with Brad Thomka from the beginning of what start..., I can't express how grateful I am for the support that Zach provided t... (truncated)]
- Column: Product
- Samples: [Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage]
- Column: district_id
- Samples: [65, 66, 23, 55, 24]
| SELECT CAST(COUNT(T2.`Complaint ID`) AS REAL) / 3 AS average FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE strftime('%Y', T2.`Date received`) BETWEEN '2015' AND '2017' AND T1.city = 'New York City' AND T2.Product = 'Credit card' |
|
Solve the following sql problem:
What is the percentage of the increase of complaints filed by the clients from New York from the year 2016 to the year 2017?
Schema:
SCHEMA:
- Table: state
- Column: StateCode
- Samples: [AL, AR, AZ, CA, CO]
- Column: State
- Samples: [Alabama, Arkansas, Arizona, California, Colorado]
- Column: Region
- Samples: [South, South, West, West, West]
- Table: callcenterlogs
- Column: Date received
- Samples: [2017-03-27, 2017-03-27, 2017-03-27, 2017-03-23, 2017-03-22]
- Column: Complaint ID
- Samples: [CR2406263, CR2405641, CR2405629, CR2400594, CR2399607]
- Column: rand client
- Samples: [C00004587, C00003328, C00001685, C00001945, C00004303]
- Column: phonefinal
- Samples: [977-806-9726, 322-598-7152, 508-311-5237, 265-394-2727, 206-008-0460]
- Column: vru+line
- Samples: [AA0103, AA0205, AA0110, AA0113, AA0102]
- Column: call_id
- Samples: [34536, 34537, 34538, 34540, 34541]
- Column: priority
- Samples: [0, 0, 2, 2, 1]
- Column: type
- Samples: [NW, PS, PS, PS, PS]
- Column: outcome
- Samples: [AGENT, AGENT, AGENT, AGENT, AGENT]
- Column: server
- Samples: [MICHAL, TOVA, YIFAT, AVNI, STEREN]
- Column: ser_start
- Samples: [13:34:11, 10:58:22, 13:00:54, 16:18:21, 14:48:22]
- Column: ser_exit
- Samples: [13:40:23, 11:16:10, 13:13:31, 16:19:40, 14:55:19]
- Column: ser_time
- Samples: [00:06:12, 00:17:48, 00:12:37, 00:01:19, 00:06:57]
- Table: client
- Column: client_id
- Samples: [C00000001, C00000002, C00000003, C00000004, C00000005]
- Column: sex
- Samples: [Female, Male, Female, Male, Female]
- Column: day
- Samples: [13, 4, 9, 1, 3]
- Column: month
- Samples: [12, 2, 10, 12, 7]
- Column: year
- Samples: [1990, 1965, 1960, 1976, 1980]
- Column: age
- Samples: [29, 54, 59, 43, 39]
- Column: social
- Samples: [926-93-2157, 806-94-5725, 614-70-9100, 580-20-3414, 536-14-5809]
- Column: first
- Samples: [Emma, Noah, Olivia, Liam, Sophia]
- Column: middle
- Samples: [Avaya, Everest, Brooklynne, Irvin, Danae]
- Column: last
- Samples: [Smith, Thompson, Johnson, White, Williams]
- Column: phone
- Samples: [367-171-6840, 212-423-7734, 212-425-6932, 951-567-8925, 428-265-1568]
- Column: email
- Samples: [[email protected], [email protected], [email protected], [email protected], [email protected]]
- Column: address_1
- Samples: [387 Wellington Ave., 75 W. Berkshire St., 36 Second St., 7607 Sunnyslope Street, 755 Galvin Street]
- Column: address_2
- Samples: [Unit 1, None, None, None, None]
- Column: city
- Samples: [Albuquerque, New York City, New York City, Indianapolis, Indianapolis]
- Column: state
- Samples: [NM, NY, NY, IN, IN]
- Column: zipcode
- Samples: [47246, 10040, 10162, 49047, 40852]
- Column: district_id
- Samples: [18, 1, 1, 5, 5]
- Table: district
- Column: district_id
- Samples: [1, 2, 3, 4, 5]
- Column: city
- Samples: [New York City, Jacksonville, Columbus, Charlotte, Indianapolis]
- Column: state_abbrev
- Samples: [NY, FL, OH, NC, IN]
- Column: division
- Samples: [Middle Atlantic, South Atlantic, East North Central, South Atlantic, East North Central]
- Table: events
- Column: Date received
- Samples: [2014-07-03, 2012-04-12, 2012-04-03, 2012-03-14, 2012-03-05]
- Column: Product
- Samples: [Bank account or service, Bank account or service, Bank account or service, Credit card, Bank account or service]
- Column: Sub-product
- Samples: [Checking account, Savings account, Checking account, None, Checking account]
- Column: Issue
- Samples: [Deposits and withdrawals, Account opening, closing, or management, Account opening, closing, or management, Billing disputes, Account opening, closing, or management]
- Column: Sub-issue
- Samples: [None, None, None, None, None]
- Column: Consumer complaint narrative
- Samples: [None, None, None, None, None]
- Column: Tags
- Samples: [None, None, None, None, None]
- Column: Consumer consent provided?
- Samples: [N/A, N/A, N/A, N/A, N/A]
- Column: Submitted via
- Samples: [Email, Email, Email, Email, Email]
- Column: Date sent to company
- Samples: [2014-07-09, 2012-04-13, 2012-04-03, 2012-03-14, 2012-03-06]
- Column: Company response to consumer
- Samples: [Closed with explanation, Closed with relief, Closed without relief, Closed with relief, Closed with relief]
- Column: Timely response?
- Samples: [Yes, Yes, Yes, Yes, Yes]
- Column: Consumer disputed?
- Samples: [No, No, No, No, No]
- Column: Complaint ID
- Samples: [CR0922485, CR0057298, CR0043811, CR0035411, CR0030939]
- Column: Client_ID
- Samples: [C00001925, C00003141, C00000297, C00004275, C00000900]
- Table: reviews
- Column: Date
- Samples: [2017-10-04, 2017-10-02, 2017-08-21, 2017-12-17, 2016-05-27]
- Column: Stars
- Samples: [5, 5, 5, 5, 5]
- Column: Reviews
- Samples: [Great job, Eagle National! Each person was professional and helped us ..., Matthew Richardson is professional and helpful. He helped us find the ..., We had a past experience with Eagle National Mortgage and would withou..., We have been dealing with Brad Thomka from the beginning of what start..., I can't express how grateful I am for the support that Zach provided t... (truncated)]
- Column: Product
- Samples: [Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage]
- Column: district_id
- Samples: [65, 66, 23, 55, 24]
| SELECT 100.0 * (SUM(CASE WHEN strftime('%Y', T2.`Date received`) = '2017' THEN 1 ELSE 0 END) - SUM(CASE WHEN strftime('%Y', T2.`Date received`) = '2016' THEN 1 ELSE 0 END)) / SUM(CASE WHEN strftime('%Y', T2.`Date received`) = '2016' THEN 1 ELSE 0 END) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T1.city = 'New York City' |
|
Solve the following sql problem:
What was the serve time for the complaint call from client "C00007127" on 2017/2/22?
Schema:
SCHEMA:
- Table: state
- Column: StateCode
- Samples: [AL, AR, AZ, CA, CO]
- Column: State
- Samples: [Alabama, Arkansas, Arizona, California, Colorado]
- Column: Region
- Samples: [South, South, West, West, West]
- Table: callcenterlogs
- Column: Date received
- Samples: [2017-03-27, 2017-03-27, 2017-03-27, 2017-03-23, 2017-03-22]
- Column: Complaint ID
- Samples: [CR2406263, CR2405641, CR2405629, CR2400594, CR2399607]
- Column: rand client
- Samples: [C00004587, C00003328, C00001685, C00001945, C00004303]
- Column: phonefinal
- Samples: [977-806-9726, 322-598-7152, 508-311-5237, 265-394-2727, 206-008-0460]
- Column: vru+line
- Samples: [AA0103, AA0205, AA0110, AA0113, AA0102]
- Column: call_id
- Samples: [34536, 34537, 34538, 34540, 34541]
- Column: priority
- Samples: [0, 0, 2, 2, 1]
- Column: type
- Samples: [NW, PS, PS, PS, PS]
- Column: outcome
- Samples: [AGENT, AGENT, AGENT, AGENT, AGENT]
- Column: server
- Samples: [MICHAL, TOVA, YIFAT, AVNI, STEREN]
- Column: ser_start
- Samples: [13:34:11, 10:58:22, 13:00:54, 16:18:21, 14:48:22]
- Column: ser_exit
- Samples: [13:40:23, 11:16:10, 13:13:31, 16:19:40, 14:55:19]
- Column: ser_time
- Samples: [00:06:12, 00:17:48, 00:12:37, 00:01:19, 00:06:57]
- Table: client
- Column: client_id
- Samples: [C00000001, C00000002, C00000003, C00000004, C00000005]
- Column: sex
- Samples: [Female, Male, Female, Male, Female]
- Column: day
- Samples: [13, 4, 9, 1, 3]
- Column: month
- Samples: [12, 2, 10, 12, 7]
- Column: year
- Samples: [1990, 1965, 1960, 1976, 1980]
- Column: age
- Samples: [29, 54, 59, 43, 39]
- Column: social
- Samples: [926-93-2157, 806-94-5725, 614-70-9100, 580-20-3414, 536-14-5809]
- Column: first
- Samples: [Emma, Noah, Olivia, Liam, Sophia]
- Column: middle
- Samples: [Avaya, Everest, Brooklynne, Irvin, Danae]
- Column: last
- Samples: [Smith, Thompson, Johnson, White, Williams]
- Column: phone
- Samples: [367-171-6840, 212-423-7734, 212-425-6932, 951-567-8925, 428-265-1568]
- Column: email
- Samples: [[email protected], [email protected], [email protected], [email protected], [email protected]]
- Column: address_1
- Samples: [387 Wellington Ave., 75 W. Berkshire St., 36 Second St., 7607 Sunnyslope Street, 755 Galvin Street]
- Column: address_2
- Samples: [Unit 1, None, None, None, None]
- Column: city
- Samples: [Albuquerque, New York City, New York City, Indianapolis, Indianapolis]
- Column: state
- Samples: [NM, NY, NY, IN, IN]
- Column: zipcode
- Samples: [47246, 10040, 10162, 49047, 40852]
- Column: district_id
- Samples: [18, 1, 1, 5, 5]
- Table: district
- Column: district_id
- Samples: [1, 2, 3, 4, 5]
- Column: city
- Samples: [New York City, Jacksonville, Columbus, Charlotte, Indianapolis]
- Column: state_abbrev
- Samples: [NY, FL, OH, NC, IN]
- Column: division
- Samples: [Middle Atlantic, South Atlantic, East North Central, South Atlantic, East North Central]
- Table: events
- Column: Date received
- Samples: [2014-07-03, 2012-04-12, 2012-04-03, 2012-03-14, 2012-03-05]
- Column: Product
- Samples: [Bank account or service, Bank account or service, Bank account or service, Credit card, Bank account or service]
- Column: Sub-product
- Samples: [Checking account, Savings account, Checking account, None, Checking account]
- Column: Issue
- Samples: [Deposits and withdrawals, Account opening, closing, or management, Account opening, closing, or management, Billing disputes, Account opening, closing, or management]
- Column: Sub-issue
- Samples: [None, None, None, None, None]
- Column: Consumer complaint narrative
- Samples: [None, None, None, None, None]
- Column: Tags
- Samples: [None, None, None, None, None]
- Column: Consumer consent provided?
- Samples: [N/A, N/A, N/A, N/A, N/A]
- Column: Submitted via
- Samples: [Email, Email, Email, Email, Email]
- Column: Date sent to company
- Samples: [2014-07-09, 2012-04-13, 2012-04-03, 2012-03-14, 2012-03-06]
- Column: Company response to consumer
- Samples: [Closed with explanation, Closed with relief, Closed without relief, Closed with relief, Closed with relief]
- Column: Timely response?
- Samples: [Yes, Yes, Yes, Yes, Yes]
- Column: Consumer disputed?
- Samples: [No, No, No, No, No]
- Column: Complaint ID
- Samples: [CR0922485, CR0057298, CR0043811, CR0035411, CR0030939]
- Column: Client_ID
- Samples: [C00001925, C00003141, C00000297, C00004275, C00000900]
- Table: reviews
- Column: Date
- Samples: [2017-10-04, 2017-10-02, 2017-08-21, 2017-12-17, 2016-05-27]
- Column: Stars
- Samples: [5, 5, 5, 5, 5]
- Column: Reviews
- Samples: [Great job, Eagle National! Each person was professional and helped us ..., Matthew Richardson is professional and helpful. He helped us find the ..., We had a past experience with Eagle National Mortgage and would withou..., We have been dealing with Brad Thomka from the beginning of what start..., I can't express how grateful I am for the support that Zach provided t... (truncated)]
- Column: Product
- Samples: [Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage]
- Column: district_id
- Samples: [65, 66, 23, 55, 24]
| SELECT T1.ser_time FROM callcenterlogs AS T1 INNER JOIN events AS T2 ON T1.`Complaint ID` = T2.`Complaint ID` WHERE T2.Client_ID = 'C00007127' AND T1.`Date received` = '2017-02-22' |
|
Solve the following sql problem:
Which state does the owner of "[email protected]" live in? Give the full name of the state.
Schema:
SCHEMA:
- Table: state
- Column: StateCode
- Samples: [AL, AR, AZ, CA, CO]
- Column: State
- Samples: [Alabama, Arkansas, Arizona, California, Colorado]
- Column: Region
- Samples: [South, South, West, West, West]
- Table: callcenterlogs
- Column: Date received
- Samples: [2017-03-27, 2017-03-27, 2017-03-27, 2017-03-23, 2017-03-22]
- Column: Complaint ID
- Samples: [CR2406263, CR2405641, CR2405629, CR2400594, CR2399607]
- Column: rand client
- Samples: [C00004587, C00003328, C00001685, C00001945, C00004303]
- Column: phonefinal
- Samples: [977-806-9726, 322-598-7152, 508-311-5237, 265-394-2727, 206-008-0460]
- Column: vru+line
- Samples: [AA0103, AA0205, AA0110, AA0113, AA0102]
- Column: call_id
- Samples: [34536, 34537, 34538, 34540, 34541]
- Column: priority
- Samples: [0, 0, 2, 2, 1]
- Column: type
- Samples: [NW, PS, PS, PS, PS]
- Column: outcome
- Samples: [AGENT, AGENT, AGENT, AGENT, AGENT]
- Column: server
- Samples: [MICHAL, TOVA, YIFAT, AVNI, STEREN]
- Column: ser_start
- Samples: [13:34:11, 10:58:22, 13:00:54, 16:18:21, 14:48:22]
- Column: ser_exit
- Samples: [13:40:23, 11:16:10, 13:13:31, 16:19:40, 14:55:19]
- Column: ser_time
- Samples: [00:06:12, 00:17:48, 00:12:37, 00:01:19, 00:06:57]
- Table: client
- Column: client_id
- Samples: [C00000001, C00000002, C00000003, C00000004, C00000005]
- Column: sex
- Samples: [Female, Male, Female, Male, Female]
- Column: day
- Samples: [13, 4, 9, 1, 3]
- Column: month
- Samples: [12, 2, 10, 12, 7]
- Column: year
- Samples: [1990, 1965, 1960, 1976, 1980]
- Column: age
- Samples: [29, 54, 59, 43, 39]
- Column: social
- Samples: [926-93-2157, 806-94-5725, 614-70-9100, 580-20-3414, 536-14-5809]
- Column: first
- Samples: [Emma, Noah, Olivia, Liam, Sophia]
- Column: middle
- Samples: [Avaya, Everest, Brooklynne, Irvin, Danae]
- Column: last
- Samples: [Smith, Thompson, Johnson, White, Williams]
- Column: phone
- Samples: [367-171-6840, 212-423-7734, 212-425-6932, 951-567-8925, 428-265-1568]
- Column: email
- Samples: [[email protected], [email protected], [email protected], [email protected], [email protected]]
- Column: address_1
- Samples: [387 Wellington Ave., 75 W. Berkshire St., 36 Second St., 7607 Sunnyslope Street, 755 Galvin Street]
- Column: address_2
- Samples: [Unit 1, None, None, None, None]
- Column: city
- Samples: [Albuquerque, New York City, New York City, Indianapolis, Indianapolis]
- Column: state
- Samples: [NM, NY, NY, IN, IN]
- Column: zipcode
- Samples: [47246, 10040, 10162, 49047, 40852]
- Column: district_id
- Samples: [18, 1, 1, 5, 5]
- Table: district
- Column: district_id
- Samples: [1, 2, 3, 4, 5]
- Column: city
- Samples: [New York City, Jacksonville, Columbus, Charlotte, Indianapolis]
- Column: state_abbrev
- Samples: [NY, FL, OH, NC, IN]
- Column: division
- Samples: [Middle Atlantic, South Atlantic, East North Central, South Atlantic, East North Central]
- Table: events
- Column: Date received
- Samples: [2014-07-03, 2012-04-12, 2012-04-03, 2012-03-14, 2012-03-05]
- Column: Product
- Samples: [Bank account or service, Bank account or service, Bank account or service, Credit card, Bank account or service]
- Column: Sub-product
- Samples: [Checking account, Savings account, Checking account, None, Checking account]
- Column: Issue
- Samples: [Deposits and withdrawals, Account opening, closing, or management, Account opening, closing, or management, Billing disputes, Account opening, closing, or management]
- Column: Sub-issue
- Samples: [None, None, None, None, None]
- Column: Consumer complaint narrative
- Samples: [None, None, None, None, None]
- Column: Tags
- Samples: [None, None, None, None, None]
- Column: Consumer consent provided?
- Samples: [N/A, N/A, N/A, N/A, N/A]
- Column: Submitted via
- Samples: [Email, Email, Email, Email, Email]
- Column: Date sent to company
- Samples: [2014-07-09, 2012-04-13, 2012-04-03, 2012-03-14, 2012-03-06]
- Column: Company response to consumer
- Samples: [Closed with explanation, Closed with relief, Closed without relief, Closed with relief, Closed with relief]
- Column: Timely response?
- Samples: [Yes, Yes, Yes, Yes, Yes]
- Column: Consumer disputed?
- Samples: [No, No, No, No, No]
- Column: Complaint ID
- Samples: [CR0922485, CR0057298, CR0043811, CR0035411, CR0030939]
- Column: Client_ID
- Samples: [C00001925, C00003141, C00000297, C00004275, C00000900]
- Table: reviews
- Column: Date
- Samples: [2017-10-04, 2017-10-02, 2017-08-21, 2017-12-17, 2016-05-27]
- Column: Stars
- Samples: [5, 5, 5, 5, 5]
- Column: Reviews
- Samples: [Great job, Eagle National! Each person was professional and helped us ..., Matthew Richardson is professional and helpful. He helped us find the ..., We had a past experience with Eagle National Mortgage and would withou..., We have been dealing with Brad Thomka from the beginning of what start..., I can't express how grateful I am for the support that Zach provided t... (truncated)]
- Column: Product
- Samples: [Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage]
- Column: district_id
- Samples: [65, 66, 23, 55, 24]
| SELECT T1.state FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T1.email = '[email protected]' |
|
Solve the following sql problem:
Which detailed product did Mr Lennox Oliver Drake complain about?
Schema:
SCHEMA:
- Table: state
- Column: StateCode
- Samples: [AL, AR, AZ, CA, CO]
- Column: State
- Samples: [Alabama, Arkansas, Arizona, California, Colorado]
- Column: Region
- Samples: [South, South, West, West, West]
- Table: callcenterlogs
- Column: Date received
- Samples: [2017-03-27, 2017-03-27, 2017-03-27, 2017-03-23, 2017-03-22]
- Column: Complaint ID
- Samples: [CR2406263, CR2405641, CR2405629, CR2400594, CR2399607]
- Column: rand client
- Samples: [C00004587, C00003328, C00001685, C00001945, C00004303]
- Column: phonefinal
- Samples: [977-806-9726, 322-598-7152, 508-311-5237, 265-394-2727, 206-008-0460]
- Column: vru+line
- Samples: [AA0103, AA0205, AA0110, AA0113, AA0102]
- Column: call_id
- Samples: [34536, 34537, 34538, 34540, 34541]
- Column: priority
- Samples: [0, 0, 2, 2, 1]
- Column: type
- Samples: [NW, PS, PS, PS, PS]
- Column: outcome
- Samples: [AGENT, AGENT, AGENT, AGENT, AGENT]
- Column: server
- Samples: [MICHAL, TOVA, YIFAT, AVNI, STEREN]
- Column: ser_start
- Samples: [13:34:11, 10:58:22, 13:00:54, 16:18:21, 14:48:22]
- Column: ser_exit
- Samples: [13:40:23, 11:16:10, 13:13:31, 16:19:40, 14:55:19]
- Column: ser_time
- Samples: [00:06:12, 00:17:48, 00:12:37, 00:01:19, 00:06:57]
- Table: client
- Column: client_id
- Samples: [C00000001, C00000002, C00000003, C00000004, C00000005]
- Column: sex
- Samples: [Female, Male, Female, Male, Female]
- Column: day
- Samples: [13, 4, 9, 1, 3]
- Column: month
- Samples: [12, 2, 10, 12, 7]
- Column: year
- Samples: [1990, 1965, 1960, 1976, 1980]
- Column: age
- Samples: [29, 54, 59, 43, 39]
- Column: social
- Samples: [926-93-2157, 806-94-5725, 614-70-9100, 580-20-3414, 536-14-5809]
- Column: first
- Samples: [Emma, Noah, Olivia, Liam, Sophia]
- Column: middle
- Samples: [Avaya, Everest, Brooklynne, Irvin, Danae]
- Column: last
- Samples: [Smith, Thompson, Johnson, White, Williams]
- Column: phone
- Samples: [367-171-6840, 212-423-7734, 212-425-6932, 951-567-8925, 428-265-1568]
- Column: email
- Samples: [[email protected], [email protected], [email protected], [email protected], [email protected]]
- Column: address_1
- Samples: [387 Wellington Ave., 75 W. Berkshire St., 36 Second St., 7607 Sunnyslope Street, 755 Galvin Street]
- Column: address_2
- Samples: [Unit 1, None, None, None, None]
- Column: city
- Samples: [Albuquerque, New York City, New York City, Indianapolis, Indianapolis]
- Column: state
- Samples: [NM, NY, NY, IN, IN]
- Column: zipcode
- Samples: [47246, 10040, 10162, 49047, 40852]
- Column: district_id
- Samples: [18, 1, 1, 5, 5]
- Table: district
- Column: district_id
- Samples: [1, 2, 3, 4, 5]
- Column: city
- Samples: [New York City, Jacksonville, Columbus, Charlotte, Indianapolis]
- Column: state_abbrev
- Samples: [NY, FL, OH, NC, IN]
- Column: division
- Samples: [Middle Atlantic, South Atlantic, East North Central, South Atlantic, East North Central]
- Table: events
- Column: Date received
- Samples: [2014-07-03, 2012-04-12, 2012-04-03, 2012-03-14, 2012-03-05]
- Column: Product
- Samples: [Bank account or service, Bank account or service, Bank account or service, Credit card, Bank account or service]
- Column: Sub-product
- Samples: [Checking account, Savings account, Checking account, None, Checking account]
- Column: Issue
- Samples: [Deposits and withdrawals, Account opening, closing, or management, Account opening, closing, or management, Billing disputes, Account opening, closing, or management]
- Column: Sub-issue
- Samples: [None, None, None, None, None]
- Column: Consumer complaint narrative
- Samples: [None, None, None, None, None]
- Column: Tags
- Samples: [None, None, None, None, None]
- Column: Consumer consent provided?
- Samples: [N/A, N/A, N/A, N/A, N/A]
- Column: Submitted via
- Samples: [Email, Email, Email, Email, Email]
- Column: Date sent to company
- Samples: [2014-07-09, 2012-04-13, 2012-04-03, 2012-03-14, 2012-03-06]
- Column: Company response to consumer
- Samples: [Closed with explanation, Closed with relief, Closed without relief, Closed with relief, Closed with relief]
- Column: Timely response?
- Samples: [Yes, Yes, Yes, Yes, Yes]
- Column: Consumer disputed?
- Samples: [No, No, No, No, No]
- Column: Complaint ID
- Samples: [CR0922485, CR0057298, CR0043811, CR0035411, CR0030939]
- Column: Client_ID
- Samples: [C00001925, C00003141, C00000297, C00004275, C00000900]
- Table: reviews
- Column: Date
- Samples: [2017-10-04, 2017-10-02, 2017-08-21, 2017-12-17, 2016-05-27]
- Column: Stars
- Samples: [5, 5, 5, 5, 5]
- Column: Reviews
- Samples: [Great job, Eagle National! Each person was professional and helped us ..., Matthew Richardson is professional and helpful. He helped us find the ..., We had a past experience with Eagle National Mortgage and would withou..., We have been dealing with Brad Thomka from the beginning of what start..., I can't express how grateful I am for the support that Zach provided t... (truncated)]
- Column: Product
- Samples: [Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage]
- Column: district_id
- Samples: [65, 66, 23, 55, 24]
| SELECT DISTINCT T2.`Sub-product` FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T1.first = 'Lennox' AND T1.middle = 'Oliver' AND T1.last = 'Drake' AND T1.sex = 'Male' |
|
Solve the following sql problem:
What was the detailed issue did Mr Gunner Omer Fuller complain about?
Schema:
SCHEMA:
- Table: state
- Column: StateCode
- Samples: [AL, AR, AZ, CA, CO]
- Column: State
- Samples: [Alabama, Arkansas, Arizona, California, Colorado]
- Column: Region
- Samples: [South, South, West, West, West]
- Table: callcenterlogs
- Column: Date received
- Samples: [2017-03-27, 2017-03-27, 2017-03-27, 2017-03-23, 2017-03-22]
- Column: Complaint ID
- Samples: [CR2406263, CR2405641, CR2405629, CR2400594, CR2399607]
- Column: rand client
- Samples: [C00004587, C00003328, C00001685, C00001945, C00004303]
- Column: phonefinal
- Samples: [977-806-9726, 322-598-7152, 508-311-5237, 265-394-2727, 206-008-0460]
- Column: vru+line
- Samples: [AA0103, AA0205, AA0110, AA0113, AA0102]
- Column: call_id
- Samples: [34536, 34537, 34538, 34540, 34541]
- Column: priority
- Samples: [0, 0, 2, 2, 1]
- Column: type
- Samples: [NW, PS, PS, PS, PS]
- Column: outcome
- Samples: [AGENT, AGENT, AGENT, AGENT, AGENT]
- Column: server
- Samples: [MICHAL, TOVA, YIFAT, AVNI, STEREN]
- Column: ser_start
- Samples: [13:34:11, 10:58:22, 13:00:54, 16:18:21, 14:48:22]
- Column: ser_exit
- Samples: [13:40:23, 11:16:10, 13:13:31, 16:19:40, 14:55:19]
- Column: ser_time
- Samples: [00:06:12, 00:17:48, 00:12:37, 00:01:19, 00:06:57]
- Table: client
- Column: client_id
- Samples: [C00000001, C00000002, C00000003, C00000004, C00000005]
- Column: sex
- Samples: [Female, Male, Female, Male, Female]
- Column: day
- Samples: [13, 4, 9, 1, 3]
- Column: month
- Samples: [12, 2, 10, 12, 7]
- Column: year
- Samples: [1990, 1965, 1960, 1976, 1980]
- Column: age
- Samples: [29, 54, 59, 43, 39]
- Column: social
- Samples: [926-93-2157, 806-94-5725, 614-70-9100, 580-20-3414, 536-14-5809]
- Column: first
- Samples: [Emma, Noah, Olivia, Liam, Sophia]
- Column: middle
- Samples: [Avaya, Everest, Brooklynne, Irvin, Danae]
- Column: last
- Samples: [Smith, Thompson, Johnson, White, Williams]
- Column: phone
- Samples: [367-171-6840, 212-423-7734, 212-425-6932, 951-567-8925, 428-265-1568]
- Column: email
- Samples: [[email protected], [email protected], [email protected], [email protected], [email protected]]
- Column: address_1
- Samples: [387 Wellington Ave., 75 W. Berkshire St., 36 Second St., 7607 Sunnyslope Street, 755 Galvin Street]
- Column: address_2
- Samples: [Unit 1, None, None, None, None]
- Column: city
- Samples: [Albuquerque, New York City, New York City, Indianapolis, Indianapolis]
- Column: state
- Samples: [NM, NY, NY, IN, IN]
- Column: zipcode
- Samples: [47246, 10040, 10162, 49047, 40852]
- Column: district_id
- Samples: [18, 1, 1, 5, 5]
- Table: district
- Column: district_id
- Samples: [1, 2, 3, 4, 5]
- Column: city
- Samples: [New York City, Jacksonville, Columbus, Charlotte, Indianapolis]
- Column: state_abbrev
- Samples: [NY, FL, OH, NC, IN]
- Column: division
- Samples: [Middle Atlantic, South Atlantic, East North Central, South Atlantic, East North Central]
- Table: events
- Column: Date received
- Samples: [2014-07-03, 2012-04-12, 2012-04-03, 2012-03-14, 2012-03-05]
- Column: Product
- Samples: [Bank account or service, Bank account or service, Bank account or service, Credit card, Bank account or service]
- Column: Sub-product
- Samples: [Checking account, Savings account, Checking account, None, Checking account]
- Column: Issue
- Samples: [Deposits and withdrawals, Account opening, closing, or management, Account opening, closing, or management, Billing disputes, Account opening, closing, or management]
- Column: Sub-issue
- Samples: [None, None, None, None, None]
- Column: Consumer complaint narrative
- Samples: [None, None, None, None, None]
- Column: Tags
- Samples: [None, None, None, None, None]
- Column: Consumer consent provided?
- Samples: [N/A, N/A, N/A, N/A, N/A]
- Column: Submitted via
- Samples: [Email, Email, Email, Email, Email]
- Column: Date sent to company
- Samples: [2014-07-09, 2012-04-13, 2012-04-03, 2012-03-14, 2012-03-06]
- Column: Company response to consumer
- Samples: [Closed with explanation, Closed with relief, Closed without relief, Closed with relief, Closed with relief]
- Column: Timely response?
- Samples: [Yes, Yes, Yes, Yes, Yes]
- Column: Consumer disputed?
- Samples: [No, No, No, No, No]
- Column: Complaint ID
- Samples: [CR0922485, CR0057298, CR0043811, CR0035411, CR0030939]
- Column: Client_ID
- Samples: [C00001925, C00003141, C00000297, C00004275, C00000900]
- Table: reviews
- Column: Date
- Samples: [2017-10-04, 2017-10-02, 2017-08-21, 2017-12-17, 2016-05-27]
- Column: Stars
- Samples: [5, 5, 5, 5, 5]
- Column: Reviews
- Samples: [Great job, Eagle National! Each person was professional and helped us ..., Matthew Richardson is professional and helpful. He helped us find the ..., We had a past experience with Eagle National Mortgage and would withou..., We have been dealing with Brad Thomka from the beginning of what start..., I can't express how grateful I am for the support that Zach provided t... (truncated)]
- Column: Product
- Samples: [Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage]
- Column: district_id
- Samples: [65, 66, 23, 55, 24]
| SELECT T2.`Sub-issue` FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T1.first = 'Gunner' AND T1.middle = 'Omer' AND T1.last = 'Fuller' AND T1.sex = 'Male' |
|
Solve the following sql problem:
Did Ms. Lyric Emely Taylor provide the consent for result of the complaint call on 2016/5/20?
Schema:
SCHEMA:
- Table: state
- Column: StateCode
- Samples: [AL, AR, AZ, CA, CO]
- Column: State
- Samples: [Alabama, Arkansas, Arizona, California, Colorado]
- Column: Region
- Samples: [South, South, West, West, West]
- Table: callcenterlogs
- Column: Date received
- Samples: [2017-03-27, 2017-03-27, 2017-03-27, 2017-03-23, 2017-03-22]
- Column: Complaint ID
- Samples: [CR2406263, CR2405641, CR2405629, CR2400594, CR2399607]
- Column: rand client
- Samples: [C00004587, C00003328, C00001685, C00001945, C00004303]
- Column: phonefinal
- Samples: [977-806-9726, 322-598-7152, 508-311-5237, 265-394-2727, 206-008-0460]
- Column: vru+line
- Samples: [AA0103, AA0205, AA0110, AA0113, AA0102]
- Column: call_id
- Samples: [34536, 34537, 34538, 34540, 34541]
- Column: priority
- Samples: [0, 0, 2, 2, 1]
- Column: type
- Samples: [NW, PS, PS, PS, PS]
- Column: outcome
- Samples: [AGENT, AGENT, AGENT, AGENT, AGENT]
- Column: server
- Samples: [MICHAL, TOVA, YIFAT, AVNI, STEREN]
- Column: ser_start
- Samples: [13:34:11, 10:58:22, 13:00:54, 16:18:21, 14:48:22]
- Column: ser_exit
- Samples: [13:40:23, 11:16:10, 13:13:31, 16:19:40, 14:55:19]
- Column: ser_time
- Samples: [00:06:12, 00:17:48, 00:12:37, 00:01:19, 00:06:57]
- Table: client
- Column: client_id
- Samples: [C00000001, C00000002, C00000003, C00000004, C00000005]
- Column: sex
- Samples: [Female, Male, Female, Male, Female]
- Column: day
- Samples: [13, 4, 9, 1, 3]
- Column: month
- Samples: [12, 2, 10, 12, 7]
- Column: year
- Samples: [1990, 1965, 1960, 1976, 1980]
- Column: age
- Samples: [29, 54, 59, 43, 39]
- Column: social
- Samples: [926-93-2157, 806-94-5725, 614-70-9100, 580-20-3414, 536-14-5809]
- Column: first
- Samples: [Emma, Noah, Olivia, Liam, Sophia]
- Column: middle
- Samples: [Avaya, Everest, Brooklynne, Irvin, Danae]
- Column: last
- Samples: [Smith, Thompson, Johnson, White, Williams]
- Column: phone
- Samples: [367-171-6840, 212-423-7734, 212-425-6932, 951-567-8925, 428-265-1568]
- Column: email
- Samples: [[email protected], [email protected], [email protected], [email protected], [email protected]]
- Column: address_1
- Samples: [387 Wellington Ave., 75 W. Berkshire St., 36 Second St., 7607 Sunnyslope Street, 755 Galvin Street]
- Column: address_2
- Samples: [Unit 1, None, None, None, None]
- Column: city
- Samples: [Albuquerque, New York City, New York City, Indianapolis, Indianapolis]
- Column: state
- Samples: [NM, NY, NY, IN, IN]
- Column: zipcode
- Samples: [47246, 10040, 10162, 49047, 40852]
- Column: district_id
- Samples: [18, 1, 1, 5, 5]
- Table: district
- Column: district_id
- Samples: [1, 2, 3, 4, 5]
- Column: city
- Samples: [New York City, Jacksonville, Columbus, Charlotte, Indianapolis]
- Column: state_abbrev
- Samples: [NY, FL, OH, NC, IN]
- Column: division
- Samples: [Middle Atlantic, South Atlantic, East North Central, South Atlantic, East North Central]
- Table: events
- Column: Date received
- Samples: [2014-07-03, 2012-04-12, 2012-04-03, 2012-03-14, 2012-03-05]
- Column: Product
- Samples: [Bank account or service, Bank account or service, Bank account or service, Credit card, Bank account or service]
- Column: Sub-product
- Samples: [Checking account, Savings account, Checking account, None, Checking account]
- Column: Issue
- Samples: [Deposits and withdrawals, Account opening, closing, or management, Account opening, closing, or management, Billing disputes, Account opening, closing, or management]
- Column: Sub-issue
- Samples: [None, None, None, None, None]
- Column: Consumer complaint narrative
- Samples: [None, None, None, None, None]
- Column: Tags
- Samples: [None, None, None, None, None]
- Column: Consumer consent provided?
- Samples: [N/A, N/A, N/A, N/A, N/A]
- Column: Submitted via
- Samples: [Email, Email, Email, Email, Email]
- Column: Date sent to company
- Samples: [2014-07-09, 2012-04-13, 2012-04-03, 2012-03-14, 2012-03-06]
- Column: Company response to consumer
- Samples: [Closed with explanation, Closed with relief, Closed without relief, Closed with relief, Closed with relief]
- Column: Timely response?
- Samples: [Yes, Yes, Yes, Yes, Yes]
- Column: Consumer disputed?
- Samples: [No, No, No, No, No]
- Column: Complaint ID
- Samples: [CR0922485, CR0057298, CR0043811, CR0035411, CR0030939]
- Column: Client_ID
- Samples: [C00001925, C00003141, C00000297, C00004275, C00000900]
- Table: reviews
- Column: Date
- Samples: [2017-10-04, 2017-10-02, 2017-08-21, 2017-12-17, 2016-05-27]
- Column: Stars
- Samples: [5, 5, 5, 5, 5]
- Column: Reviews
- Samples: [Great job, Eagle National! Each person was professional and helped us ..., Matthew Richardson is professional and helpful. He helped us find the ..., We had a past experience with Eagle National Mortgage and would withou..., We have been dealing with Brad Thomka from the beginning of what start..., I can't express how grateful I am for the support that Zach provided t... (truncated)]
- Column: Product
- Samples: [Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage]
- Column: district_id
- Samples: [65, 66, 23, 55, 24]
| SELECT CASE WHEN T2.`Consumer consent provided?` IN (NULL, 'N/A', '') THEN 'No' ELSE 'Yes' END FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T1.first = 'Lyric' AND T1.middle = 'Emely' AND T1.last = 'Taylor' AND T1.sex = 'Female' AND T2.`Date received` = '2016-05-20' |
|
Solve the following sql problem:
How many days delay for the complaint call from Mr. Brantley Julian Stanley on 2012/5/18?
Schema:
SCHEMA:
- Table: state
- Column: StateCode
- Samples: [AL, AR, AZ, CA, CO]
- Column: State
- Samples: [Alabama, Arkansas, Arizona, California, Colorado]
- Column: Region
- Samples: [South, South, West, West, West]
- Table: callcenterlogs
- Column: Date received
- Samples: [2017-03-27, 2017-03-27, 2017-03-27, 2017-03-23, 2017-03-22]
- Column: Complaint ID
- Samples: [CR2406263, CR2405641, CR2405629, CR2400594, CR2399607]
- Column: rand client
- Samples: [C00004587, C00003328, C00001685, C00001945, C00004303]
- Column: phonefinal
- Samples: [977-806-9726, 322-598-7152, 508-311-5237, 265-394-2727, 206-008-0460]
- Column: vru+line
- Samples: [AA0103, AA0205, AA0110, AA0113, AA0102]
- Column: call_id
- Samples: [34536, 34537, 34538, 34540, 34541]
- Column: priority
- Samples: [0, 0, 2, 2, 1]
- Column: type
- Samples: [NW, PS, PS, PS, PS]
- Column: outcome
- Samples: [AGENT, AGENT, AGENT, AGENT, AGENT]
- Column: server
- Samples: [MICHAL, TOVA, YIFAT, AVNI, STEREN]
- Column: ser_start
- Samples: [13:34:11, 10:58:22, 13:00:54, 16:18:21, 14:48:22]
- Column: ser_exit
- Samples: [13:40:23, 11:16:10, 13:13:31, 16:19:40, 14:55:19]
- Column: ser_time
- Samples: [00:06:12, 00:17:48, 00:12:37, 00:01:19, 00:06:57]
- Table: client
- Column: client_id
- Samples: [C00000001, C00000002, C00000003, C00000004, C00000005]
- Column: sex
- Samples: [Female, Male, Female, Male, Female]
- Column: day
- Samples: [13, 4, 9, 1, 3]
- Column: month
- Samples: [12, 2, 10, 12, 7]
- Column: year
- Samples: [1990, 1965, 1960, 1976, 1980]
- Column: age
- Samples: [29, 54, 59, 43, 39]
- Column: social
- Samples: [926-93-2157, 806-94-5725, 614-70-9100, 580-20-3414, 536-14-5809]
- Column: first
- Samples: [Emma, Noah, Olivia, Liam, Sophia]
- Column: middle
- Samples: [Avaya, Everest, Brooklynne, Irvin, Danae]
- Column: last
- Samples: [Smith, Thompson, Johnson, White, Williams]
- Column: phone
- Samples: [367-171-6840, 212-423-7734, 212-425-6932, 951-567-8925, 428-265-1568]
- Column: email
- Samples: [[email protected], [email protected], [email protected], [email protected], [email protected]]
- Column: address_1
- Samples: [387 Wellington Ave., 75 W. Berkshire St., 36 Second St., 7607 Sunnyslope Street, 755 Galvin Street]
- Column: address_2
- Samples: [Unit 1, None, None, None, None]
- Column: city
- Samples: [Albuquerque, New York City, New York City, Indianapolis, Indianapolis]
- Column: state
- Samples: [NM, NY, NY, IN, IN]
- Column: zipcode
- Samples: [47246, 10040, 10162, 49047, 40852]
- Column: district_id
- Samples: [18, 1, 1, 5, 5]
- Table: district
- Column: district_id
- Samples: [1, 2, 3, 4, 5]
- Column: city
- Samples: [New York City, Jacksonville, Columbus, Charlotte, Indianapolis]
- Column: state_abbrev
- Samples: [NY, FL, OH, NC, IN]
- Column: division
- Samples: [Middle Atlantic, South Atlantic, East North Central, South Atlantic, East North Central]
- Table: events
- Column: Date received
- Samples: [2014-07-03, 2012-04-12, 2012-04-03, 2012-03-14, 2012-03-05]
- Column: Product
- Samples: [Bank account or service, Bank account or service, Bank account or service, Credit card, Bank account or service]
- Column: Sub-product
- Samples: [Checking account, Savings account, Checking account, None, Checking account]
- Column: Issue
- Samples: [Deposits and withdrawals, Account opening, closing, or management, Account opening, closing, or management, Billing disputes, Account opening, closing, or management]
- Column: Sub-issue
- Samples: [None, None, None, None, None]
- Column: Consumer complaint narrative
- Samples: [None, None, None, None, None]
- Column: Tags
- Samples: [None, None, None, None, None]
- Column: Consumer consent provided?
- Samples: [N/A, N/A, N/A, N/A, N/A]
- Column: Submitted via
- Samples: [Email, Email, Email, Email, Email]
- Column: Date sent to company
- Samples: [2014-07-09, 2012-04-13, 2012-04-03, 2012-03-14, 2012-03-06]
- Column: Company response to consumer
- Samples: [Closed with explanation, Closed with relief, Closed without relief, Closed with relief, Closed with relief]
- Column: Timely response?
- Samples: [Yes, Yes, Yes, Yes, Yes]
- Column: Consumer disputed?
- Samples: [No, No, No, No, No]
- Column: Complaint ID
- Samples: [CR0922485, CR0057298, CR0043811, CR0035411, CR0030939]
- Column: Client_ID
- Samples: [C00001925, C00003141, C00000297, C00004275, C00000900]
- Table: reviews
- Column: Date
- Samples: [2017-10-04, 2017-10-02, 2017-08-21, 2017-12-17, 2016-05-27]
- Column: Stars
- Samples: [5, 5, 5, 5, 5]
- Column: Reviews
- Samples: [Great job, Eagle National! Each person was professional and helped us ..., Matthew Richardson is professional and helpful. He helped us find the ..., We had a past experience with Eagle National Mortgage and would withou..., We have been dealing with Brad Thomka from the beginning of what start..., I can't express how grateful I am for the support that Zach provided t... (truncated)]
- Column: Product
- Samples: [Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage]
- Column: district_id
- Samples: [65, 66, 23, 55, 24]
| SELECT 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`)) AS days FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Date received` = '2012-05-18' AND T1.sex = 'Male' AND T1.first = 'Brantley' AND T1.middle = 'Julian' AND T1.last = 'Stanley' |
|
Solve the following sql problem:
Which district did the review on 2018/9/11 come from? Give the name of the city.
Schema:
SCHEMA:
- Table: state
- Column: StateCode
- Samples: [AL, AR, AZ, CA, CO]
- Column: State
- Samples: [Alabama, Arkansas, Arizona, California, Colorado]
- Column: Region
- Samples: [South, South, West, West, West]
- Table: callcenterlogs
- Column: Date received
- Samples: [2017-03-27, 2017-03-27, 2017-03-27, 2017-03-23, 2017-03-22]
- Column: Complaint ID
- Samples: [CR2406263, CR2405641, CR2405629, CR2400594, CR2399607]
- Column: rand client
- Samples: [C00004587, C00003328, C00001685, C00001945, C00004303]
- Column: phonefinal
- Samples: [977-806-9726, 322-598-7152, 508-311-5237, 265-394-2727, 206-008-0460]
- Column: vru+line
- Samples: [AA0103, AA0205, AA0110, AA0113, AA0102]
- Column: call_id
- Samples: [34536, 34537, 34538, 34540, 34541]
- Column: priority
- Samples: [0, 0, 2, 2, 1]
- Column: type
- Samples: [NW, PS, PS, PS, PS]
- Column: outcome
- Samples: [AGENT, AGENT, AGENT, AGENT, AGENT]
- Column: server
- Samples: [MICHAL, TOVA, YIFAT, AVNI, STEREN]
- Column: ser_start
- Samples: [13:34:11, 10:58:22, 13:00:54, 16:18:21, 14:48:22]
- Column: ser_exit
- Samples: [13:40:23, 11:16:10, 13:13:31, 16:19:40, 14:55:19]
- Column: ser_time
- Samples: [00:06:12, 00:17:48, 00:12:37, 00:01:19, 00:06:57]
- Table: client
- Column: client_id
- Samples: [C00000001, C00000002, C00000003, C00000004, C00000005]
- Column: sex
- Samples: [Female, Male, Female, Male, Female]
- Column: day
- Samples: [13, 4, 9, 1, 3]
- Column: month
- Samples: [12, 2, 10, 12, 7]
- Column: year
- Samples: [1990, 1965, 1960, 1976, 1980]
- Column: age
- Samples: [29, 54, 59, 43, 39]
- Column: social
- Samples: [926-93-2157, 806-94-5725, 614-70-9100, 580-20-3414, 536-14-5809]
- Column: first
- Samples: [Emma, Noah, Olivia, Liam, Sophia]
- Column: middle
- Samples: [Avaya, Everest, Brooklynne, Irvin, Danae]
- Column: last
- Samples: [Smith, Thompson, Johnson, White, Williams]
- Column: phone
- Samples: [367-171-6840, 212-423-7734, 212-425-6932, 951-567-8925, 428-265-1568]
- Column: email
- Samples: [[email protected], [email protected], [email protected], [email protected], [email protected]]
- Column: address_1
- Samples: [387 Wellington Ave., 75 W. Berkshire St., 36 Second St., 7607 Sunnyslope Street, 755 Galvin Street]
- Column: address_2
- Samples: [Unit 1, None, None, None, None]
- Column: city
- Samples: [Albuquerque, New York City, New York City, Indianapolis, Indianapolis]
- Column: state
- Samples: [NM, NY, NY, IN, IN]
- Column: zipcode
- Samples: [47246, 10040, 10162, 49047, 40852]
- Column: district_id
- Samples: [18, 1, 1, 5, 5]
- Table: district
- Column: district_id
- Samples: [1, 2, 3, 4, 5]
- Column: city
- Samples: [New York City, Jacksonville, Columbus, Charlotte, Indianapolis]
- Column: state_abbrev
- Samples: [NY, FL, OH, NC, IN]
- Column: division
- Samples: [Middle Atlantic, South Atlantic, East North Central, South Atlantic, East North Central]
- Table: events
- Column: Date received
- Samples: [2014-07-03, 2012-04-12, 2012-04-03, 2012-03-14, 2012-03-05]
- Column: Product
- Samples: [Bank account or service, Bank account or service, Bank account or service, Credit card, Bank account or service]
- Column: Sub-product
- Samples: [Checking account, Savings account, Checking account, None, Checking account]
- Column: Issue
- Samples: [Deposits and withdrawals, Account opening, closing, or management, Account opening, closing, or management, Billing disputes, Account opening, closing, or management]
- Column: Sub-issue
- Samples: [None, None, None, None, None]
- Column: Consumer complaint narrative
- Samples: [None, None, None, None, None]
- Column: Tags
- Samples: [None, None, None, None, None]
- Column: Consumer consent provided?
- Samples: [N/A, N/A, N/A, N/A, N/A]
- Column: Submitted via
- Samples: [Email, Email, Email, Email, Email]
- Column: Date sent to company
- Samples: [2014-07-09, 2012-04-13, 2012-04-03, 2012-03-14, 2012-03-06]
- Column: Company response to consumer
- Samples: [Closed with explanation, Closed with relief, Closed without relief, Closed with relief, Closed with relief]
- Column: Timely response?
- Samples: [Yes, Yes, Yes, Yes, Yes]
- Column: Consumer disputed?
- Samples: [No, No, No, No, No]
- Column: Complaint ID
- Samples: [CR0922485, CR0057298, CR0043811, CR0035411, CR0030939]
- Column: Client_ID
- Samples: [C00001925, C00003141, C00000297, C00004275, C00000900]
- Table: reviews
- Column: Date
- Samples: [2017-10-04, 2017-10-02, 2017-08-21, 2017-12-17, 2016-05-27]
- Column: Stars
- Samples: [5, 5, 5, 5, 5]
- Column: Reviews
- Samples: [Great job, Eagle National! Each person was professional and helped us ..., Matthew Richardson is professional and helpful. He helped us find the ..., We had a past experience with Eagle National Mortgage and would withou..., We have been dealing with Brad Thomka from the beginning of what start..., I can't express how grateful I am for the support that Zach provided t... (truncated)]
- Column: Product
- Samples: [Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage]
- Column: district_id
- Samples: [65, 66, 23, 55, 24]
| SELECT T2.district_id, T2.city FROM reviews AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T1.Date = '2018-09-11' |
|
Solve the following sql problem:
What was the review context from Jacksonville on 2017/7/22?
Schema:
SCHEMA:
- Table: state
- Column: StateCode
- Samples: [AL, AR, AZ, CA, CO]
- Column: State
- Samples: [Alabama, Arkansas, Arizona, California, Colorado]
- Column: Region
- Samples: [South, South, West, West, West]
- Table: callcenterlogs
- Column: Date received
- Samples: [2017-03-27, 2017-03-27, 2017-03-27, 2017-03-23, 2017-03-22]
- Column: Complaint ID
- Samples: [CR2406263, CR2405641, CR2405629, CR2400594, CR2399607]
- Column: rand client
- Samples: [C00004587, C00003328, C00001685, C00001945, C00004303]
- Column: phonefinal
- Samples: [977-806-9726, 322-598-7152, 508-311-5237, 265-394-2727, 206-008-0460]
- Column: vru+line
- Samples: [AA0103, AA0205, AA0110, AA0113, AA0102]
- Column: call_id
- Samples: [34536, 34537, 34538, 34540, 34541]
- Column: priority
- Samples: [0, 0, 2, 2, 1]
- Column: type
- Samples: [NW, PS, PS, PS, PS]
- Column: outcome
- Samples: [AGENT, AGENT, AGENT, AGENT, AGENT]
- Column: server
- Samples: [MICHAL, TOVA, YIFAT, AVNI, STEREN]
- Column: ser_start
- Samples: [13:34:11, 10:58:22, 13:00:54, 16:18:21, 14:48:22]
- Column: ser_exit
- Samples: [13:40:23, 11:16:10, 13:13:31, 16:19:40, 14:55:19]
- Column: ser_time
- Samples: [00:06:12, 00:17:48, 00:12:37, 00:01:19, 00:06:57]
- Table: client
- Column: client_id
- Samples: [C00000001, C00000002, C00000003, C00000004, C00000005]
- Column: sex
- Samples: [Female, Male, Female, Male, Female]
- Column: day
- Samples: [13, 4, 9, 1, 3]
- Column: month
- Samples: [12, 2, 10, 12, 7]
- Column: year
- Samples: [1990, 1965, 1960, 1976, 1980]
- Column: age
- Samples: [29, 54, 59, 43, 39]
- Column: social
- Samples: [926-93-2157, 806-94-5725, 614-70-9100, 580-20-3414, 536-14-5809]
- Column: first
- Samples: [Emma, Noah, Olivia, Liam, Sophia]
- Column: middle
- Samples: [Avaya, Everest, Brooklynne, Irvin, Danae]
- Column: last
- Samples: [Smith, Thompson, Johnson, White, Williams]
- Column: phone
- Samples: [367-171-6840, 212-423-7734, 212-425-6932, 951-567-8925, 428-265-1568]
- Column: email
- Samples: [[email protected], [email protected], [email protected], [email protected], [email protected]]
- Column: address_1
- Samples: [387 Wellington Ave., 75 W. Berkshire St., 36 Second St., 7607 Sunnyslope Street, 755 Galvin Street]
- Column: address_2
- Samples: [Unit 1, None, None, None, None]
- Column: city
- Samples: [Albuquerque, New York City, New York City, Indianapolis, Indianapolis]
- Column: state
- Samples: [NM, NY, NY, IN, IN]
- Column: zipcode
- Samples: [47246, 10040, 10162, 49047, 40852]
- Column: district_id
- Samples: [18, 1, 1, 5, 5]
- Table: district
- Column: district_id
- Samples: [1, 2, 3, 4, 5]
- Column: city
- Samples: [New York City, Jacksonville, Columbus, Charlotte, Indianapolis]
- Column: state_abbrev
- Samples: [NY, FL, OH, NC, IN]
- Column: division
- Samples: [Middle Atlantic, South Atlantic, East North Central, South Atlantic, East North Central]
- Table: events
- Column: Date received
- Samples: [2014-07-03, 2012-04-12, 2012-04-03, 2012-03-14, 2012-03-05]
- Column: Product
- Samples: [Bank account or service, Bank account or service, Bank account or service, Credit card, Bank account or service]
- Column: Sub-product
- Samples: [Checking account, Savings account, Checking account, None, Checking account]
- Column: Issue
- Samples: [Deposits and withdrawals, Account opening, closing, or management, Account opening, closing, or management, Billing disputes, Account opening, closing, or management]
- Column: Sub-issue
- Samples: [None, None, None, None, None]
- Column: Consumer complaint narrative
- Samples: [None, None, None, None, None]
- Column: Tags
- Samples: [None, None, None, None, None]
- Column: Consumer consent provided?
- Samples: [N/A, N/A, N/A, N/A, N/A]
- Column: Submitted via
- Samples: [Email, Email, Email, Email, Email]
- Column: Date sent to company
- Samples: [2014-07-09, 2012-04-13, 2012-04-03, 2012-03-14, 2012-03-06]
- Column: Company response to consumer
- Samples: [Closed with explanation, Closed with relief, Closed without relief, Closed with relief, Closed with relief]
- Column: Timely response?
- Samples: [Yes, Yes, Yes, Yes, Yes]
- Column: Consumer disputed?
- Samples: [No, No, No, No, No]
- Column: Complaint ID
- Samples: [CR0922485, CR0057298, CR0043811, CR0035411, CR0030939]
- Column: Client_ID
- Samples: [C00001925, C00003141, C00000297, C00004275, C00000900]
- Table: reviews
- Column: Date
- Samples: [2017-10-04, 2017-10-02, 2017-08-21, 2017-12-17, 2016-05-27]
- Column: Stars
- Samples: [5, 5, 5, 5, 5]
- Column: Reviews
- Samples: [Great job, Eagle National! Each person was professional and helped us ..., Matthew Richardson is professional and helpful. He helped us find the ..., We had a past experience with Eagle National Mortgage and would withou..., We have been dealing with Brad Thomka from the beginning of what start..., I can't express how grateful I am for the support that Zach provided t... (truncated)]
- Column: Product
- Samples: [Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage]
- Column: district_id
- Samples: [65, 66, 23, 55, 24]
| SELECT T1.Reviews FROM reviews AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T2.city = 'Jacksonville' AND T1.Date = '2017-07-22' |
|
Solve the following sql problem:
Which product received a review from Indianapolis on 2016/10/7?
Schema:
SCHEMA:
- Table: state
- Column: StateCode
- Samples: [AL, AR, AZ, CA, CO]
- Column: State
- Samples: [Alabama, Arkansas, Arizona, California, Colorado]
- Column: Region
- Samples: [South, South, West, West, West]
- Table: callcenterlogs
- Column: Date received
- Samples: [2017-03-27, 2017-03-27, 2017-03-27, 2017-03-23, 2017-03-22]
- Column: Complaint ID
- Samples: [CR2406263, CR2405641, CR2405629, CR2400594, CR2399607]
- Column: rand client
- Samples: [C00004587, C00003328, C00001685, C00001945, C00004303]
- Column: phonefinal
- Samples: [977-806-9726, 322-598-7152, 508-311-5237, 265-394-2727, 206-008-0460]
- Column: vru+line
- Samples: [AA0103, AA0205, AA0110, AA0113, AA0102]
- Column: call_id
- Samples: [34536, 34537, 34538, 34540, 34541]
- Column: priority
- Samples: [0, 0, 2, 2, 1]
- Column: type
- Samples: [NW, PS, PS, PS, PS]
- Column: outcome
- Samples: [AGENT, AGENT, AGENT, AGENT, AGENT]
- Column: server
- Samples: [MICHAL, TOVA, YIFAT, AVNI, STEREN]
- Column: ser_start
- Samples: [13:34:11, 10:58:22, 13:00:54, 16:18:21, 14:48:22]
- Column: ser_exit
- Samples: [13:40:23, 11:16:10, 13:13:31, 16:19:40, 14:55:19]
- Column: ser_time
- Samples: [00:06:12, 00:17:48, 00:12:37, 00:01:19, 00:06:57]
- Table: client
- Column: client_id
- Samples: [C00000001, C00000002, C00000003, C00000004, C00000005]
- Column: sex
- Samples: [Female, Male, Female, Male, Female]
- Column: day
- Samples: [13, 4, 9, 1, 3]
- Column: month
- Samples: [12, 2, 10, 12, 7]
- Column: year
- Samples: [1990, 1965, 1960, 1976, 1980]
- Column: age
- Samples: [29, 54, 59, 43, 39]
- Column: social
- Samples: [926-93-2157, 806-94-5725, 614-70-9100, 580-20-3414, 536-14-5809]
- Column: first
- Samples: [Emma, Noah, Olivia, Liam, Sophia]
- Column: middle
- Samples: [Avaya, Everest, Brooklynne, Irvin, Danae]
- Column: last
- Samples: [Smith, Thompson, Johnson, White, Williams]
- Column: phone
- Samples: [367-171-6840, 212-423-7734, 212-425-6932, 951-567-8925, 428-265-1568]
- Column: email
- Samples: [[email protected], [email protected], [email protected], [email protected], [email protected]]
- Column: address_1
- Samples: [387 Wellington Ave., 75 W. Berkshire St., 36 Second St., 7607 Sunnyslope Street, 755 Galvin Street]
- Column: address_2
- Samples: [Unit 1, None, None, None, None]
- Column: city
- Samples: [Albuquerque, New York City, New York City, Indianapolis, Indianapolis]
- Column: state
- Samples: [NM, NY, NY, IN, IN]
- Column: zipcode
- Samples: [47246, 10040, 10162, 49047, 40852]
- Column: district_id
- Samples: [18, 1, 1, 5, 5]
- Table: district
- Column: district_id
- Samples: [1, 2, 3, 4, 5]
- Column: city
- Samples: [New York City, Jacksonville, Columbus, Charlotte, Indianapolis]
- Column: state_abbrev
- Samples: [NY, FL, OH, NC, IN]
- Column: division
- Samples: [Middle Atlantic, South Atlantic, East North Central, South Atlantic, East North Central]
- Table: events
- Column: Date received
- Samples: [2014-07-03, 2012-04-12, 2012-04-03, 2012-03-14, 2012-03-05]
- Column: Product
- Samples: [Bank account or service, Bank account or service, Bank account or service, Credit card, Bank account or service]
- Column: Sub-product
- Samples: [Checking account, Savings account, Checking account, None, Checking account]
- Column: Issue
- Samples: [Deposits and withdrawals, Account opening, closing, or management, Account opening, closing, or management, Billing disputes, Account opening, closing, or management]
- Column: Sub-issue
- Samples: [None, None, None, None, None]
- Column: Consumer complaint narrative
- Samples: [None, None, None, None, None]
- Column: Tags
- Samples: [None, None, None, None, None]
- Column: Consumer consent provided?
- Samples: [N/A, N/A, N/A, N/A, N/A]
- Column: Submitted via
- Samples: [Email, Email, Email, Email, Email]
- Column: Date sent to company
- Samples: [2014-07-09, 2012-04-13, 2012-04-03, 2012-03-14, 2012-03-06]
- Column: Company response to consumer
- Samples: [Closed with explanation, Closed with relief, Closed without relief, Closed with relief, Closed with relief]
- Column: Timely response?
- Samples: [Yes, Yes, Yes, Yes, Yes]
- Column: Consumer disputed?
- Samples: [No, No, No, No, No]
- Column: Complaint ID
- Samples: [CR0922485, CR0057298, CR0043811, CR0035411, CR0030939]
- Column: Client_ID
- Samples: [C00001925, C00003141, C00000297, C00004275, C00000900]
- Table: reviews
- Column: Date
- Samples: [2017-10-04, 2017-10-02, 2017-08-21, 2017-12-17, 2016-05-27]
- Column: Stars
- Samples: [5, 5, 5, 5, 5]
- Column: Reviews
- Samples: [Great job, Eagle National! Each person was professional and helped us ..., Matthew Richardson is professional and helpful. He helped us find the ..., We had a past experience with Eagle National Mortgage and would withou..., We have been dealing with Brad Thomka from the beginning of what start..., I can't express how grateful I am for the support that Zach provided t... (truncated)]
- Column: Product
- Samples: [Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage]
- Column: district_id
- Samples: [65, 66, 23, 55, 24]
| SELECT T1.Product FROM reviews AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T2.city = 'Indianapolis' AND T1.Date = '2016-10-07' |
|
Solve the following sql problem:
How many stars did "Eagle Capital" received from Little Rock on 2013/4/4?
Schema:
SCHEMA:
- Table: state
- Column: StateCode
- Samples: [AL, AR, AZ, CA, CO]
- Column: State
- Samples: [Alabama, Arkansas, Arizona, California, Colorado]
- Column: Region
- Samples: [South, South, West, West, West]
- Table: callcenterlogs
- Column: Date received
- Samples: [2017-03-27, 2017-03-27, 2017-03-27, 2017-03-23, 2017-03-22]
- Column: Complaint ID
- Samples: [CR2406263, CR2405641, CR2405629, CR2400594, CR2399607]
- Column: rand client
- Samples: [C00004587, C00003328, C00001685, C00001945, C00004303]
- Column: phonefinal
- Samples: [977-806-9726, 322-598-7152, 508-311-5237, 265-394-2727, 206-008-0460]
- Column: vru+line
- Samples: [AA0103, AA0205, AA0110, AA0113, AA0102]
- Column: call_id
- Samples: [34536, 34537, 34538, 34540, 34541]
- Column: priority
- Samples: [0, 0, 2, 2, 1]
- Column: type
- Samples: [NW, PS, PS, PS, PS]
- Column: outcome
- Samples: [AGENT, AGENT, AGENT, AGENT, AGENT]
- Column: server
- Samples: [MICHAL, TOVA, YIFAT, AVNI, STEREN]
- Column: ser_start
- Samples: [13:34:11, 10:58:22, 13:00:54, 16:18:21, 14:48:22]
- Column: ser_exit
- Samples: [13:40:23, 11:16:10, 13:13:31, 16:19:40, 14:55:19]
- Column: ser_time
- Samples: [00:06:12, 00:17:48, 00:12:37, 00:01:19, 00:06:57]
- Table: client
- Column: client_id
- Samples: [C00000001, C00000002, C00000003, C00000004, C00000005]
- Column: sex
- Samples: [Female, Male, Female, Male, Female]
- Column: day
- Samples: [13, 4, 9, 1, 3]
- Column: month
- Samples: [12, 2, 10, 12, 7]
- Column: year
- Samples: [1990, 1965, 1960, 1976, 1980]
- Column: age
- Samples: [29, 54, 59, 43, 39]
- Column: social
- Samples: [926-93-2157, 806-94-5725, 614-70-9100, 580-20-3414, 536-14-5809]
- Column: first
- Samples: [Emma, Noah, Olivia, Liam, Sophia]
- Column: middle
- Samples: [Avaya, Everest, Brooklynne, Irvin, Danae]
- Column: last
- Samples: [Smith, Thompson, Johnson, White, Williams]
- Column: phone
- Samples: [367-171-6840, 212-423-7734, 212-425-6932, 951-567-8925, 428-265-1568]
- Column: email
- Samples: [[email protected], [email protected], [email protected], [email protected], [email protected]]
- Column: address_1
- Samples: [387 Wellington Ave., 75 W. Berkshire St., 36 Second St., 7607 Sunnyslope Street, 755 Galvin Street]
- Column: address_2
- Samples: [Unit 1, None, None, None, None]
- Column: city
- Samples: [Albuquerque, New York City, New York City, Indianapolis, Indianapolis]
- Column: state
- Samples: [NM, NY, NY, IN, IN]
- Column: zipcode
- Samples: [47246, 10040, 10162, 49047, 40852]
- Column: district_id
- Samples: [18, 1, 1, 5, 5]
- Table: district
- Column: district_id
- Samples: [1, 2, 3, 4, 5]
- Column: city
- Samples: [New York City, Jacksonville, Columbus, Charlotte, Indianapolis]
- Column: state_abbrev
- Samples: [NY, FL, OH, NC, IN]
- Column: division
- Samples: [Middle Atlantic, South Atlantic, East North Central, South Atlantic, East North Central]
- Table: events
- Column: Date received
- Samples: [2014-07-03, 2012-04-12, 2012-04-03, 2012-03-14, 2012-03-05]
- Column: Product
- Samples: [Bank account or service, Bank account or service, Bank account or service, Credit card, Bank account or service]
- Column: Sub-product
- Samples: [Checking account, Savings account, Checking account, None, Checking account]
- Column: Issue
- Samples: [Deposits and withdrawals, Account opening, closing, or management, Account opening, closing, or management, Billing disputes, Account opening, closing, or management]
- Column: Sub-issue
- Samples: [None, None, None, None, None]
- Column: Consumer complaint narrative
- Samples: [None, None, None, None, None]
- Column: Tags
- Samples: [None, None, None, None, None]
- Column: Consumer consent provided?
- Samples: [N/A, N/A, N/A, N/A, N/A]
- Column: Submitted via
- Samples: [Email, Email, Email, Email, Email]
- Column: Date sent to company
- Samples: [2014-07-09, 2012-04-13, 2012-04-03, 2012-03-14, 2012-03-06]
- Column: Company response to consumer
- Samples: [Closed with explanation, Closed with relief, Closed without relief, Closed with relief, Closed with relief]
- Column: Timely response?
- Samples: [Yes, Yes, Yes, Yes, Yes]
- Column: Consumer disputed?
- Samples: [No, No, No, No, No]
- Column: Complaint ID
- Samples: [CR0922485, CR0057298, CR0043811, CR0035411, CR0030939]
- Column: Client_ID
- Samples: [C00001925, C00003141, C00000297, C00004275, C00000900]
- Table: reviews
- Column: Date
- Samples: [2017-10-04, 2017-10-02, 2017-08-21, 2017-12-17, 2016-05-27]
- Column: Stars
- Samples: [5, 5, 5, 5, 5]
- Column: Reviews
- Samples: [Great job, Eagle National! Each person was professional and helped us ..., Matthew Richardson is professional and helpful. He helped us find the ..., We had a past experience with Eagle National Mortgage and would withou..., We have been dealing with Brad Thomka from the beginning of what start..., I can't express how grateful I am for the support that Zach provided t... (truncated)]
- Column: Product
- Samples: [Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage]
- Column: district_id
- Samples: [65, 66, 23, 55, 24]
| SELECT COUNT(T1.Stars) FROM reviews AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T1.Product = 'Eagle Capital' AND T2.city = 'Little Rock' AND T1.Date = '2013-04-04' |
|
Solve the following sql problem:
For the client who made the complaint call "CR0217298", what was his/her birthday?
Schema:
SCHEMA:
- Table: state
- Column: StateCode
- Samples: [AL, AR, AZ, CA, CO]
- Column: State
- Samples: [Alabama, Arkansas, Arizona, California, Colorado]
- Column: Region
- Samples: [South, South, West, West, West]
- Table: callcenterlogs
- Column: Date received
- Samples: [2017-03-27, 2017-03-27, 2017-03-27, 2017-03-23, 2017-03-22]
- Column: Complaint ID
- Samples: [CR2406263, CR2405641, CR2405629, CR2400594, CR2399607]
- Column: rand client
- Samples: [C00004587, C00003328, C00001685, C00001945, C00004303]
- Column: phonefinal
- Samples: [977-806-9726, 322-598-7152, 508-311-5237, 265-394-2727, 206-008-0460]
- Column: vru+line
- Samples: [AA0103, AA0205, AA0110, AA0113, AA0102]
- Column: call_id
- Samples: [34536, 34537, 34538, 34540, 34541]
- Column: priority
- Samples: [0, 0, 2, 2, 1]
- Column: type
- Samples: [NW, PS, PS, PS, PS]
- Column: outcome
- Samples: [AGENT, AGENT, AGENT, AGENT, AGENT]
- Column: server
- Samples: [MICHAL, TOVA, YIFAT, AVNI, STEREN]
- Column: ser_start
- Samples: [13:34:11, 10:58:22, 13:00:54, 16:18:21, 14:48:22]
- Column: ser_exit
- Samples: [13:40:23, 11:16:10, 13:13:31, 16:19:40, 14:55:19]
- Column: ser_time
- Samples: [00:06:12, 00:17:48, 00:12:37, 00:01:19, 00:06:57]
- Table: client
- Column: client_id
- Samples: [C00000001, C00000002, C00000003, C00000004, C00000005]
- Column: sex
- Samples: [Female, Male, Female, Male, Female]
- Column: day
- Samples: [13, 4, 9, 1, 3]
- Column: month
- Samples: [12, 2, 10, 12, 7]
- Column: year
- Samples: [1990, 1965, 1960, 1976, 1980]
- Column: age
- Samples: [29, 54, 59, 43, 39]
- Column: social
- Samples: [926-93-2157, 806-94-5725, 614-70-9100, 580-20-3414, 536-14-5809]
- Column: first
- Samples: [Emma, Noah, Olivia, Liam, Sophia]
- Column: middle
- Samples: [Avaya, Everest, Brooklynne, Irvin, Danae]
- Column: last
- Samples: [Smith, Thompson, Johnson, White, Williams]
- Column: phone
- Samples: [367-171-6840, 212-423-7734, 212-425-6932, 951-567-8925, 428-265-1568]
- Column: email
- Samples: [[email protected], [email protected], [email protected], [email protected], [email protected]]
- Column: address_1
- Samples: [387 Wellington Ave., 75 W. Berkshire St., 36 Second St., 7607 Sunnyslope Street, 755 Galvin Street]
- Column: address_2
- Samples: [Unit 1, None, None, None, None]
- Column: city
- Samples: [Albuquerque, New York City, New York City, Indianapolis, Indianapolis]
- Column: state
- Samples: [NM, NY, NY, IN, IN]
- Column: zipcode
- Samples: [47246, 10040, 10162, 49047, 40852]
- Column: district_id
- Samples: [18, 1, 1, 5, 5]
- Table: district
- Column: district_id
- Samples: [1, 2, 3, 4, 5]
- Column: city
- Samples: [New York City, Jacksonville, Columbus, Charlotte, Indianapolis]
- Column: state_abbrev
- Samples: [NY, FL, OH, NC, IN]
- Column: division
- Samples: [Middle Atlantic, South Atlantic, East North Central, South Atlantic, East North Central]
- Table: events
- Column: Date received
- Samples: [2014-07-03, 2012-04-12, 2012-04-03, 2012-03-14, 2012-03-05]
- Column: Product
- Samples: [Bank account or service, Bank account or service, Bank account or service, Credit card, Bank account or service]
- Column: Sub-product
- Samples: [Checking account, Savings account, Checking account, None, Checking account]
- Column: Issue
- Samples: [Deposits and withdrawals, Account opening, closing, or management, Account opening, closing, or management, Billing disputes, Account opening, closing, or management]
- Column: Sub-issue
- Samples: [None, None, None, None, None]
- Column: Consumer complaint narrative
- Samples: [None, None, None, None, None]
- Column: Tags
- Samples: [None, None, None, None, None]
- Column: Consumer consent provided?
- Samples: [N/A, N/A, N/A, N/A, N/A]
- Column: Submitted via
- Samples: [Email, Email, Email, Email, Email]
- Column: Date sent to company
- Samples: [2014-07-09, 2012-04-13, 2012-04-03, 2012-03-14, 2012-03-06]
- Column: Company response to consumer
- Samples: [Closed with explanation, Closed with relief, Closed without relief, Closed with relief, Closed with relief]
- Column: Timely response?
- Samples: [Yes, Yes, Yes, Yes, Yes]
- Column: Consumer disputed?
- Samples: [No, No, No, No, No]
- Column: Complaint ID
- Samples: [CR0922485, CR0057298, CR0043811, CR0035411, CR0030939]
- Column: Client_ID
- Samples: [C00001925, C00003141, C00000297, C00004275, C00000900]
- Table: reviews
- Column: Date
- Samples: [2017-10-04, 2017-10-02, 2017-08-21, 2017-12-17, 2016-05-27]
- Column: Stars
- Samples: [5, 5, 5, 5, 5]
- Column: Reviews
- Samples: [Great job, Eagle National! Each person was professional and helped us ..., Matthew Richardson is professional and helpful. He helped us find the ..., We had a past experience with Eagle National Mortgage and would withou..., We have been dealing with Brad Thomka from the beginning of what start..., I can't express how grateful I am for the support that Zach provided t... (truncated)]
- Column: Product
- Samples: [Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage]
- Column: district_id
- Samples: [65, 66, 23, 55, 24]
| SELECT T1.month, T1.day FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Complaint ID` = 'CR0217298' |
|
Solve the following sql problem:
What was the phone of number of the client who made the complaint call "CR0100432" ?
Schema:
SCHEMA:
- Table: state
- Column: StateCode
- Samples: [AL, AR, AZ, CA, CO]
- Column: State
- Samples: [Alabama, Arkansas, Arizona, California, Colorado]
- Column: Region
- Samples: [South, South, West, West, West]
- Table: callcenterlogs
- Column: Date received
- Samples: [2017-03-27, 2017-03-27, 2017-03-27, 2017-03-23, 2017-03-22]
- Column: Complaint ID
- Samples: [CR2406263, CR2405641, CR2405629, CR2400594, CR2399607]
- Column: rand client
- Samples: [C00004587, C00003328, C00001685, C00001945, C00004303]
- Column: phonefinal
- Samples: [977-806-9726, 322-598-7152, 508-311-5237, 265-394-2727, 206-008-0460]
- Column: vru+line
- Samples: [AA0103, AA0205, AA0110, AA0113, AA0102]
- Column: call_id
- Samples: [34536, 34537, 34538, 34540, 34541]
- Column: priority
- Samples: [0, 0, 2, 2, 1]
- Column: type
- Samples: [NW, PS, PS, PS, PS]
- Column: outcome
- Samples: [AGENT, AGENT, AGENT, AGENT, AGENT]
- Column: server
- Samples: [MICHAL, TOVA, YIFAT, AVNI, STEREN]
- Column: ser_start
- Samples: [13:34:11, 10:58:22, 13:00:54, 16:18:21, 14:48:22]
- Column: ser_exit
- Samples: [13:40:23, 11:16:10, 13:13:31, 16:19:40, 14:55:19]
- Column: ser_time
- Samples: [00:06:12, 00:17:48, 00:12:37, 00:01:19, 00:06:57]
- Table: client
- Column: client_id
- Samples: [C00000001, C00000002, C00000003, C00000004, C00000005]
- Column: sex
- Samples: [Female, Male, Female, Male, Female]
- Column: day
- Samples: [13, 4, 9, 1, 3]
- Column: month
- Samples: [12, 2, 10, 12, 7]
- Column: year
- Samples: [1990, 1965, 1960, 1976, 1980]
- Column: age
- Samples: [29, 54, 59, 43, 39]
- Column: social
- Samples: [926-93-2157, 806-94-5725, 614-70-9100, 580-20-3414, 536-14-5809]
- Column: first
- Samples: [Emma, Noah, Olivia, Liam, Sophia]
- Column: middle
- Samples: [Avaya, Everest, Brooklynne, Irvin, Danae]
- Column: last
- Samples: [Smith, Thompson, Johnson, White, Williams]
- Column: phone
- Samples: [367-171-6840, 212-423-7734, 212-425-6932, 951-567-8925, 428-265-1568]
- Column: email
- Samples: [[email protected], [email protected], [email protected], [email protected], [email protected]]
- Column: address_1
- Samples: [387 Wellington Ave., 75 W. Berkshire St., 36 Second St., 7607 Sunnyslope Street, 755 Galvin Street]
- Column: address_2
- Samples: [Unit 1, None, None, None, None]
- Column: city
- Samples: [Albuquerque, New York City, New York City, Indianapolis, Indianapolis]
- Column: state
- Samples: [NM, NY, NY, IN, IN]
- Column: zipcode
- Samples: [47246, 10040, 10162, 49047, 40852]
- Column: district_id
- Samples: [18, 1, 1, 5, 5]
- Table: district
- Column: district_id
- Samples: [1, 2, 3, 4, 5]
- Column: city
- Samples: [New York City, Jacksonville, Columbus, Charlotte, Indianapolis]
- Column: state_abbrev
- Samples: [NY, FL, OH, NC, IN]
- Column: division
- Samples: [Middle Atlantic, South Atlantic, East North Central, South Atlantic, East North Central]
- Table: events
- Column: Date received
- Samples: [2014-07-03, 2012-04-12, 2012-04-03, 2012-03-14, 2012-03-05]
- Column: Product
- Samples: [Bank account or service, Bank account or service, Bank account or service, Credit card, Bank account or service]
- Column: Sub-product
- Samples: [Checking account, Savings account, Checking account, None, Checking account]
- Column: Issue
- Samples: [Deposits and withdrawals, Account opening, closing, or management, Account opening, closing, or management, Billing disputes, Account opening, closing, or management]
- Column: Sub-issue
- Samples: [None, None, None, None, None]
- Column: Consumer complaint narrative
- Samples: [None, None, None, None, None]
- Column: Tags
- Samples: [None, None, None, None, None]
- Column: Consumer consent provided?
- Samples: [N/A, N/A, N/A, N/A, N/A]
- Column: Submitted via
- Samples: [Email, Email, Email, Email, Email]
- Column: Date sent to company
- Samples: [2014-07-09, 2012-04-13, 2012-04-03, 2012-03-14, 2012-03-06]
- Column: Company response to consumer
- Samples: [Closed with explanation, Closed with relief, Closed without relief, Closed with relief, Closed with relief]
- Column: Timely response?
- Samples: [Yes, Yes, Yes, Yes, Yes]
- Column: Consumer disputed?
- Samples: [No, No, No, No, No]
- Column: Complaint ID
- Samples: [CR0922485, CR0057298, CR0043811, CR0035411, CR0030939]
- Column: Client_ID
- Samples: [C00001925, C00003141, C00000297, C00004275, C00000900]
- Table: reviews
- Column: Date
- Samples: [2017-10-04, 2017-10-02, 2017-08-21, 2017-12-17, 2016-05-27]
- Column: Stars
- Samples: [5, 5, 5, 5, 5]
- Column: Reviews
- Samples: [Great job, Eagle National! Each person was professional and helped us ..., Matthew Richardson is professional and helpful. He helped us find the ..., We had a past experience with Eagle National Mortgage and would withou..., We have been dealing with Brad Thomka from the beginning of what start..., I can't express how grateful I am for the support that Zach provided t... (truncated)]
- Column: Product
- Samples: [Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage]
- Column: district_id
- Samples: [65, 66, 23, 55, 24]
| SELECT T1.phone FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Complaint ID` = 'CR0100432' |
|
Solve the following sql problem:
For all the complaint callers on 2017/3/27, what percentage of the clients are females?
Schema:
SCHEMA:
- Table: state
- Column: StateCode
- Samples: [AL, AR, AZ, CA, CO]
- Column: State
- Samples: [Alabama, Arkansas, Arizona, California, Colorado]
- Column: Region
- Samples: [South, South, West, West, West]
- Table: callcenterlogs
- Column: Date received
- Samples: [2017-03-27, 2017-03-27, 2017-03-27, 2017-03-23, 2017-03-22]
- Column: Complaint ID
- Samples: [CR2406263, CR2405641, CR2405629, CR2400594, CR2399607]
- Column: rand client
- Samples: [C00004587, C00003328, C00001685, C00001945, C00004303]
- Column: phonefinal
- Samples: [977-806-9726, 322-598-7152, 508-311-5237, 265-394-2727, 206-008-0460]
- Column: vru+line
- Samples: [AA0103, AA0205, AA0110, AA0113, AA0102]
- Column: call_id
- Samples: [34536, 34537, 34538, 34540, 34541]
- Column: priority
- Samples: [0, 0, 2, 2, 1]
- Column: type
- Samples: [NW, PS, PS, PS, PS]
- Column: outcome
- Samples: [AGENT, AGENT, AGENT, AGENT, AGENT]
- Column: server
- Samples: [MICHAL, TOVA, YIFAT, AVNI, STEREN]
- Column: ser_start
- Samples: [13:34:11, 10:58:22, 13:00:54, 16:18:21, 14:48:22]
- Column: ser_exit
- Samples: [13:40:23, 11:16:10, 13:13:31, 16:19:40, 14:55:19]
- Column: ser_time
- Samples: [00:06:12, 00:17:48, 00:12:37, 00:01:19, 00:06:57]
- Table: client
- Column: client_id
- Samples: [C00000001, C00000002, C00000003, C00000004, C00000005]
- Column: sex
- Samples: [Female, Male, Female, Male, Female]
- Column: day
- Samples: [13, 4, 9, 1, 3]
- Column: month
- Samples: [12, 2, 10, 12, 7]
- Column: year
- Samples: [1990, 1965, 1960, 1976, 1980]
- Column: age
- Samples: [29, 54, 59, 43, 39]
- Column: social
- Samples: [926-93-2157, 806-94-5725, 614-70-9100, 580-20-3414, 536-14-5809]
- Column: first
- Samples: [Emma, Noah, Olivia, Liam, Sophia]
- Column: middle
- Samples: [Avaya, Everest, Brooklynne, Irvin, Danae]
- Column: last
- Samples: [Smith, Thompson, Johnson, White, Williams]
- Column: phone
- Samples: [367-171-6840, 212-423-7734, 212-425-6932, 951-567-8925, 428-265-1568]
- Column: email
- Samples: [[email protected], [email protected], [email protected], [email protected], [email protected]]
- Column: address_1
- Samples: [387 Wellington Ave., 75 W. Berkshire St., 36 Second St., 7607 Sunnyslope Street, 755 Galvin Street]
- Column: address_2
- Samples: [Unit 1, None, None, None, None]
- Column: city
- Samples: [Albuquerque, New York City, New York City, Indianapolis, Indianapolis]
- Column: state
- Samples: [NM, NY, NY, IN, IN]
- Column: zipcode
- Samples: [47246, 10040, 10162, 49047, 40852]
- Column: district_id
- Samples: [18, 1, 1, 5, 5]
- Table: district
- Column: district_id
- Samples: [1, 2, 3, 4, 5]
- Column: city
- Samples: [New York City, Jacksonville, Columbus, Charlotte, Indianapolis]
- Column: state_abbrev
- Samples: [NY, FL, OH, NC, IN]
- Column: division
- Samples: [Middle Atlantic, South Atlantic, East North Central, South Atlantic, East North Central]
- Table: events
- Column: Date received
- Samples: [2014-07-03, 2012-04-12, 2012-04-03, 2012-03-14, 2012-03-05]
- Column: Product
- Samples: [Bank account or service, Bank account or service, Bank account or service, Credit card, Bank account or service]
- Column: Sub-product
- Samples: [Checking account, Savings account, Checking account, None, Checking account]
- Column: Issue
- Samples: [Deposits and withdrawals, Account opening, closing, or management, Account opening, closing, or management, Billing disputes, Account opening, closing, or management]
- Column: Sub-issue
- Samples: [None, None, None, None, None]
- Column: Consumer complaint narrative
- Samples: [None, None, None, None, None]
- Column: Tags
- Samples: [None, None, None, None, None]
- Column: Consumer consent provided?
- Samples: [N/A, N/A, N/A, N/A, N/A]
- Column: Submitted via
- Samples: [Email, Email, Email, Email, Email]
- Column: Date sent to company
- Samples: [2014-07-09, 2012-04-13, 2012-04-03, 2012-03-14, 2012-03-06]
- Column: Company response to consumer
- Samples: [Closed with explanation, Closed with relief, Closed without relief, Closed with relief, Closed with relief]
- Column: Timely response?
- Samples: [Yes, Yes, Yes, Yes, Yes]
- Column: Consumer disputed?
- Samples: [No, No, No, No, No]
- Column: Complaint ID
- Samples: [CR0922485, CR0057298, CR0043811, CR0035411, CR0030939]
- Column: Client_ID
- Samples: [C00001925, C00003141, C00000297, C00004275, C00000900]
- Table: reviews
- Column: Date
- Samples: [2017-10-04, 2017-10-02, 2017-08-21, 2017-12-17, 2016-05-27]
- Column: Stars
- Samples: [5, 5, 5, 5, 5]
- Column: Reviews
- Samples: [Great job, Eagle National! Each person was professional and helped us ..., Matthew Richardson is professional and helpful. He helped us find the ..., We had a past experience with Eagle National Mortgage and would withou..., We have been dealing with Brad Thomka from the beginning of what start..., I can't express how grateful I am for the support that Zach provided t... (truncated)]
- Column: Product
- Samples: [Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage]
- Column: district_id
- Samples: [65, 66, 23, 55, 24]
| 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 events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Date received` = '2017-03-27' |
|
Solve the following sql problem:
What is the percentage of the complaint calls from Mr Mason Javen Lopez has got the consent provided by the customer?
Schema:
SCHEMA:
- Table: state
- Column: StateCode
- Samples: [AL, AR, AZ, CA, CO]
- Column: State
- Samples: [Alabama, Arkansas, Arizona, California, Colorado]
- Column: Region
- Samples: [South, South, West, West, West]
- Table: callcenterlogs
- Column: Date received
- Samples: [2017-03-27, 2017-03-27, 2017-03-27, 2017-03-23, 2017-03-22]
- Column: Complaint ID
- Samples: [CR2406263, CR2405641, CR2405629, CR2400594, CR2399607]
- Column: rand client
- Samples: [C00004587, C00003328, C00001685, C00001945, C00004303]
- Column: phonefinal
- Samples: [977-806-9726, 322-598-7152, 508-311-5237, 265-394-2727, 206-008-0460]
- Column: vru+line
- Samples: [AA0103, AA0205, AA0110, AA0113, AA0102]
- Column: call_id
- Samples: [34536, 34537, 34538, 34540, 34541]
- Column: priority
- Samples: [0, 0, 2, 2, 1]
- Column: type
- Samples: [NW, PS, PS, PS, PS]
- Column: outcome
- Samples: [AGENT, AGENT, AGENT, AGENT, AGENT]
- Column: server
- Samples: [MICHAL, TOVA, YIFAT, AVNI, STEREN]
- Column: ser_start
- Samples: [13:34:11, 10:58:22, 13:00:54, 16:18:21, 14:48:22]
- Column: ser_exit
- Samples: [13:40:23, 11:16:10, 13:13:31, 16:19:40, 14:55:19]
- Column: ser_time
- Samples: [00:06:12, 00:17:48, 00:12:37, 00:01:19, 00:06:57]
- Table: client
- Column: client_id
- Samples: [C00000001, C00000002, C00000003, C00000004, C00000005]
- Column: sex
- Samples: [Female, Male, Female, Male, Female]
- Column: day
- Samples: [13, 4, 9, 1, 3]
- Column: month
- Samples: [12, 2, 10, 12, 7]
- Column: year
- Samples: [1990, 1965, 1960, 1976, 1980]
- Column: age
- Samples: [29, 54, 59, 43, 39]
- Column: social
- Samples: [926-93-2157, 806-94-5725, 614-70-9100, 580-20-3414, 536-14-5809]
- Column: first
- Samples: [Emma, Noah, Olivia, Liam, Sophia]
- Column: middle
- Samples: [Avaya, Everest, Brooklynne, Irvin, Danae]
- Column: last
- Samples: [Smith, Thompson, Johnson, White, Williams]
- Column: phone
- Samples: [367-171-6840, 212-423-7734, 212-425-6932, 951-567-8925, 428-265-1568]
- Column: email
- Samples: [[email protected], [email protected], [email protected], [email protected], [email protected]]
- Column: address_1
- Samples: [387 Wellington Ave., 75 W. Berkshire St., 36 Second St., 7607 Sunnyslope Street, 755 Galvin Street]
- Column: address_2
- Samples: [Unit 1, None, None, None, None]
- Column: city
- Samples: [Albuquerque, New York City, New York City, Indianapolis, Indianapolis]
- Column: state
- Samples: [NM, NY, NY, IN, IN]
- Column: zipcode
- Samples: [47246, 10040, 10162, 49047, 40852]
- Column: district_id
- Samples: [18, 1, 1, 5, 5]
- Table: district
- Column: district_id
- Samples: [1, 2, 3, 4, 5]
- Column: city
- Samples: [New York City, Jacksonville, Columbus, Charlotte, Indianapolis]
- Column: state_abbrev
- Samples: [NY, FL, OH, NC, IN]
- Column: division
- Samples: [Middle Atlantic, South Atlantic, East North Central, South Atlantic, East North Central]
- Table: events
- Column: Date received
- Samples: [2014-07-03, 2012-04-12, 2012-04-03, 2012-03-14, 2012-03-05]
- Column: Product
- Samples: [Bank account or service, Bank account or service, Bank account or service, Credit card, Bank account or service]
- Column: Sub-product
- Samples: [Checking account, Savings account, Checking account, None, Checking account]
- Column: Issue
- Samples: [Deposits and withdrawals, Account opening, closing, or management, Account opening, closing, or management, Billing disputes, Account opening, closing, or management]
- Column: Sub-issue
- Samples: [None, None, None, None, None]
- Column: Consumer complaint narrative
- Samples: [None, None, None, None, None]
- Column: Tags
- Samples: [None, None, None, None, None]
- Column: Consumer consent provided?
- Samples: [N/A, N/A, N/A, N/A, N/A]
- Column: Submitted via
- Samples: [Email, Email, Email, Email, Email]
- Column: Date sent to company
- Samples: [2014-07-09, 2012-04-13, 2012-04-03, 2012-03-14, 2012-03-06]
- Column: Company response to consumer
- Samples: [Closed with explanation, Closed with relief, Closed without relief, Closed with relief, Closed with relief]
- Column: Timely response?
- Samples: [Yes, Yes, Yes, Yes, Yes]
- Column: Consumer disputed?
- Samples: [No, No, No, No, No]
- Column: Complaint ID
- Samples: [CR0922485, CR0057298, CR0043811, CR0035411, CR0030939]
- Column: Client_ID
- Samples: [C00001925, C00003141, C00000297, C00004275, C00000900]
- Table: reviews
- Column: Date
- Samples: [2017-10-04, 2017-10-02, 2017-08-21, 2017-12-17, 2016-05-27]
- Column: Stars
- Samples: [5, 5, 5, 5, 5]
- Column: Reviews
- Samples: [Great job, Eagle National! Each person was professional and helped us ..., Matthew Richardson is professional and helpful. He helped us find the ..., We had a past experience with Eagle National Mortgage and would withou..., We have been dealing with Brad Thomka from the beginning of what start..., I can't express how grateful I am for the support that Zach provided t... (truncated)]
- Column: Product
- Samples: [Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage]
- Column: district_id
- Samples: [65, 66, 23, 55, 24]
| SELECT CAST(SUM(CASE WHEN T2.`Consumer consent provided?` = 'Consent provided' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.`Consumer consent provided?`) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T1.sex = 'Male' AND T1.first = 'Mason' AND T1.middle = 'Javen' AND T1.last = 'Lopez' |
|
Solve the following sql problem:
How many priority urgent complaints were received in march of 2017? List the complaint ID of these complaints.
Schema:
SCHEMA:
- Table: state
- Column: StateCode
- Samples: [AL, AR, AZ, CA, CO]
- Column: State
- Samples: [Alabama, Arkansas, Arizona, California, Colorado]
- Column: Region
- Samples: [South, South, West, West, West]
- Table: callcenterlogs
- Column: Date received
- Samples: [2017-03-27, 2017-03-27, 2017-03-27, 2017-03-23, 2017-03-22]
- Column: Complaint ID
- Samples: [CR2406263, CR2405641, CR2405629, CR2400594, CR2399607]
- Column: rand client
- Samples: [C00004587, C00003328, C00001685, C00001945, C00004303]
- Column: phonefinal
- Samples: [977-806-9726, 322-598-7152, 508-311-5237, 265-394-2727, 206-008-0460]
- Column: vru+line
- Samples: [AA0103, AA0205, AA0110, AA0113, AA0102]
- Column: call_id
- Samples: [34536, 34537, 34538, 34540, 34541]
- Column: priority
- Samples: [0, 0, 2, 2, 1]
- Column: type
- Samples: [NW, PS, PS, PS, PS]
- Column: outcome
- Samples: [AGENT, AGENT, AGENT, AGENT, AGENT]
- Column: server
- Samples: [MICHAL, TOVA, YIFAT, AVNI, STEREN]
- Column: ser_start
- Samples: [13:34:11, 10:58:22, 13:00:54, 16:18:21, 14:48:22]
- Column: ser_exit
- Samples: [13:40:23, 11:16:10, 13:13:31, 16:19:40, 14:55:19]
- Column: ser_time
- Samples: [00:06:12, 00:17:48, 00:12:37, 00:01:19, 00:06:57]
- Table: client
- Column: client_id
- Samples: [C00000001, C00000002, C00000003, C00000004, C00000005]
- Column: sex
- Samples: [Female, Male, Female, Male, Female]
- Column: day
- Samples: [13, 4, 9, 1, 3]
- Column: month
- Samples: [12, 2, 10, 12, 7]
- Column: year
- Samples: [1990, 1965, 1960, 1976, 1980]
- Column: age
- Samples: [29, 54, 59, 43, 39]
- Column: social
- Samples: [926-93-2157, 806-94-5725, 614-70-9100, 580-20-3414, 536-14-5809]
- Column: first
- Samples: [Emma, Noah, Olivia, Liam, Sophia]
- Column: middle
- Samples: [Avaya, Everest, Brooklynne, Irvin, Danae]
- Column: last
- Samples: [Smith, Thompson, Johnson, White, Williams]
- Column: phone
- Samples: [367-171-6840, 212-423-7734, 212-425-6932, 951-567-8925, 428-265-1568]
- Column: email
- Samples: [[email protected], [email protected], [email protected], [email protected], [email protected]]
- Column: address_1
- Samples: [387 Wellington Ave., 75 W. Berkshire St., 36 Second St., 7607 Sunnyslope Street, 755 Galvin Street]
- Column: address_2
- Samples: [Unit 1, None, None, None, None]
- Column: city
- Samples: [Albuquerque, New York City, New York City, Indianapolis, Indianapolis]
- Column: state
- Samples: [NM, NY, NY, IN, IN]
- Column: zipcode
- Samples: [47246, 10040, 10162, 49047, 40852]
- Column: district_id
- Samples: [18, 1, 1, 5, 5]
- Table: district
- Column: district_id
- Samples: [1, 2, 3, 4, 5]
- Column: city
- Samples: [New York City, Jacksonville, Columbus, Charlotte, Indianapolis]
- Column: state_abbrev
- Samples: [NY, FL, OH, NC, IN]
- Column: division
- Samples: [Middle Atlantic, South Atlantic, East North Central, South Atlantic, East North Central]
- Table: events
- Column: Date received
- Samples: [2014-07-03, 2012-04-12, 2012-04-03, 2012-03-14, 2012-03-05]
- Column: Product
- Samples: [Bank account or service, Bank account or service, Bank account or service, Credit card, Bank account or service]
- Column: Sub-product
- Samples: [Checking account, Savings account, Checking account, None, Checking account]
- Column: Issue
- Samples: [Deposits and withdrawals, Account opening, closing, or management, Account opening, closing, or management, Billing disputes, Account opening, closing, or management]
- Column: Sub-issue
- Samples: [None, None, None, None, None]
- Column: Consumer complaint narrative
- Samples: [None, None, None, None, None]
- Column: Tags
- Samples: [None, None, None, None, None]
- Column: Consumer consent provided?
- Samples: [N/A, N/A, N/A, N/A, N/A]
- Column: Submitted via
- Samples: [Email, Email, Email, Email, Email]
- Column: Date sent to company
- Samples: [2014-07-09, 2012-04-13, 2012-04-03, 2012-03-14, 2012-03-06]
- Column: Company response to consumer
- Samples: [Closed with explanation, Closed with relief, Closed without relief, Closed with relief, Closed with relief]
- Column: Timely response?
- Samples: [Yes, Yes, Yes, Yes, Yes]
- Column: Consumer disputed?
- Samples: [No, No, No, No, No]
- Column: Complaint ID
- Samples: [CR0922485, CR0057298, CR0043811, CR0035411, CR0030939]
- Column: Client_ID
- Samples: [C00001925, C00003141, C00000297, C00004275, C00000900]
- Table: reviews
- Column: Date
- Samples: [2017-10-04, 2017-10-02, 2017-08-21, 2017-12-17, 2016-05-27]
- Column: Stars
- Samples: [5, 5, 5, 5, 5]
- Column: Reviews
- Samples: [Great job, Eagle National! Each person was professional and helped us ..., Matthew Richardson is professional and helpful. He helped us find the ..., We had a past experience with Eagle National Mortgage and would withou..., We have been dealing with Brad Thomka from the beginning of what start..., I can't express how grateful I am for the support that Zach provided t... (truncated)]
- Column: Product
- Samples: [Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage]
- Column: district_id
- Samples: [65, 66, 23, 55, 24]
| SELECT COUNT(`Complaint ID`) FROM callcenterlogs WHERE `Date received` LIKE '2017-01%' AND priority = ( SELECT MAX(priority) FROM callcenterlogs ) |
|
Solve the following sql problem:
Please list the full name, date of birth, and email id of the elderly clients in descending order of age.
Schema:
SCHEMA:
- Table: state
- Column: StateCode
- Samples: [AL, AR, AZ, CA, CO]
- Column: State
- Samples: [Alabama, Arkansas, Arizona, California, Colorado]
- Column: Region
- Samples: [South, South, West, West, West]
- Table: callcenterlogs
- Column: Date received
- Samples: [2017-03-27, 2017-03-27, 2017-03-27, 2017-03-23, 2017-03-22]
- Column: Complaint ID
- Samples: [CR2406263, CR2405641, CR2405629, CR2400594, CR2399607]
- Column: rand client
- Samples: [C00004587, C00003328, C00001685, C00001945, C00004303]
- Column: phonefinal
- Samples: [977-806-9726, 322-598-7152, 508-311-5237, 265-394-2727, 206-008-0460]
- Column: vru+line
- Samples: [AA0103, AA0205, AA0110, AA0113, AA0102]
- Column: call_id
- Samples: [34536, 34537, 34538, 34540, 34541]
- Column: priority
- Samples: [0, 0, 2, 2, 1]
- Column: type
- Samples: [NW, PS, PS, PS, PS]
- Column: outcome
- Samples: [AGENT, AGENT, AGENT, AGENT, AGENT]
- Column: server
- Samples: [MICHAL, TOVA, YIFAT, AVNI, STEREN]
- Column: ser_start
- Samples: [13:34:11, 10:58:22, 13:00:54, 16:18:21, 14:48:22]
- Column: ser_exit
- Samples: [13:40:23, 11:16:10, 13:13:31, 16:19:40, 14:55:19]
- Column: ser_time
- Samples: [00:06:12, 00:17:48, 00:12:37, 00:01:19, 00:06:57]
- Table: client
- Column: client_id
- Samples: [C00000001, C00000002, C00000003, C00000004, C00000005]
- Column: sex
- Samples: [Female, Male, Female, Male, Female]
- Column: day
- Samples: [13, 4, 9, 1, 3]
- Column: month
- Samples: [12, 2, 10, 12, 7]
- Column: year
- Samples: [1990, 1965, 1960, 1976, 1980]
- Column: age
- Samples: [29, 54, 59, 43, 39]
- Column: social
- Samples: [926-93-2157, 806-94-5725, 614-70-9100, 580-20-3414, 536-14-5809]
- Column: first
- Samples: [Emma, Noah, Olivia, Liam, Sophia]
- Column: middle
- Samples: [Avaya, Everest, Brooklynne, Irvin, Danae]
- Column: last
- Samples: [Smith, Thompson, Johnson, White, Williams]
- Column: phone
- Samples: [367-171-6840, 212-423-7734, 212-425-6932, 951-567-8925, 428-265-1568]
- Column: email
- Samples: [[email protected], [email protected], [email protected], [email protected], [email protected]]
- Column: address_1
- Samples: [387 Wellington Ave., 75 W. Berkshire St., 36 Second St., 7607 Sunnyslope Street, 755 Galvin Street]
- Column: address_2
- Samples: [Unit 1, None, None, None, None]
- Column: city
- Samples: [Albuquerque, New York City, New York City, Indianapolis, Indianapolis]
- Column: state
- Samples: [NM, NY, NY, IN, IN]
- Column: zipcode
- Samples: [47246, 10040, 10162, 49047, 40852]
- Column: district_id
- Samples: [18, 1, 1, 5, 5]
- Table: district
- Column: district_id
- Samples: [1, 2, 3, 4, 5]
- Column: city
- Samples: [New York City, Jacksonville, Columbus, Charlotte, Indianapolis]
- Column: state_abbrev
- Samples: [NY, FL, OH, NC, IN]
- Column: division
- Samples: [Middle Atlantic, South Atlantic, East North Central, South Atlantic, East North Central]
- Table: events
- Column: Date received
- Samples: [2014-07-03, 2012-04-12, 2012-04-03, 2012-03-14, 2012-03-05]
- Column: Product
- Samples: [Bank account or service, Bank account or service, Bank account or service, Credit card, Bank account or service]
- Column: Sub-product
- Samples: [Checking account, Savings account, Checking account, None, Checking account]
- Column: Issue
- Samples: [Deposits and withdrawals, Account opening, closing, or management, Account opening, closing, or management, Billing disputes, Account opening, closing, or management]
- Column: Sub-issue
- Samples: [None, None, None, None, None]
- Column: Consumer complaint narrative
- Samples: [None, None, None, None, None]
- Column: Tags
- Samples: [None, None, None, None, None]
- Column: Consumer consent provided?
- Samples: [N/A, N/A, N/A, N/A, N/A]
- Column: Submitted via
- Samples: [Email, Email, Email, Email, Email]
- Column: Date sent to company
- Samples: [2014-07-09, 2012-04-13, 2012-04-03, 2012-03-14, 2012-03-06]
- Column: Company response to consumer
- Samples: [Closed with explanation, Closed with relief, Closed without relief, Closed with relief, Closed with relief]
- Column: Timely response?
- Samples: [Yes, Yes, Yes, Yes, Yes]
- Column: Consumer disputed?
- Samples: [No, No, No, No, No]
- Column: Complaint ID
- Samples: [CR0922485, CR0057298, CR0043811, CR0035411, CR0030939]
- Column: Client_ID
- Samples: [C00001925, C00003141, C00000297, C00004275, C00000900]
- Table: reviews
- Column: Date
- Samples: [2017-10-04, 2017-10-02, 2017-08-21, 2017-12-17, 2016-05-27]
- Column: Stars
- Samples: [5, 5, 5, 5, 5]
- Column: Reviews
- Samples: [Great job, Eagle National! Each person was professional and helped us ..., Matthew Richardson is professional and helpful. He helped us find the ..., We had a past experience with Eagle National Mortgage and would withou..., We have been dealing with Brad Thomka from the beginning of what start..., I can't express how grateful I am for the support that Zach provided t... (truncated)]
- Column: Product
- Samples: [Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage]
- Column: district_id
- Samples: [65, 66, 23, 55, 24]
| SELECT first, middle, last, year, month , day, email FROM client WHERE age > 65 ORDER BY age DESC |
|
Solve the following sql problem:
Which product got the most five stars, and how many?
Schema:
SCHEMA:
- Table: state
- Column: StateCode
- Samples: [AL, AR, AZ, CA, CO]
- Column: State
- Samples: [Alabama, Arkansas, Arizona, California, Colorado]
- Column: Region
- Samples: [South, South, West, West, West]
- Table: callcenterlogs
- Column: Date received
- Samples: [2017-03-27, 2017-03-27, 2017-03-27, 2017-03-23, 2017-03-22]
- Column: Complaint ID
- Samples: [CR2406263, CR2405641, CR2405629, CR2400594, CR2399607]
- Column: rand client
- Samples: [C00004587, C00003328, C00001685, C00001945, C00004303]
- Column: phonefinal
- Samples: [977-806-9726, 322-598-7152, 508-311-5237, 265-394-2727, 206-008-0460]
- Column: vru+line
- Samples: [AA0103, AA0205, AA0110, AA0113, AA0102]
- Column: call_id
- Samples: [34536, 34537, 34538, 34540, 34541]
- Column: priority
- Samples: [0, 0, 2, 2, 1]
- Column: type
- Samples: [NW, PS, PS, PS, PS]
- Column: outcome
- Samples: [AGENT, AGENT, AGENT, AGENT, AGENT]
- Column: server
- Samples: [MICHAL, TOVA, YIFAT, AVNI, STEREN]
- Column: ser_start
- Samples: [13:34:11, 10:58:22, 13:00:54, 16:18:21, 14:48:22]
- Column: ser_exit
- Samples: [13:40:23, 11:16:10, 13:13:31, 16:19:40, 14:55:19]
- Column: ser_time
- Samples: [00:06:12, 00:17:48, 00:12:37, 00:01:19, 00:06:57]
- Table: client
- Column: client_id
- Samples: [C00000001, C00000002, C00000003, C00000004, C00000005]
- Column: sex
- Samples: [Female, Male, Female, Male, Female]
- Column: day
- Samples: [13, 4, 9, 1, 3]
- Column: month
- Samples: [12, 2, 10, 12, 7]
- Column: year
- Samples: [1990, 1965, 1960, 1976, 1980]
- Column: age
- Samples: [29, 54, 59, 43, 39]
- Column: social
- Samples: [926-93-2157, 806-94-5725, 614-70-9100, 580-20-3414, 536-14-5809]
- Column: first
- Samples: [Emma, Noah, Olivia, Liam, Sophia]
- Column: middle
- Samples: [Avaya, Everest, Brooklynne, Irvin, Danae]
- Column: last
- Samples: [Smith, Thompson, Johnson, White, Williams]
- Column: phone
- Samples: [367-171-6840, 212-423-7734, 212-425-6932, 951-567-8925, 428-265-1568]
- Column: email
- Samples: [[email protected], [email protected], [email protected], [email protected], [email protected]]
- Column: address_1
- Samples: [387 Wellington Ave., 75 W. Berkshire St., 36 Second St., 7607 Sunnyslope Street, 755 Galvin Street]
- Column: address_2
- Samples: [Unit 1, None, None, None, None]
- Column: city
- Samples: [Albuquerque, New York City, New York City, Indianapolis, Indianapolis]
- Column: state
- Samples: [NM, NY, NY, IN, IN]
- Column: zipcode
- Samples: [47246, 10040, 10162, 49047, 40852]
- Column: district_id
- Samples: [18, 1, 1, 5, 5]
- Table: district
- Column: district_id
- Samples: [1, 2, 3, 4, 5]
- Column: city
- Samples: [New York City, Jacksonville, Columbus, Charlotte, Indianapolis]
- Column: state_abbrev
- Samples: [NY, FL, OH, NC, IN]
- Column: division
- Samples: [Middle Atlantic, South Atlantic, East North Central, South Atlantic, East North Central]
- Table: events
- Column: Date received
- Samples: [2014-07-03, 2012-04-12, 2012-04-03, 2012-03-14, 2012-03-05]
- Column: Product
- Samples: [Bank account or service, Bank account or service, Bank account or service, Credit card, Bank account or service]
- Column: Sub-product
- Samples: [Checking account, Savings account, Checking account, None, Checking account]
- Column: Issue
- Samples: [Deposits and withdrawals, Account opening, closing, or management, Account opening, closing, or management, Billing disputes, Account opening, closing, or management]
- Column: Sub-issue
- Samples: [None, None, None, None, None]
- Column: Consumer complaint narrative
- Samples: [None, None, None, None, None]
- Column: Tags
- Samples: [None, None, None, None, None]
- Column: Consumer consent provided?
- Samples: [N/A, N/A, N/A, N/A, N/A]
- Column: Submitted via
- Samples: [Email, Email, Email, Email, Email]
- Column: Date sent to company
- Samples: [2014-07-09, 2012-04-13, 2012-04-03, 2012-03-14, 2012-03-06]
- Column: Company response to consumer
- Samples: [Closed with explanation, Closed with relief, Closed without relief, Closed with relief, Closed with relief]
- Column: Timely response?
- Samples: [Yes, Yes, Yes, Yes, Yes]
- Column: Consumer disputed?
- Samples: [No, No, No, No, No]
- Column: Complaint ID
- Samples: [CR0922485, CR0057298, CR0043811, CR0035411, CR0030939]
- Column: Client_ID
- Samples: [C00001925, C00003141, C00000297, C00004275, C00000900]
- Table: reviews
- Column: Date
- Samples: [2017-10-04, 2017-10-02, 2017-08-21, 2017-12-17, 2016-05-27]
- Column: Stars
- Samples: [5, 5, 5, 5, 5]
- Column: Reviews
- Samples: [Great job, Eagle National! Each person was professional and helped us ..., Matthew Richardson is professional and helpful. He helped us find the ..., We had a past experience with Eagle National Mortgage and would withou..., We have been dealing with Brad Thomka from the beginning of what start..., I can't express how grateful I am for the support that Zach provided t... (truncated)]
- Column: Product
- Samples: [Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage]
- Column: district_id
- Samples: [65, 66, 23, 55, 24]
| SELECT T.Product, MAX(T.num) FROM ( SELECT Product, COUNT(Stars) AS num FROM reviews WHERE Stars = 5 GROUP BY Product ) T |
|
Solve the following sql problem:
List all the states in the South region.
Schema:
SCHEMA:
- Table: state
- Column: StateCode
- Samples: [AL, AR, AZ, CA, CO]
- Column: State
- Samples: [Alabama, Arkansas, Arizona, California, Colorado]
- Column: Region
- Samples: [South, South, West, West, West]
- Table: callcenterlogs
- Column: Date received
- Samples: [2017-03-27, 2017-03-27, 2017-03-27, 2017-03-23, 2017-03-22]
- Column: Complaint ID
- Samples: [CR2406263, CR2405641, CR2405629, CR2400594, CR2399607]
- Column: rand client
- Samples: [C00004587, C00003328, C00001685, C00001945, C00004303]
- Column: phonefinal
- Samples: [977-806-9726, 322-598-7152, 508-311-5237, 265-394-2727, 206-008-0460]
- Column: vru+line
- Samples: [AA0103, AA0205, AA0110, AA0113, AA0102]
- Column: call_id
- Samples: [34536, 34537, 34538, 34540, 34541]
- Column: priority
- Samples: [0, 0, 2, 2, 1]
- Column: type
- Samples: [NW, PS, PS, PS, PS]
- Column: outcome
- Samples: [AGENT, AGENT, AGENT, AGENT, AGENT]
- Column: server
- Samples: [MICHAL, TOVA, YIFAT, AVNI, STEREN]
- Column: ser_start
- Samples: [13:34:11, 10:58:22, 13:00:54, 16:18:21, 14:48:22]
- Column: ser_exit
- Samples: [13:40:23, 11:16:10, 13:13:31, 16:19:40, 14:55:19]
- Column: ser_time
- Samples: [00:06:12, 00:17:48, 00:12:37, 00:01:19, 00:06:57]
- Table: client
- Column: client_id
- Samples: [C00000001, C00000002, C00000003, C00000004, C00000005]
- Column: sex
- Samples: [Female, Male, Female, Male, Female]
- Column: day
- Samples: [13, 4, 9, 1, 3]
- Column: month
- Samples: [12, 2, 10, 12, 7]
- Column: year
- Samples: [1990, 1965, 1960, 1976, 1980]
- Column: age
- Samples: [29, 54, 59, 43, 39]
- Column: social
- Samples: [926-93-2157, 806-94-5725, 614-70-9100, 580-20-3414, 536-14-5809]
- Column: first
- Samples: [Emma, Noah, Olivia, Liam, Sophia]
- Column: middle
- Samples: [Avaya, Everest, Brooklynne, Irvin, Danae]
- Column: last
- Samples: [Smith, Thompson, Johnson, White, Williams]
- Column: phone
- Samples: [367-171-6840, 212-423-7734, 212-425-6932, 951-567-8925, 428-265-1568]
- Column: email
- Samples: [[email protected], [email protected], [email protected], [email protected], [email protected]]
- Column: address_1
- Samples: [387 Wellington Ave., 75 W. Berkshire St., 36 Second St., 7607 Sunnyslope Street, 755 Galvin Street]
- Column: address_2
- Samples: [Unit 1, None, None, None, None]
- Column: city
- Samples: [Albuquerque, New York City, New York City, Indianapolis, Indianapolis]
- Column: state
- Samples: [NM, NY, NY, IN, IN]
- Column: zipcode
- Samples: [47246, 10040, 10162, 49047, 40852]
- Column: district_id
- Samples: [18, 1, 1, 5, 5]
- Table: district
- Column: district_id
- Samples: [1, 2, 3, 4, 5]
- Column: city
- Samples: [New York City, Jacksonville, Columbus, Charlotte, Indianapolis]
- Column: state_abbrev
- Samples: [NY, FL, OH, NC, IN]
- Column: division
- Samples: [Middle Atlantic, South Atlantic, East North Central, South Atlantic, East North Central]
- Table: events
- Column: Date received
- Samples: [2014-07-03, 2012-04-12, 2012-04-03, 2012-03-14, 2012-03-05]
- Column: Product
- Samples: [Bank account or service, Bank account or service, Bank account or service, Credit card, Bank account or service]
- Column: Sub-product
- Samples: [Checking account, Savings account, Checking account, None, Checking account]
- Column: Issue
- Samples: [Deposits and withdrawals, Account opening, closing, or management, Account opening, closing, or management, Billing disputes, Account opening, closing, or management]
- Column: Sub-issue
- Samples: [None, None, None, None, None]
- Column: Consumer complaint narrative
- Samples: [None, None, None, None, None]
- Column: Tags
- Samples: [None, None, None, None, None]
- Column: Consumer consent provided?
- Samples: [N/A, N/A, N/A, N/A, N/A]
- Column: Submitted via
- Samples: [Email, Email, Email, Email, Email]
- Column: Date sent to company
- Samples: [2014-07-09, 2012-04-13, 2012-04-03, 2012-03-14, 2012-03-06]
- Column: Company response to consumer
- Samples: [Closed with explanation, Closed with relief, Closed without relief, Closed with relief, Closed with relief]
- Column: Timely response?
- Samples: [Yes, Yes, Yes, Yes, Yes]
- Column: Consumer disputed?
- Samples: [No, No, No, No, No]
- Column: Complaint ID
- Samples: [CR0922485, CR0057298, CR0043811, CR0035411, CR0030939]
- Column: Client_ID
- Samples: [C00001925, C00003141, C00000297, C00004275, C00000900]
- Table: reviews
- Column: Date
- Samples: [2017-10-04, 2017-10-02, 2017-08-21, 2017-12-17, 2016-05-27]
- Column: Stars
- Samples: [5, 5, 5, 5, 5]
- Column: Reviews
- Samples: [Great job, Eagle National! Each person was professional and helped us ..., Matthew Richardson is professional and helpful. He helped us find the ..., We had a past experience with Eagle National Mortgage and would withou..., We have been dealing with Brad Thomka from the beginning of what start..., I can't express how grateful I am for the support that Zach provided t... (truncated)]
- Column: Product
- Samples: [Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage]
- Column: district_id
- Samples: [65, 66, 23, 55, 24]
| SELECT state FROM state WHERE Region = 'South' |
|
Solve the following sql problem:
What is the email id of clients whose calls were hung?
Schema:
SCHEMA:
- Table: state
- Column: StateCode
- Samples: [AL, AR, AZ, CA, CO]
- Column: State
- Samples: [Alabama, Arkansas, Arizona, California, Colorado]
- Column: Region
- Samples: [South, South, West, West, West]
- Table: callcenterlogs
- Column: Date received
- Samples: [2017-03-27, 2017-03-27, 2017-03-27, 2017-03-23, 2017-03-22]
- Column: Complaint ID
- Samples: [CR2406263, CR2405641, CR2405629, CR2400594, CR2399607]
- Column: rand client
- Samples: [C00004587, C00003328, C00001685, C00001945, C00004303]
- Column: phonefinal
- Samples: [977-806-9726, 322-598-7152, 508-311-5237, 265-394-2727, 206-008-0460]
- Column: vru+line
- Samples: [AA0103, AA0205, AA0110, AA0113, AA0102]
- Column: call_id
- Samples: [34536, 34537, 34538, 34540, 34541]
- Column: priority
- Samples: [0, 0, 2, 2, 1]
- Column: type
- Samples: [NW, PS, PS, PS, PS]
- Column: outcome
- Samples: [AGENT, AGENT, AGENT, AGENT, AGENT]
- Column: server
- Samples: [MICHAL, TOVA, YIFAT, AVNI, STEREN]
- Column: ser_start
- Samples: [13:34:11, 10:58:22, 13:00:54, 16:18:21, 14:48:22]
- Column: ser_exit
- Samples: [13:40:23, 11:16:10, 13:13:31, 16:19:40, 14:55:19]
- Column: ser_time
- Samples: [00:06:12, 00:17:48, 00:12:37, 00:01:19, 00:06:57]
- Table: client
- Column: client_id
- Samples: [C00000001, C00000002, C00000003, C00000004, C00000005]
- Column: sex
- Samples: [Female, Male, Female, Male, Female]
- Column: day
- Samples: [13, 4, 9, 1, 3]
- Column: month
- Samples: [12, 2, 10, 12, 7]
- Column: year
- Samples: [1990, 1965, 1960, 1976, 1980]
- Column: age
- Samples: [29, 54, 59, 43, 39]
- Column: social
- Samples: [926-93-2157, 806-94-5725, 614-70-9100, 580-20-3414, 536-14-5809]
- Column: first
- Samples: [Emma, Noah, Olivia, Liam, Sophia]
- Column: middle
- Samples: [Avaya, Everest, Brooklynne, Irvin, Danae]
- Column: last
- Samples: [Smith, Thompson, Johnson, White, Williams]
- Column: phone
- Samples: [367-171-6840, 212-423-7734, 212-425-6932, 951-567-8925, 428-265-1568]
- Column: email
- Samples: [[email protected], [email protected], [email protected], [email protected], [email protected]]
- Column: address_1
- Samples: [387 Wellington Ave., 75 W. Berkshire St., 36 Second St., 7607 Sunnyslope Street, 755 Galvin Street]
- Column: address_2
- Samples: [Unit 1, None, None, None, None]
- Column: city
- Samples: [Albuquerque, New York City, New York City, Indianapolis, Indianapolis]
- Column: state
- Samples: [NM, NY, NY, IN, IN]
- Column: zipcode
- Samples: [47246, 10040, 10162, 49047, 40852]
- Column: district_id
- Samples: [18, 1, 1, 5, 5]
- Table: district
- Column: district_id
- Samples: [1, 2, 3, 4, 5]
- Column: city
- Samples: [New York City, Jacksonville, Columbus, Charlotte, Indianapolis]
- Column: state_abbrev
- Samples: [NY, FL, OH, NC, IN]
- Column: division
- Samples: [Middle Atlantic, South Atlantic, East North Central, South Atlantic, East North Central]
- Table: events
- Column: Date received
- Samples: [2014-07-03, 2012-04-12, 2012-04-03, 2012-03-14, 2012-03-05]
- Column: Product
- Samples: [Bank account or service, Bank account or service, Bank account or service, Credit card, Bank account or service]
- Column: Sub-product
- Samples: [Checking account, Savings account, Checking account, None, Checking account]
- Column: Issue
- Samples: [Deposits and withdrawals, Account opening, closing, or management, Account opening, closing, or management, Billing disputes, Account opening, closing, or management]
- Column: Sub-issue
- Samples: [None, None, None, None, None]
- Column: Consumer complaint narrative
- Samples: [None, None, None, None, None]
- Column: Tags
- Samples: [None, None, None, None, None]
- Column: Consumer consent provided?
- Samples: [N/A, N/A, N/A, N/A, N/A]
- Column: Submitted via
- Samples: [Email, Email, Email, Email, Email]
- Column: Date sent to company
- Samples: [2014-07-09, 2012-04-13, 2012-04-03, 2012-03-14, 2012-03-06]
- Column: Company response to consumer
- Samples: [Closed with explanation, Closed with relief, Closed without relief, Closed with relief, Closed with relief]
- Column: Timely response?
- Samples: [Yes, Yes, Yes, Yes, Yes]
- Column: Consumer disputed?
- Samples: [No, No, No, No, No]
- Column: Complaint ID
- Samples: [CR0922485, CR0057298, CR0043811, CR0035411, CR0030939]
- Column: Client_ID
- Samples: [C00001925, C00003141, C00000297, C00004275, C00000900]
- Table: reviews
- Column: Date
- Samples: [2017-10-04, 2017-10-02, 2017-08-21, 2017-12-17, 2016-05-27]
- Column: Stars
- Samples: [5, 5, 5, 5, 5]
- Column: Reviews
- Samples: [Great job, Eagle National! Each person was professional and helped us ..., Matthew Richardson is professional and helpful. He helped us find the ..., We had a past experience with Eagle National Mortgage and would withou..., We have been dealing with Brad Thomka from the beginning of what start..., I can't express how grateful I am for the support that Zach provided t... (truncated)]
- Column: Product
- Samples: [Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage]
- Column: district_id
- Samples: [65, 66, 23, 55, 24]
| SELECT T1.email FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client` WHERE T2.outcome = 'HANG' |
|
Solve the following sql problem:
Calculate the average age of clients from the Midwest region.
Schema:
SCHEMA:
- Table: state
- Column: StateCode
- Samples: [AL, AR, AZ, CA, CO]
- Column: State
- Samples: [Alabama, Arkansas, Arizona, California, Colorado]
- Column: Region
- Samples: [South, South, West, West, West]
- Table: callcenterlogs
- Column: Date received
- Samples: [2017-03-27, 2017-03-27, 2017-03-27, 2017-03-23, 2017-03-22]
- Column: Complaint ID
- Samples: [CR2406263, CR2405641, CR2405629, CR2400594, CR2399607]
- Column: rand client
- Samples: [C00004587, C00003328, C00001685, C00001945, C00004303]
- Column: phonefinal
- Samples: [977-806-9726, 322-598-7152, 508-311-5237, 265-394-2727, 206-008-0460]
- Column: vru+line
- Samples: [AA0103, AA0205, AA0110, AA0113, AA0102]
- Column: call_id
- Samples: [34536, 34537, 34538, 34540, 34541]
- Column: priority
- Samples: [0, 0, 2, 2, 1]
- Column: type
- Samples: [NW, PS, PS, PS, PS]
- Column: outcome
- Samples: [AGENT, AGENT, AGENT, AGENT, AGENT]
- Column: server
- Samples: [MICHAL, TOVA, YIFAT, AVNI, STEREN]
- Column: ser_start
- Samples: [13:34:11, 10:58:22, 13:00:54, 16:18:21, 14:48:22]
- Column: ser_exit
- Samples: [13:40:23, 11:16:10, 13:13:31, 16:19:40, 14:55:19]
- Column: ser_time
- Samples: [00:06:12, 00:17:48, 00:12:37, 00:01:19, 00:06:57]
- Table: client
- Column: client_id
- Samples: [C00000001, C00000002, C00000003, C00000004, C00000005]
- Column: sex
- Samples: [Female, Male, Female, Male, Female]
- Column: day
- Samples: [13, 4, 9, 1, 3]
- Column: month
- Samples: [12, 2, 10, 12, 7]
- Column: year
- Samples: [1990, 1965, 1960, 1976, 1980]
- Column: age
- Samples: [29, 54, 59, 43, 39]
- Column: social
- Samples: [926-93-2157, 806-94-5725, 614-70-9100, 580-20-3414, 536-14-5809]
- Column: first
- Samples: [Emma, Noah, Olivia, Liam, Sophia]
- Column: middle
- Samples: [Avaya, Everest, Brooklynne, Irvin, Danae]
- Column: last
- Samples: [Smith, Thompson, Johnson, White, Williams]
- Column: phone
- Samples: [367-171-6840, 212-423-7734, 212-425-6932, 951-567-8925, 428-265-1568]
- Column: email
- Samples: [[email protected], [email protected], [email protected], [email protected], [email protected]]
- Column: address_1
- Samples: [387 Wellington Ave., 75 W. Berkshire St., 36 Second St., 7607 Sunnyslope Street, 755 Galvin Street]
- Column: address_2
- Samples: [Unit 1, None, None, None, None]
- Column: city
- Samples: [Albuquerque, New York City, New York City, Indianapolis, Indianapolis]
- Column: state
- Samples: [NM, NY, NY, IN, IN]
- Column: zipcode
- Samples: [47246, 10040, 10162, 49047, 40852]
- Column: district_id
- Samples: [18, 1, 1, 5, 5]
- Table: district
- Column: district_id
- Samples: [1, 2, 3, 4, 5]
- Column: city
- Samples: [New York City, Jacksonville, Columbus, Charlotte, Indianapolis]
- Column: state_abbrev
- Samples: [NY, FL, OH, NC, IN]
- Column: division
- Samples: [Middle Atlantic, South Atlantic, East North Central, South Atlantic, East North Central]
- Table: events
- Column: Date received
- Samples: [2014-07-03, 2012-04-12, 2012-04-03, 2012-03-14, 2012-03-05]
- Column: Product
- Samples: [Bank account or service, Bank account or service, Bank account or service, Credit card, Bank account or service]
- Column: Sub-product
- Samples: [Checking account, Savings account, Checking account, None, Checking account]
- Column: Issue
- Samples: [Deposits and withdrawals, Account opening, closing, or management, Account opening, closing, or management, Billing disputes, Account opening, closing, or management]
- Column: Sub-issue
- Samples: [None, None, None, None, None]
- Column: Consumer complaint narrative
- Samples: [None, None, None, None, None]
- Column: Tags
- Samples: [None, None, None, None, None]
- Column: Consumer consent provided?
- Samples: [N/A, N/A, N/A, N/A, N/A]
- Column: Submitted via
- Samples: [Email, Email, Email, Email, Email]
- Column: Date sent to company
- Samples: [2014-07-09, 2012-04-13, 2012-04-03, 2012-03-14, 2012-03-06]
- Column: Company response to consumer
- Samples: [Closed with explanation, Closed with relief, Closed without relief, Closed with relief, Closed with relief]
- Column: Timely response?
- Samples: [Yes, Yes, Yes, Yes, Yes]
- Column: Consumer disputed?
- Samples: [No, No, No, No, No]
- Column: Complaint ID
- Samples: [CR0922485, CR0057298, CR0043811, CR0035411, CR0030939]
- Column: Client_ID
- Samples: [C00001925, C00003141, C00000297, C00004275, C00000900]
- Table: reviews
- Column: Date
- Samples: [2017-10-04, 2017-10-02, 2017-08-21, 2017-12-17, 2016-05-27]
- Column: Stars
- Samples: [5, 5, 5, 5, 5]
- Column: Reviews
- Samples: [Great job, Eagle National! Each person was professional and helped us ..., Matthew Richardson is professional and helpful. He helped us find the ..., We had a past experience with Eagle National Mortgage and would withou..., We have been dealing with Brad Thomka from the beginning of what start..., I can't express how grateful I am for the support that Zach provided t... (truncated)]
- Column: Product
- Samples: [Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage]
- Column: district_id
- Samples: [65, 66, 23, 55, 24]
| SELECT CAST(SUM(T1.age) AS REAL) / COUNT(T3.Region) AS average 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' |
|
Solve the following sql problem:
List the full name and phone number of clients who submitted the complaint via fax.
Schema:
SCHEMA:
- Table: state
- Column: StateCode
- Samples: [AL, AR, AZ, CA, CO]
- Column: State
- Samples: [Alabama, Arkansas, Arizona, California, Colorado]
- Column: Region
- Samples: [South, South, West, West, West]
- Table: callcenterlogs
- Column: Date received
- Samples: [2017-03-27, 2017-03-27, 2017-03-27, 2017-03-23, 2017-03-22]
- Column: Complaint ID
- Samples: [CR2406263, CR2405641, CR2405629, CR2400594, CR2399607]
- Column: rand client
- Samples: [C00004587, C00003328, C00001685, C00001945, C00004303]
- Column: phonefinal
- Samples: [977-806-9726, 322-598-7152, 508-311-5237, 265-394-2727, 206-008-0460]
- Column: vru+line
- Samples: [AA0103, AA0205, AA0110, AA0113, AA0102]
- Column: call_id
- Samples: [34536, 34537, 34538, 34540, 34541]
- Column: priority
- Samples: [0, 0, 2, 2, 1]
- Column: type
- Samples: [NW, PS, PS, PS, PS]
- Column: outcome
- Samples: [AGENT, AGENT, AGENT, AGENT, AGENT]
- Column: server
- Samples: [MICHAL, TOVA, YIFAT, AVNI, STEREN]
- Column: ser_start
- Samples: [13:34:11, 10:58:22, 13:00:54, 16:18:21, 14:48:22]
- Column: ser_exit
- Samples: [13:40:23, 11:16:10, 13:13:31, 16:19:40, 14:55:19]
- Column: ser_time
- Samples: [00:06:12, 00:17:48, 00:12:37, 00:01:19, 00:06:57]
- Table: client
- Column: client_id
- Samples: [C00000001, C00000002, C00000003, C00000004, C00000005]
- Column: sex
- Samples: [Female, Male, Female, Male, Female]
- Column: day
- Samples: [13, 4, 9, 1, 3]
- Column: month
- Samples: [12, 2, 10, 12, 7]
- Column: year
- Samples: [1990, 1965, 1960, 1976, 1980]
- Column: age
- Samples: [29, 54, 59, 43, 39]
- Column: social
- Samples: [926-93-2157, 806-94-5725, 614-70-9100, 580-20-3414, 536-14-5809]
- Column: first
- Samples: [Emma, Noah, Olivia, Liam, Sophia]
- Column: middle
- Samples: [Avaya, Everest, Brooklynne, Irvin, Danae]
- Column: last
- Samples: [Smith, Thompson, Johnson, White, Williams]
- Column: phone
- Samples: [367-171-6840, 212-423-7734, 212-425-6932, 951-567-8925, 428-265-1568]
- Column: email
- Samples: [[email protected], [email protected], [email protected], [email protected], [email protected]]
- Column: address_1
- Samples: [387 Wellington Ave., 75 W. Berkshire St., 36 Second St., 7607 Sunnyslope Street, 755 Galvin Street]
- Column: address_2
- Samples: [Unit 1, None, None, None, None]
- Column: city
- Samples: [Albuquerque, New York City, New York City, Indianapolis, Indianapolis]
- Column: state
- Samples: [NM, NY, NY, IN, IN]
- Column: zipcode
- Samples: [47246, 10040, 10162, 49047, 40852]
- Column: district_id
- Samples: [18, 1, 1, 5, 5]
- Table: district
- Column: district_id
- Samples: [1, 2, 3, 4, 5]
- Column: city
- Samples: [New York City, Jacksonville, Columbus, Charlotte, Indianapolis]
- Column: state_abbrev
- Samples: [NY, FL, OH, NC, IN]
- Column: division
- Samples: [Middle Atlantic, South Atlantic, East North Central, South Atlantic, East North Central]
- Table: events
- Column: Date received
- Samples: [2014-07-03, 2012-04-12, 2012-04-03, 2012-03-14, 2012-03-05]
- Column: Product
- Samples: [Bank account or service, Bank account or service, Bank account or service, Credit card, Bank account or service]
- Column: Sub-product
- Samples: [Checking account, Savings account, Checking account, None, Checking account]
- Column: Issue
- Samples: [Deposits and withdrawals, Account opening, closing, or management, Account opening, closing, or management, Billing disputes, Account opening, closing, or management]
- Column: Sub-issue
- Samples: [None, None, None, None, None]
- Column: Consumer complaint narrative
- Samples: [None, None, None, None, None]
- Column: Tags
- Samples: [None, None, None, None, None]
- Column: Consumer consent provided?
- Samples: [N/A, N/A, N/A, N/A, N/A]
- Column: Submitted via
- Samples: [Email, Email, Email, Email, Email]
- Column: Date sent to company
- Samples: [2014-07-09, 2012-04-13, 2012-04-03, 2012-03-14, 2012-03-06]
- Column: Company response to consumer
- Samples: [Closed with explanation, Closed with relief, Closed without relief, Closed with relief, Closed with relief]
- Column: Timely response?
- Samples: [Yes, Yes, Yes, Yes, Yes]
- Column: Consumer disputed?
- Samples: [No, No, No, No, No]
- Column: Complaint ID
- Samples: [CR0922485, CR0057298, CR0043811, CR0035411, CR0030939]
- Column: Client_ID
- Samples: [C00001925, C00003141, C00000297, C00004275, C00000900]
- Table: reviews
- Column: Date
- Samples: [2017-10-04, 2017-10-02, 2017-08-21, 2017-12-17, 2016-05-27]
- Column: Stars
- Samples: [5, 5, 5, 5, 5]
- Column: Reviews
- Samples: [Great job, Eagle National! Each person was professional and helped us ..., Matthew Richardson is professional and helpful. He helped us find the ..., We had a past experience with Eagle National Mortgage and would withou..., We have been dealing with Brad Thomka from the beginning of what start..., I can't express how grateful I am for the support that Zach provided t... (truncated)]
- Column: Product
- Samples: [Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage]
- Column: district_id
- Samples: [65, 66, 23, 55, 24]
| SELECT T1.first, T1.middle, T1.last, T1.phone FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Submitted via` = 'Fax' |
|
Solve the following sql problem:
Find and list the names of districts which has below-average stars for Eagle Capital.
Schema:
SCHEMA:
- Table: state
- Column: StateCode
- Samples: [AL, AR, AZ, CA, CO]
- Column: State
- Samples: [Alabama, Arkansas, Arizona, California, Colorado]
- Column: Region
- Samples: [South, South, West, West, West]
- Table: callcenterlogs
- Column: Date received
- Samples: [2017-03-27, 2017-03-27, 2017-03-27, 2017-03-23, 2017-03-22]
- Column: Complaint ID
- Samples: [CR2406263, CR2405641, CR2405629, CR2400594, CR2399607]
- Column: rand client
- Samples: [C00004587, C00003328, C00001685, C00001945, C00004303]
- Column: phonefinal
- Samples: [977-806-9726, 322-598-7152, 508-311-5237, 265-394-2727, 206-008-0460]
- Column: vru+line
- Samples: [AA0103, AA0205, AA0110, AA0113, AA0102]
- Column: call_id
- Samples: [34536, 34537, 34538, 34540, 34541]
- Column: priority
- Samples: [0, 0, 2, 2, 1]
- Column: type
- Samples: [NW, PS, PS, PS, PS]
- Column: outcome
- Samples: [AGENT, AGENT, AGENT, AGENT, AGENT]
- Column: server
- Samples: [MICHAL, TOVA, YIFAT, AVNI, STEREN]
- Column: ser_start
- Samples: [13:34:11, 10:58:22, 13:00:54, 16:18:21, 14:48:22]
- Column: ser_exit
- Samples: [13:40:23, 11:16:10, 13:13:31, 16:19:40, 14:55:19]
- Column: ser_time
- Samples: [00:06:12, 00:17:48, 00:12:37, 00:01:19, 00:06:57]
- Table: client
- Column: client_id
- Samples: [C00000001, C00000002, C00000003, C00000004, C00000005]
- Column: sex
- Samples: [Female, Male, Female, Male, Female]
- Column: day
- Samples: [13, 4, 9, 1, 3]
- Column: month
- Samples: [12, 2, 10, 12, 7]
- Column: year
- Samples: [1990, 1965, 1960, 1976, 1980]
- Column: age
- Samples: [29, 54, 59, 43, 39]
- Column: social
- Samples: [926-93-2157, 806-94-5725, 614-70-9100, 580-20-3414, 536-14-5809]
- Column: first
- Samples: [Emma, Noah, Olivia, Liam, Sophia]
- Column: middle
- Samples: [Avaya, Everest, Brooklynne, Irvin, Danae]
- Column: last
- Samples: [Smith, Thompson, Johnson, White, Williams]
- Column: phone
- Samples: [367-171-6840, 212-423-7734, 212-425-6932, 951-567-8925, 428-265-1568]
- Column: email
- Samples: [[email protected], [email protected], [email protected], [email protected], [email protected]]
- Column: address_1
- Samples: [387 Wellington Ave., 75 W. Berkshire St., 36 Second St., 7607 Sunnyslope Street, 755 Galvin Street]
- Column: address_2
- Samples: [Unit 1, None, None, None, None]
- Column: city
- Samples: [Albuquerque, New York City, New York City, Indianapolis, Indianapolis]
- Column: state
- Samples: [NM, NY, NY, IN, IN]
- Column: zipcode
- Samples: [47246, 10040, 10162, 49047, 40852]
- Column: district_id
- Samples: [18, 1, 1, 5, 5]
- Table: district
- Column: district_id
- Samples: [1, 2, 3, 4, 5]
- Column: city
- Samples: [New York City, Jacksonville, Columbus, Charlotte, Indianapolis]
- Column: state_abbrev
- Samples: [NY, FL, OH, NC, IN]
- Column: division
- Samples: [Middle Atlantic, South Atlantic, East North Central, South Atlantic, East North Central]
- Table: events
- Column: Date received
- Samples: [2014-07-03, 2012-04-12, 2012-04-03, 2012-03-14, 2012-03-05]
- Column: Product
- Samples: [Bank account or service, Bank account or service, Bank account or service, Credit card, Bank account or service]
- Column: Sub-product
- Samples: [Checking account, Savings account, Checking account, None, Checking account]
- Column: Issue
- Samples: [Deposits and withdrawals, Account opening, closing, or management, Account opening, closing, or management, Billing disputes, Account opening, closing, or management]
- Column: Sub-issue
- Samples: [None, None, None, None, None]
- Column: Consumer complaint narrative
- Samples: [None, None, None, None, None]
- Column: Tags
- Samples: [None, None, None, None, None]
- Column: Consumer consent provided?
- Samples: [N/A, N/A, N/A, N/A, N/A]
- Column: Submitted via
- Samples: [Email, Email, Email, Email, Email]
- Column: Date sent to company
- Samples: [2014-07-09, 2012-04-13, 2012-04-03, 2012-03-14, 2012-03-06]
- Column: Company response to consumer
- Samples: [Closed with explanation, Closed with relief, Closed without relief, Closed with relief, Closed with relief]
- Column: Timely response?
- Samples: [Yes, Yes, Yes, Yes, Yes]
- Column: Consumer disputed?
- Samples: [No, No, No, No, No]
- Column: Complaint ID
- Samples: [CR0922485, CR0057298, CR0043811, CR0035411, CR0030939]
- Column: Client_ID
- Samples: [C00001925, C00003141, C00000297, C00004275, C00000900]
- Table: reviews
- Column: Date
- Samples: [2017-10-04, 2017-10-02, 2017-08-21, 2017-12-17, 2016-05-27]
- Column: Stars
- Samples: [5, 5, 5, 5, 5]
- Column: Reviews
- Samples: [Great job, Eagle National! Each person was professional and helped us ..., Matthew Richardson is professional and helpful. He helped us find the ..., We had a past experience with Eagle National Mortgage and would withou..., We have been dealing with Brad Thomka from the beginning of what start..., I can't express how grateful I am for the support that Zach provided t... (truncated)]
- Column: Product
- Samples: [Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage]
- Column: district_id
- Samples: [65, 66, 23, 55, 24]
| SELECT T2.division FROM reviews AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T1.Product = 'Eagle Capital' AND T1.Stars > ( SELECT AVG(Stars) FROM reviews AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id ) |
|
Solve the following sql problem:
In the calls from the mountain division, how many are from teenage clients?
Schema:
SCHEMA:
- Table: state
- Column: StateCode
- Samples: [AL, AR, AZ, CA, CO]
- Column: State
- Samples: [Alabama, Arkansas, Arizona, California, Colorado]
- Column: Region
- Samples: [South, South, West, West, West]
- Table: callcenterlogs
- Column: Date received
- Samples: [2017-03-27, 2017-03-27, 2017-03-27, 2017-03-23, 2017-03-22]
- Column: Complaint ID
- Samples: [CR2406263, CR2405641, CR2405629, CR2400594, CR2399607]
- Column: rand client
- Samples: [C00004587, C00003328, C00001685, C00001945, C00004303]
- Column: phonefinal
- Samples: [977-806-9726, 322-598-7152, 508-311-5237, 265-394-2727, 206-008-0460]
- Column: vru+line
- Samples: [AA0103, AA0205, AA0110, AA0113, AA0102]
- Column: call_id
- Samples: [34536, 34537, 34538, 34540, 34541]
- Column: priority
- Samples: [0, 0, 2, 2, 1]
- Column: type
- Samples: [NW, PS, PS, PS, PS]
- Column: outcome
- Samples: [AGENT, AGENT, AGENT, AGENT, AGENT]
- Column: server
- Samples: [MICHAL, TOVA, YIFAT, AVNI, STEREN]
- Column: ser_start
- Samples: [13:34:11, 10:58:22, 13:00:54, 16:18:21, 14:48:22]
- Column: ser_exit
- Samples: [13:40:23, 11:16:10, 13:13:31, 16:19:40, 14:55:19]
- Column: ser_time
- Samples: [00:06:12, 00:17:48, 00:12:37, 00:01:19, 00:06:57]
- Table: client
- Column: client_id
- Samples: [C00000001, C00000002, C00000003, C00000004, C00000005]
- Column: sex
- Samples: [Female, Male, Female, Male, Female]
- Column: day
- Samples: [13, 4, 9, 1, 3]
- Column: month
- Samples: [12, 2, 10, 12, 7]
- Column: year
- Samples: [1990, 1965, 1960, 1976, 1980]
- Column: age
- Samples: [29, 54, 59, 43, 39]
- Column: social
- Samples: [926-93-2157, 806-94-5725, 614-70-9100, 580-20-3414, 536-14-5809]
- Column: first
- Samples: [Emma, Noah, Olivia, Liam, Sophia]
- Column: middle
- Samples: [Avaya, Everest, Brooklynne, Irvin, Danae]
- Column: last
- Samples: [Smith, Thompson, Johnson, White, Williams]
- Column: phone
- Samples: [367-171-6840, 212-423-7734, 212-425-6932, 951-567-8925, 428-265-1568]
- Column: email
- Samples: [[email protected], [email protected], [email protected], [email protected], [email protected]]
- Column: address_1
- Samples: [387 Wellington Ave., 75 W. Berkshire St., 36 Second St., 7607 Sunnyslope Street, 755 Galvin Street]
- Column: address_2
- Samples: [Unit 1, None, None, None, None]
- Column: city
- Samples: [Albuquerque, New York City, New York City, Indianapolis, Indianapolis]
- Column: state
- Samples: [NM, NY, NY, IN, IN]
- Column: zipcode
- Samples: [47246, 10040, 10162, 49047, 40852]
- Column: district_id
- Samples: [18, 1, 1, 5, 5]
- Table: district
- Column: district_id
- Samples: [1, 2, 3, 4, 5]
- Column: city
- Samples: [New York City, Jacksonville, Columbus, Charlotte, Indianapolis]
- Column: state_abbrev
- Samples: [NY, FL, OH, NC, IN]
- Column: division
- Samples: [Middle Atlantic, South Atlantic, East North Central, South Atlantic, East North Central]
- Table: events
- Column: Date received
- Samples: [2014-07-03, 2012-04-12, 2012-04-03, 2012-03-14, 2012-03-05]
- Column: Product
- Samples: [Bank account or service, Bank account or service, Bank account or service, Credit card, Bank account or service]
- Column: Sub-product
- Samples: [Checking account, Savings account, Checking account, None, Checking account]
- Column: Issue
- Samples: [Deposits and withdrawals, Account opening, closing, or management, Account opening, closing, or management, Billing disputes, Account opening, closing, or management]
- Column: Sub-issue
- Samples: [None, None, None, None, None]
- Column: Consumer complaint narrative
- Samples: [None, None, None, None, None]
- Column: Tags
- Samples: [None, None, None, None, None]
- Column: Consumer consent provided?
- Samples: [N/A, N/A, N/A, N/A, N/A]
- Column: Submitted via
- Samples: [Email, Email, Email, Email, Email]
- Column: Date sent to company
- Samples: [2014-07-09, 2012-04-13, 2012-04-03, 2012-03-14, 2012-03-06]
- Column: Company response to consumer
- Samples: [Closed with explanation, Closed with relief, Closed without relief, Closed with relief, Closed with relief]
- Column: Timely response?
- Samples: [Yes, Yes, Yes, Yes, Yes]
- Column: Consumer disputed?
- Samples: [No, No, No, No, No]
- Column: Complaint ID
- Samples: [CR0922485, CR0057298, CR0043811, CR0035411, CR0030939]
- Column: Client_ID
- Samples: [C00001925, C00003141, C00000297, C00004275, C00000900]
- Table: reviews
- Column: Date
- Samples: [2017-10-04, 2017-10-02, 2017-08-21, 2017-12-17, 2016-05-27]
- Column: Stars
- Samples: [5, 5, 5, 5, 5]
- Column: Reviews
- Samples: [Great job, Eagle National! Each person was professional and helped us ..., Matthew Richardson is professional and helpful. He helped us find the ..., We had a past experience with Eagle National Mortgage and would withou..., We have been dealing with Brad Thomka from the beginning of what start..., I can't express how grateful I am for the support that Zach provided t... (truncated)]
- Column: Product
- Samples: [Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage]
- Column: district_id
- Samples: [65, 66, 23, 55, 24]
| SELECT COUNT(T1.age) FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T1.age BETWEEN 12 AND 20 AND T2.division = 'Mountain' |
|
Solve the following sql problem:
What is the number of complaints related to Credit cards came from female clients?
Schema:
SCHEMA:
- Table: state
- Column: StateCode
- Samples: [AL, AR, AZ, CA, CO]
- Column: State
- Samples: [Alabama, Arkansas, Arizona, California, Colorado]
- Column: Region
- Samples: [South, South, West, West, West]
- Table: callcenterlogs
- Column: Date received
- Samples: [2017-03-27, 2017-03-27, 2017-03-27, 2017-03-23, 2017-03-22]
- Column: Complaint ID
- Samples: [CR2406263, CR2405641, CR2405629, CR2400594, CR2399607]
- Column: rand client
- Samples: [C00004587, C00003328, C00001685, C00001945, C00004303]
- Column: phonefinal
- Samples: [977-806-9726, 322-598-7152, 508-311-5237, 265-394-2727, 206-008-0460]
- Column: vru+line
- Samples: [AA0103, AA0205, AA0110, AA0113, AA0102]
- Column: call_id
- Samples: [34536, 34537, 34538, 34540, 34541]
- Column: priority
- Samples: [0, 0, 2, 2, 1]
- Column: type
- Samples: [NW, PS, PS, PS, PS]
- Column: outcome
- Samples: [AGENT, AGENT, AGENT, AGENT, AGENT]
- Column: server
- Samples: [MICHAL, TOVA, YIFAT, AVNI, STEREN]
- Column: ser_start
- Samples: [13:34:11, 10:58:22, 13:00:54, 16:18:21, 14:48:22]
- Column: ser_exit
- Samples: [13:40:23, 11:16:10, 13:13:31, 16:19:40, 14:55:19]
- Column: ser_time
- Samples: [00:06:12, 00:17:48, 00:12:37, 00:01:19, 00:06:57]
- Table: client
- Column: client_id
- Samples: [C00000001, C00000002, C00000003, C00000004, C00000005]
- Column: sex
- Samples: [Female, Male, Female, Male, Female]
- Column: day
- Samples: [13, 4, 9, 1, 3]
- Column: month
- Samples: [12, 2, 10, 12, 7]
- Column: year
- Samples: [1990, 1965, 1960, 1976, 1980]
- Column: age
- Samples: [29, 54, 59, 43, 39]
- Column: social
- Samples: [926-93-2157, 806-94-5725, 614-70-9100, 580-20-3414, 536-14-5809]
- Column: first
- Samples: [Emma, Noah, Olivia, Liam, Sophia]
- Column: middle
- Samples: [Avaya, Everest, Brooklynne, Irvin, Danae]
- Column: last
- Samples: [Smith, Thompson, Johnson, White, Williams]
- Column: phone
- Samples: [367-171-6840, 212-423-7734, 212-425-6932, 951-567-8925, 428-265-1568]
- Column: email
- Samples: [[email protected], [email protected], [email protected], [email protected], [email protected]]
- Column: address_1
- Samples: [387 Wellington Ave., 75 W. Berkshire St., 36 Second St., 7607 Sunnyslope Street, 755 Galvin Street]
- Column: address_2
- Samples: [Unit 1, None, None, None, None]
- Column: city
- Samples: [Albuquerque, New York City, New York City, Indianapolis, Indianapolis]
- Column: state
- Samples: [NM, NY, NY, IN, IN]
- Column: zipcode
- Samples: [47246, 10040, 10162, 49047, 40852]
- Column: district_id
- Samples: [18, 1, 1, 5, 5]
- Table: district
- Column: district_id
- Samples: [1, 2, 3, 4, 5]
- Column: city
- Samples: [New York City, Jacksonville, Columbus, Charlotte, Indianapolis]
- Column: state_abbrev
- Samples: [NY, FL, OH, NC, IN]
- Column: division
- Samples: [Middle Atlantic, South Atlantic, East North Central, South Atlantic, East North Central]
- Table: events
- Column: Date received
- Samples: [2014-07-03, 2012-04-12, 2012-04-03, 2012-03-14, 2012-03-05]
- Column: Product
- Samples: [Bank account or service, Bank account or service, Bank account or service, Credit card, Bank account or service]
- Column: Sub-product
- Samples: [Checking account, Savings account, Checking account, None, Checking account]
- Column: Issue
- Samples: [Deposits and withdrawals, Account opening, closing, or management, Account opening, closing, or management, Billing disputes, Account opening, closing, or management]
- Column: Sub-issue
- Samples: [None, None, None, None, None]
- Column: Consumer complaint narrative
- Samples: [None, None, None, None, None]
- Column: Tags
- Samples: [None, None, None, None, None]
- Column: Consumer consent provided?
- Samples: [N/A, N/A, N/A, N/A, N/A]
- Column: Submitted via
- Samples: [Email, Email, Email, Email, Email]
- Column: Date sent to company
- Samples: [2014-07-09, 2012-04-13, 2012-04-03, 2012-03-14, 2012-03-06]
- Column: Company response to consumer
- Samples: [Closed with explanation, Closed with relief, Closed without relief, Closed with relief, Closed with relief]
- Column: Timely response?
- Samples: [Yes, Yes, Yes, Yes, Yes]
- Column: Consumer disputed?
- Samples: [No, No, No, No, No]
- Column: Complaint ID
- Samples: [CR0922485, CR0057298, CR0043811, CR0035411, CR0030939]
- Column: Client_ID
- Samples: [C00001925, C00003141, C00000297, C00004275, C00000900]
- Table: reviews
- Column: Date
- Samples: [2017-10-04, 2017-10-02, 2017-08-21, 2017-12-17, 2016-05-27]
- Column: Stars
- Samples: [5, 5, 5, 5, 5]
- Column: Reviews
- Samples: [Great job, Eagle National! Each person was professional and helped us ..., Matthew Richardson is professional and helpful. He helped us find the ..., We had a past experience with Eagle National Mortgage and would withou..., We have been dealing with Brad Thomka from the beginning of what start..., I can't express how grateful I am for the support that Zach provided t... (truncated)]
- Column: Product
- Samples: [Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage]
- Column: district_id
- Samples: [65, 66, 23, 55, 24]
| SELECT COUNT(T1.sex) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T1.sex = 'Female' AND T2.Product = 'Credit card' |
|
Solve the following sql problem:
Among the clients born between 1980 and 2000, list the name of male clients who complained through referral.
Schema:
SCHEMA:
- Table: state
- Column: StateCode
- Samples: [AL, AR, AZ, CA, CO]
- Column: State
- Samples: [Alabama, Arkansas, Arizona, California, Colorado]
- Column: Region
- Samples: [South, South, West, West, West]
- Table: callcenterlogs
- Column: Date received
- Samples: [2017-03-27, 2017-03-27, 2017-03-27, 2017-03-23, 2017-03-22]
- Column: Complaint ID
- Samples: [CR2406263, CR2405641, CR2405629, CR2400594, CR2399607]
- Column: rand client
- Samples: [C00004587, C00003328, C00001685, C00001945, C00004303]
- Column: phonefinal
- Samples: [977-806-9726, 322-598-7152, 508-311-5237, 265-394-2727, 206-008-0460]
- Column: vru+line
- Samples: [AA0103, AA0205, AA0110, AA0113, AA0102]
- Column: call_id
- Samples: [34536, 34537, 34538, 34540, 34541]
- Column: priority
- Samples: [0, 0, 2, 2, 1]
- Column: type
- Samples: [NW, PS, PS, PS, PS]
- Column: outcome
- Samples: [AGENT, AGENT, AGENT, AGENT, AGENT]
- Column: server
- Samples: [MICHAL, TOVA, YIFAT, AVNI, STEREN]
- Column: ser_start
- Samples: [13:34:11, 10:58:22, 13:00:54, 16:18:21, 14:48:22]
- Column: ser_exit
- Samples: [13:40:23, 11:16:10, 13:13:31, 16:19:40, 14:55:19]
- Column: ser_time
- Samples: [00:06:12, 00:17:48, 00:12:37, 00:01:19, 00:06:57]
- Table: client
- Column: client_id
- Samples: [C00000001, C00000002, C00000003, C00000004, C00000005]
- Column: sex
- Samples: [Female, Male, Female, Male, Female]
- Column: day
- Samples: [13, 4, 9, 1, 3]
- Column: month
- Samples: [12, 2, 10, 12, 7]
- Column: year
- Samples: [1990, 1965, 1960, 1976, 1980]
- Column: age
- Samples: [29, 54, 59, 43, 39]
- Column: social
- Samples: [926-93-2157, 806-94-5725, 614-70-9100, 580-20-3414, 536-14-5809]
- Column: first
- Samples: [Emma, Noah, Olivia, Liam, Sophia]
- Column: middle
- Samples: [Avaya, Everest, Brooklynne, Irvin, Danae]
- Column: last
- Samples: [Smith, Thompson, Johnson, White, Williams]
- Column: phone
- Samples: [367-171-6840, 212-423-7734, 212-425-6932, 951-567-8925, 428-265-1568]
- Column: email
- Samples: [[email protected], [email protected], [email protected], [email protected], [email protected]]
- Column: address_1
- Samples: [387 Wellington Ave., 75 W. Berkshire St., 36 Second St., 7607 Sunnyslope Street, 755 Galvin Street]
- Column: address_2
- Samples: [Unit 1, None, None, None, None]
- Column: city
- Samples: [Albuquerque, New York City, New York City, Indianapolis, Indianapolis]
- Column: state
- Samples: [NM, NY, NY, IN, IN]
- Column: zipcode
- Samples: [47246, 10040, 10162, 49047, 40852]
- Column: district_id
- Samples: [18, 1, 1, 5, 5]
- Table: district
- Column: district_id
- Samples: [1, 2, 3, 4, 5]
- Column: city
- Samples: [New York City, Jacksonville, Columbus, Charlotte, Indianapolis]
- Column: state_abbrev
- Samples: [NY, FL, OH, NC, IN]
- Column: division
- Samples: [Middle Atlantic, South Atlantic, East North Central, South Atlantic, East North Central]
- Table: events
- Column: Date received
- Samples: [2014-07-03, 2012-04-12, 2012-04-03, 2012-03-14, 2012-03-05]
- Column: Product
- Samples: [Bank account or service, Bank account or service, Bank account or service, Credit card, Bank account or service]
- Column: Sub-product
- Samples: [Checking account, Savings account, Checking account, None, Checking account]
- Column: Issue
- Samples: [Deposits and withdrawals, Account opening, closing, or management, Account opening, closing, or management, Billing disputes, Account opening, closing, or management]
- Column: Sub-issue
- Samples: [None, None, None, None, None]
- Column: Consumer complaint narrative
- Samples: [None, None, None, None, None]
- Column: Tags
- Samples: [None, None, None, None, None]
- Column: Consumer consent provided?
- Samples: [N/A, N/A, N/A, N/A, N/A]
- Column: Submitted via
- Samples: [Email, Email, Email, Email, Email]
- Column: Date sent to company
- Samples: [2014-07-09, 2012-04-13, 2012-04-03, 2012-03-14, 2012-03-06]
- Column: Company response to consumer
- Samples: [Closed with explanation, Closed with relief, Closed without relief, Closed with relief, Closed with relief]
- Column: Timely response?
- Samples: [Yes, Yes, Yes, Yes, Yes]
- Column: Consumer disputed?
- Samples: [No, No, No, No, No]
- Column: Complaint ID
- Samples: [CR0922485, CR0057298, CR0043811, CR0035411, CR0030939]
- Column: Client_ID
- Samples: [C00001925, C00003141, C00000297, C00004275, C00000900]
- Table: reviews
- Column: Date
- Samples: [2017-10-04, 2017-10-02, 2017-08-21, 2017-12-17, 2016-05-27]
- Column: Stars
- Samples: [5, 5, 5, 5, 5]
- Column: Reviews
- Samples: [Great job, Eagle National! Each person was professional and helped us ..., Matthew Richardson is professional and helpful. He helped us find the ..., We had a past experience with Eagle National Mortgage and would withou..., We have been dealing with Brad Thomka from the beginning of what start..., I can't express how grateful I am for the support that Zach provided t... (truncated)]
- Column: Product
- Samples: [Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage]
- Column: district_id
- Samples: [65, 66, 23, 55, 24]
| SELECT T1.first, T1.middle, T1.last FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T1.year BETWEEN 1980 AND 2000 AND T1.sex = 'Male' AND T2.`Submitted via` = 'Referral' |
|
Solve the following sql problem:
What is the medium through which most complaints are registered in Florida?
Schema:
SCHEMA:
- Table: state
- Column: StateCode
- Samples: [AL, AR, AZ, CA, CO]
- Column: State
- Samples: [Alabama, Arkansas, Arizona, California, Colorado]
- Column: Region
- Samples: [South, South, West, West, West]
- Table: callcenterlogs
- Column: Date received
- Samples: [2017-03-27, 2017-03-27, 2017-03-27, 2017-03-23, 2017-03-22]
- Column: Complaint ID
- Samples: [CR2406263, CR2405641, CR2405629, CR2400594, CR2399607]
- Column: rand client
- Samples: [C00004587, C00003328, C00001685, C00001945, C00004303]
- Column: phonefinal
- Samples: [977-806-9726, 322-598-7152, 508-311-5237, 265-394-2727, 206-008-0460]
- Column: vru+line
- Samples: [AA0103, AA0205, AA0110, AA0113, AA0102]
- Column: call_id
- Samples: [34536, 34537, 34538, 34540, 34541]
- Column: priority
- Samples: [0, 0, 2, 2, 1]
- Column: type
- Samples: [NW, PS, PS, PS, PS]
- Column: outcome
- Samples: [AGENT, AGENT, AGENT, AGENT, AGENT]
- Column: server
- Samples: [MICHAL, TOVA, YIFAT, AVNI, STEREN]
- Column: ser_start
- Samples: [13:34:11, 10:58:22, 13:00:54, 16:18:21, 14:48:22]
- Column: ser_exit
- Samples: [13:40:23, 11:16:10, 13:13:31, 16:19:40, 14:55:19]
- Column: ser_time
- Samples: [00:06:12, 00:17:48, 00:12:37, 00:01:19, 00:06:57]
- Table: client
- Column: client_id
- Samples: [C00000001, C00000002, C00000003, C00000004, C00000005]
- Column: sex
- Samples: [Female, Male, Female, Male, Female]
- Column: day
- Samples: [13, 4, 9, 1, 3]
- Column: month
- Samples: [12, 2, 10, 12, 7]
- Column: year
- Samples: [1990, 1965, 1960, 1976, 1980]
- Column: age
- Samples: [29, 54, 59, 43, 39]
- Column: social
- Samples: [926-93-2157, 806-94-5725, 614-70-9100, 580-20-3414, 536-14-5809]
- Column: first
- Samples: [Emma, Noah, Olivia, Liam, Sophia]
- Column: middle
- Samples: [Avaya, Everest, Brooklynne, Irvin, Danae]
- Column: last
- Samples: [Smith, Thompson, Johnson, White, Williams]
- Column: phone
- Samples: [367-171-6840, 212-423-7734, 212-425-6932, 951-567-8925, 428-265-1568]
- Column: email
- Samples: [[email protected], [email protected], [email protected], [email protected], [email protected]]
- Column: address_1
- Samples: [387 Wellington Ave., 75 W. Berkshire St., 36 Second St., 7607 Sunnyslope Street, 755 Galvin Street]
- Column: address_2
- Samples: [Unit 1, None, None, None, None]
- Column: city
- Samples: [Albuquerque, New York City, New York City, Indianapolis, Indianapolis]
- Column: state
- Samples: [NM, NY, NY, IN, IN]
- Column: zipcode
- Samples: [47246, 10040, 10162, 49047, 40852]
- Column: district_id
- Samples: [18, 1, 1, 5, 5]
- Table: district
- Column: district_id
- Samples: [1, 2, 3, 4, 5]
- Column: city
- Samples: [New York City, Jacksonville, Columbus, Charlotte, Indianapolis]
- Column: state_abbrev
- Samples: [NY, FL, OH, NC, IN]
- Column: division
- Samples: [Middle Atlantic, South Atlantic, East North Central, South Atlantic, East North Central]
- Table: events
- Column: Date received
- Samples: [2014-07-03, 2012-04-12, 2012-04-03, 2012-03-14, 2012-03-05]
- Column: Product
- Samples: [Bank account or service, Bank account or service, Bank account or service, Credit card, Bank account or service]
- Column: Sub-product
- Samples: [Checking account, Savings account, Checking account, None, Checking account]
- Column: Issue
- Samples: [Deposits and withdrawals, Account opening, closing, or management, Account opening, closing, or management, Billing disputes, Account opening, closing, or management]
- Column: Sub-issue
- Samples: [None, None, None, None, None]
- Column: Consumer complaint narrative
- Samples: [None, None, None, None, None]
- Column: Tags
- Samples: [None, None, None, None, None]
- Column: Consumer consent provided?
- Samples: [N/A, N/A, N/A, N/A, N/A]
- Column: Submitted via
- Samples: [Email, Email, Email, Email, Email]
- Column: Date sent to company
- Samples: [2014-07-09, 2012-04-13, 2012-04-03, 2012-03-14, 2012-03-06]
- Column: Company response to consumer
- Samples: [Closed with explanation, Closed with relief, Closed without relief, Closed with relief, Closed with relief]
- Column: Timely response?
- Samples: [Yes, Yes, Yes, Yes, Yes]
- Column: Consumer disputed?
- Samples: [No, No, No, No, No]
- Column: Complaint ID
- Samples: [CR0922485, CR0057298, CR0043811, CR0035411, CR0030939]
- Column: Client_ID
- Samples: [C00001925, C00003141, C00000297, C00004275, C00000900]
- Table: reviews
- Column: Date
- Samples: [2017-10-04, 2017-10-02, 2017-08-21, 2017-12-17, 2016-05-27]
- Column: Stars
- Samples: [5, 5, 5, 5, 5]
- Column: Reviews
- Samples: [Great job, Eagle National! Each person was professional and helped us ..., Matthew Richardson is professional and helpful. He helped us find the ..., We had a past experience with Eagle National Mortgage and would withou..., We have been dealing with Brad Thomka from the beginning of what start..., I can't express how grateful I am for the support that Zach provided t... (truncated)]
- Column: Product
- Samples: [Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage]
- Column: district_id
- Samples: [65, 66, 23, 55, 24]
| SELECT T3.`Submitted via` 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.state = 'FL' GROUP BY T1.`Complaint ID` ORDER BY COUNT(T1.`Complaint ID`) DESC LIMIT 1 |
|
Solve the following sql problem:
Calculate the average number of complaints received from New Bedford each year which are closed with explanation.
Schema:
SCHEMA:
- Table: state
- Column: StateCode
- Samples: [AL, AR, AZ, CA, CO]
- Column: State
- Samples: [Alabama, Arkansas, Arizona, California, Colorado]
- Column: Region
- Samples: [South, South, West, West, West]
- Table: callcenterlogs
- Column: Date received
- Samples: [2017-03-27, 2017-03-27, 2017-03-27, 2017-03-23, 2017-03-22]
- Column: Complaint ID
- Samples: [CR2406263, CR2405641, CR2405629, CR2400594, CR2399607]
- Column: rand client
- Samples: [C00004587, C00003328, C00001685, C00001945, C00004303]
- Column: phonefinal
- Samples: [977-806-9726, 322-598-7152, 508-311-5237, 265-394-2727, 206-008-0460]
- Column: vru+line
- Samples: [AA0103, AA0205, AA0110, AA0113, AA0102]
- Column: call_id
- Samples: [34536, 34537, 34538, 34540, 34541]
- Column: priority
- Samples: [0, 0, 2, 2, 1]
- Column: type
- Samples: [NW, PS, PS, PS, PS]
- Column: outcome
- Samples: [AGENT, AGENT, AGENT, AGENT, AGENT]
- Column: server
- Samples: [MICHAL, TOVA, YIFAT, AVNI, STEREN]
- Column: ser_start
- Samples: [13:34:11, 10:58:22, 13:00:54, 16:18:21, 14:48:22]
- Column: ser_exit
- Samples: [13:40:23, 11:16:10, 13:13:31, 16:19:40, 14:55:19]
- Column: ser_time
- Samples: [00:06:12, 00:17:48, 00:12:37, 00:01:19, 00:06:57]
- Table: client
- Column: client_id
- Samples: [C00000001, C00000002, C00000003, C00000004, C00000005]
- Column: sex
- Samples: [Female, Male, Female, Male, Female]
- Column: day
- Samples: [13, 4, 9, 1, 3]
- Column: month
- Samples: [12, 2, 10, 12, 7]
- Column: year
- Samples: [1990, 1965, 1960, 1976, 1980]
- Column: age
- Samples: [29, 54, 59, 43, 39]
- Column: social
- Samples: [926-93-2157, 806-94-5725, 614-70-9100, 580-20-3414, 536-14-5809]
- Column: first
- Samples: [Emma, Noah, Olivia, Liam, Sophia]
- Column: middle
- Samples: [Avaya, Everest, Brooklynne, Irvin, Danae]
- Column: last
- Samples: [Smith, Thompson, Johnson, White, Williams]
- Column: phone
- Samples: [367-171-6840, 212-423-7734, 212-425-6932, 951-567-8925, 428-265-1568]
- Column: email
- Samples: [[email protected], [email protected], [email protected], [email protected], [email protected]]
- Column: address_1
- Samples: [387 Wellington Ave., 75 W. Berkshire St., 36 Second St., 7607 Sunnyslope Street, 755 Galvin Street]
- Column: address_2
- Samples: [Unit 1, None, None, None, None]
- Column: city
- Samples: [Albuquerque, New York City, New York City, Indianapolis, Indianapolis]
- Column: state
- Samples: [NM, NY, NY, IN, IN]
- Column: zipcode
- Samples: [47246, 10040, 10162, 49047, 40852]
- Column: district_id
- Samples: [18, 1, 1, 5, 5]
- Table: district
- Column: district_id
- Samples: [1, 2, 3, 4, 5]
- Column: city
- Samples: [New York City, Jacksonville, Columbus, Charlotte, Indianapolis]
- Column: state_abbrev
- Samples: [NY, FL, OH, NC, IN]
- Column: division
- Samples: [Middle Atlantic, South Atlantic, East North Central, South Atlantic, East North Central]
- Table: events
- Column: Date received
- Samples: [2014-07-03, 2012-04-12, 2012-04-03, 2012-03-14, 2012-03-05]
- Column: Product
- Samples: [Bank account or service, Bank account or service, Bank account or service, Credit card, Bank account or service]
- Column: Sub-product
- Samples: [Checking account, Savings account, Checking account, None, Checking account]
- Column: Issue
- Samples: [Deposits and withdrawals, Account opening, closing, or management, Account opening, closing, or management, Billing disputes, Account opening, closing, or management]
- Column: Sub-issue
- Samples: [None, None, None, None, None]
- Column: Consumer complaint narrative
- Samples: [None, None, None, None, None]
- Column: Tags
- Samples: [None, None, None, None, None]
- Column: Consumer consent provided?
- Samples: [N/A, N/A, N/A, N/A, N/A]
- Column: Submitted via
- Samples: [Email, Email, Email, Email, Email]
- Column: Date sent to company
- Samples: [2014-07-09, 2012-04-13, 2012-04-03, 2012-03-14, 2012-03-06]
- Column: Company response to consumer
- Samples: [Closed with explanation, Closed with relief, Closed without relief, Closed with relief, Closed with relief]
- Column: Timely response?
- Samples: [Yes, Yes, Yes, Yes, Yes]
- Column: Consumer disputed?
- Samples: [No, No, No, No, No]
- Column: Complaint ID
- Samples: [CR0922485, CR0057298, CR0043811, CR0035411, CR0030939]
- Column: Client_ID
- Samples: [C00001925, C00003141, C00000297, C00004275, C00000900]
- Table: reviews
- Column: Date
- Samples: [2017-10-04, 2017-10-02, 2017-08-21, 2017-12-17, 2016-05-27]
- Column: Stars
- Samples: [5, 5, 5, 5, 5]
- Column: Reviews
- Samples: [Great job, Eagle National! Each person was professional and helped us ..., Matthew Richardson is professional and helpful. He helped us find the ..., We had a past experience with Eagle National Mortgage and would withou..., We have been dealing with Brad Thomka from the beginning of what start..., I can't express how grateful I am for the support that Zach provided t... (truncated)]
- Column: Product
- Samples: [Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage]
- Column: district_id
- Samples: [65, 66, 23, 55, 24]
| SELECT STRFTIME('%Y', T3.`Date received`) , CAST(SUM(CASE WHEN T3.`Company response to consumer` = 'Closed with explanation' THEN 1 ELSE 0 END) AS REAL) / COUNT(T3.`Complaint ID`) AS average 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.city = 'New Bedford' GROUP BY strftime('%Y', T3.`Date received`) |
|
Solve the following sql problem:
What percentage of consumers from Houston disputed complaints?
Schema:
SCHEMA:
- Table: state
- Column: StateCode
- Samples: [AL, AR, AZ, CA, CO]
- Column: State
- Samples: [Alabama, Arkansas, Arizona, California, Colorado]
- Column: Region
- Samples: [South, South, West, West, West]
- Table: callcenterlogs
- Column: Date received
- Samples: [2017-03-27, 2017-03-27, 2017-03-27, 2017-03-23, 2017-03-22]
- Column: Complaint ID
- Samples: [CR2406263, CR2405641, CR2405629, CR2400594, CR2399607]
- Column: rand client
- Samples: [C00004587, C00003328, C00001685, C00001945, C00004303]
- Column: phonefinal
- Samples: [977-806-9726, 322-598-7152, 508-311-5237, 265-394-2727, 206-008-0460]
- Column: vru+line
- Samples: [AA0103, AA0205, AA0110, AA0113, AA0102]
- Column: call_id
- Samples: [34536, 34537, 34538, 34540, 34541]
- Column: priority
- Samples: [0, 0, 2, 2, 1]
- Column: type
- Samples: [NW, PS, PS, PS, PS]
- Column: outcome
- Samples: [AGENT, AGENT, AGENT, AGENT, AGENT]
- Column: server
- Samples: [MICHAL, TOVA, YIFAT, AVNI, STEREN]
- Column: ser_start
- Samples: [13:34:11, 10:58:22, 13:00:54, 16:18:21, 14:48:22]
- Column: ser_exit
- Samples: [13:40:23, 11:16:10, 13:13:31, 16:19:40, 14:55:19]
- Column: ser_time
- Samples: [00:06:12, 00:17:48, 00:12:37, 00:01:19, 00:06:57]
- Table: client
- Column: client_id
- Samples: [C00000001, C00000002, C00000003, C00000004, C00000005]
- Column: sex
- Samples: [Female, Male, Female, Male, Female]
- Column: day
- Samples: [13, 4, 9, 1, 3]
- Column: month
- Samples: [12, 2, 10, 12, 7]
- Column: year
- Samples: [1990, 1965, 1960, 1976, 1980]
- Column: age
- Samples: [29, 54, 59, 43, 39]
- Column: social
- Samples: [926-93-2157, 806-94-5725, 614-70-9100, 580-20-3414, 536-14-5809]
- Column: first
- Samples: [Emma, Noah, Olivia, Liam, Sophia]
- Column: middle
- Samples: [Avaya, Everest, Brooklynne, Irvin, Danae]
- Column: last
- Samples: [Smith, Thompson, Johnson, White, Williams]
- Column: phone
- Samples: [367-171-6840, 212-423-7734, 212-425-6932, 951-567-8925, 428-265-1568]
- Column: email
- Samples: [[email protected], [email protected], [email protected], [email protected], [email protected]]
- Column: address_1
- Samples: [387 Wellington Ave., 75 W. Berkshire St., 36 Second St., 7607 Sunnyslope Street, 755 Galvin Street]
- Column: address_2
- Samples: [Unit 1, None, None, None, None]
- Column: city
- Samples: [Albuquerque, New York City, New York City, Indianapolis, Indianapolis]
- Column: state
- Samples: [NM, NY, NY, IN, IN]
- Column: zipcode
- Samples: [47246, 10040, 10162, 49047, 40852]
- Column: district_id
- Samples: [18, 1, 1, 5, 5]
- Table: district
- Column: district_id
- Samples: [1, 2, 3, 4, 5]
- Column: city
- Samples: [New York City, Jacksonville, Columbus, Charlotte, Indianapolis]
- Column: state_abbrev
- Samples: [NY, FL, OH, NC, IN]
- Column: division
- Samples: [Middle Atlantic, South Atlantic, East North Central, South Atlantic, East North Central]
- Table: events
- Column: Date received
- Samples: [2014-07-03, 2012-04-12, 2012-04-03, 2012-03-14, 2012-03-05]
- Column: Product
- Samples: [Bank account or service, Bank account or service, Bank account or service, Credit card, Bank account or service]
- Column: Sub-product
- Samples: [Checking account, Savings account, Checking account, None, Checking account]
- Column: Issue
- Samples: [Deposits and withdrawals, Account opening, closing, or management, Account opening, closing, or management, Billing disputes, Account opening, closing, or management]
- Column: Sub-issue
- Samples: [None, None, None, None, None]
- Column: Consumer complaint narrative
- Samples: [None, None, None, None, None]
- Column: Tags
- Samples: [None, None, None, None, None]
- Column: Consumer consent provided?
- Samples: [N/A, N/A, N/A, N/A, N/A]
- Column: Submitted via
- Samples: [Email, Email, Email, Email, Email]
- Column: Date sent to company
- Samples: [2014-07-09, 2012-04-13, 2012-04-03, 2012-03-14, 2012-03-06]
- Column: Company response to consumer
- Samples: [Closed with explanation, Closed with relief, Closed without relief, Closed with relief, Closed with relief]
- Column: Timely response?
- Samples: [Yes, Yes, Yes, Yes, Yes]
- Column: Consumer disputed?
- Samples: [No, No, No, No, No]
- Column: Complaint ID
- Samples: [CR0922485, CR0057298, CR0043811, CR0035411, CR0030939]
- Column: Client_ID
- Samples: [C00001925, C00003141, C00000297, C00004275, C00000900]
- Table: reviews
- Column: Date
- Samples: [2017-10-04, 2017-10-02, 2017-08-21, 2017-12-17, 2016-05-27]
- Column: Stars
- Samples: [5, 5, 5, 5, 5]
- Column: Reviews
- Samples: [Great job, Eagle National! Each person was professional and helped us ..., Matthew Richardson is professional and helpful. He helped us find the ..., We had a past experience with Eagle National Mortgage and would withou..., We have been dealing with Brad Thomka from the beginning of what start..., I can't express how grateful I am for the support that Zach provided t... (truncated)]
- Column: Product
- Samples: [Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage]
- Column: district_id
- Samples: [65, 66, 23, 55, 24]
| SELECT CAST(SUM(CASE WHEN T2.`Consumer disputed?` = 'Yes' AND T1.city = 'Houston' 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 |
|
Solve the following sql problem:
Find the number of service members who complained in Syracuse.
Schema:
SCHEMA:
- Table: state
- Column: StateCode
- Samples: [AL, AR, AZ, CA, CO]
- Column: State
- Samples: [Alabama, Arkansas, Arizona, California, Colorado]
- Column: Region
- Samples: [South, South, West, West, West]
- Table: callcenterlogs
- Column: Date received
- Samples: [2017-03-27, 2017-03-27, 2017-03-27, 2017-03-23, 2017-03-22]
- Column: Complaint ID
- Samples: [CR2406263, CR2405641, CR2405629, CR2400594, CR2399607]
- Column: rand client
- Samples: [C00004587, C00003328, C00001685, C00001945, C00004303]
- Column: phonefinal
- Samples: [977-806-9726, 322-598-7152, 508-311-5237, 265-394-2727, 206-008-0460]
- Column: vru+line
- Samples: [AA0103, AA0205, AA0110, AA0113, AA0102]
- Column: call_id
- Samples: [34536, 34537, 34538, 34540, 34541]
- Column: priority
- Samples: [0, 0, 2, 2, 1]
- Column: type
- Samples: [NW, PS, PS, PS, PS]
- Column: outcome
- Samples: [AGENT, AGENT, AGENT, AGENT, AGENT]
- Column: server
- Samples: [MICHAL, TOVA, YIFAT, AVNI, STEREN]
- Column: ser_start
- Samples: [13:34:11, 10:58:22, 13:00:54, 16:18:21, 14:48:22]
- Column: ser_exit
- Samples: [13:40:23, 11:16:10, 13:13:31, 16:19:40, 14:55:19]
- Column: ser_time
- Samples: [00:06:12, 00:17:48, 00:12:37, 00:01:19, 00:06:57]
- Table: client
- Column: client_id
- Samples: [C00000001, C00000002, C00000003, C00000004, C00000005]
- Column: sex
- Samples: [Female, Male, Female, Male, Female]
- Column: day
- Samples: [13, 4, 9, 1, 3]
- Column: month
- Samples: [12, 2, 10, 12, 7]
- Column: year
- Samples: [1990, 1965, 1960, 1976, 1980]
- Column: age
- Samples: [29, 54, 59, 43, 39]
- Column: social
- Samples: [926-93-2157, 806-94-5725, 614-70-9100, 580-20-3414, 536-14-5809]
- Column: first
- Samples: [Emma, Noah, Olivia, Liam, Sophia]
- Column: middle
- Samples: [Avaya, Everest, Brooklynne, Irvin, Danae]
- Column: last
- Samples: [Smith, Thompson, Johnson, White, Williams]
- Column: phone
- Samples: [367-171-6840, 212-423-7734, 212-425-6932, 951-567-8925, 428-265-1568]
- Column: email
- Samples: [[email protected], [email protected], [email protected], [email protected], [email protected]]
- Column: address_1
- Samples: [387 Wellington Ave., 75 W. Berkshire St., 36 Second St., 7607 Sunnyslope Street, 755 Galvin Street]
- Column: address_2
- Samples: [Unit 1, None, None, None, None]
- Column: city
- Samples: [Albuquerque, New York City, New York City, Indianapolis, Indianapolis]
- Column: state
- Samples: [NM, NY, NY, IN, IN]
- Column: zipcode
- Samples: [47246, 10040, 10162, 49047, 40852]
- Column: district_id
- Samples: [18, 1, 1, 5, 5]
- Table: district
- Column: district_id
- Samples: [1, 2, 3, 4, 5]
- Column: city
- Samples: [New York City, Jacksonville, Columbus, Charlotte, Indianapolis]
- Column: state_abbrev
- Samples: [NY, FL, OH, NC, IN]
- Column: division
- Samples: [Middle Atlantic, South Atlantic, East North Central, South Atlantic, East North Central]
- Table: events
- Column: Date received
- Samples: [2014-07-03, 2012-04-12, 2012-04-03, 2012-03-14, 2012-03-05]
- Column: Product
- Samples: [Bank account or service, Bank account or service, Bank account or service, Credit card, Bank account or service]
- Column: Sub-product
- Samples: [Checking account, Savings account, Checking account, None, Checking account]
- Column: Issue
- Samples: [Deposits and withdrawals, Account opening, closing, or management, Account opening, closing, or management, Billing disputes, Account opening, closing, or management]
- Column: Sub-issue
- Samples: [None, None, None, None, None]
- Column: Consumer complaint narrative
- Samples: [None, None, None, None, None]
- Column: Tags
- Samples: [None, None, None, None, None]
- Column: Consumer consent provided?
- Samples: [N/A, N/A, N/A, N/A, N/A]
- Column: Submitted via
- Samples: [Email, Email, Email, Email, Email]
- Column: Date sent to company
- Samples: [2014-07-09, 2012-04-13, 2012-04-03, 2012-03-14, 2012-03-06]
- Column: Company response to consumer
- Samples: [Closed with explanation, Closed with relief, Closed without relief, Closed with relief, Closed with relief]
- Column: Timely response?
- Samples: [Yes, Yes, Yes, Yes, Yes]
- Column: Consumer disputed?
- Samples: [No, No, No, No, No]
- Column: Complaint ID
- Samples: [CR0922485, CR0057298, CR0043811, CR0035411, CR0030939]
- Column: Client_ID
- Samples: [C00001925, C00003141, C00000297, C00004275, C00000900]
- Table: reviews
- Column: Date
- Samples: [2017-10-04, 2017-10-02, 2017-08-21, 2017-12-17, 2016-05-27]
- Column: Stars
- Samples: [5, 5, 5, 5, 5]
- Column: Reviews
- Samples: [Great job, Eagle National! Each person was professional and helped us ..., Matthew Richardson is professional and helpful. He helped us find the ..., We had a past experience with Eagle National Mortgage and would withou..., We have been dealing with Brad Thomka from the beginning of what start..., I can't express how grateful I am for the support that Zach provided t... (truncated)]
- Column: Product
- Samples: [Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage]
- Column: district_id
- Samples: [65, 66, 23, 55, 24]
| SELECT COUNT(T1.client_id) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.Tags = 'Servicemember' AND T1.city = 'Syracuse' |
|
Solve the following sql problem:
Among the calls from California, what percentage are priority 1?
Schema:
SCHEMA:
- Table: state
- Column: StateCode
- Samples: [AL, AR, AZ, CA, CO]
- Column: State
- Samples: [Alabama, Arkansas, Arizona, California, Colorado]
- Column: Region
- Samples: [South, South, West, West, West]
- Table: callcenterlogs
- Column: Date received
- Samples: [2017-03-27, 2017-03-27, 2017-03-27, 2017-03-23, 2017-03-22]
- Column: Complaint ID
- Samples: [CR2406263, CR2405641, CR2405629, CR2400594, CR2399607]
- Column: rand client
- Samples: [C00004587, C00003328, C00001685, C00001945, C00004303]
- Column: phonefinal
- Samples: [977-806-9726, 322-598-7152, 508-311-5237, 265-394-2727, 206-008-0460]
- Column: vru+line
- Samples: [AA0103, AA0205, AA0110, AA0113, AA0102]
- Column: call_id
- Samples: [34536, 34537, 34538, 34540, 34541]
- Column: priority
- Samples: [0, 0, 2, 2, 1]
- Column: type
- Samples: [NW, PS, PS, PS, PS]
- Column: outcome
- Samples: [AGENT, AGENT, AGENT, AGENT, AGENT]
- Column: server
- Samples: [MICHAL, TOVA, YIFAT, AVNI, STEREN]
- Column: ser_start
- Samples: [13:34:11, 10:58:22, 13:00:54, 16:18:21, 14:48:22]
- Column: ser_exit
- Samples: [13:40:23, 11:16:10, 13:13:31, 16:19:40, 14:55:19]
- Column: ser_time
- Samples: [00:06:12, 00:17:48, 00:12:37, 00:01:19, 00:06:57]
- Table: client
- Column: client_id
- Samples: [C00000001, C00000002, C00000003, C00000004, C00000005]
- Column: sex
- Samples: [Female, Male, Female, Male, Female]
- Column: day
- Samples: [13, 4, 9, 1, 3]
- Column: month
- Samples: [12, 2, 10, 12, 7]
- Column: year
- Samples: [1990, 1965, 1960, 1976, 1980]
- Column: age
- Samples: [29, 54, 59, 43, 39]
- Column: social
- Samples: [926-93-2157, 806-94-5725, 614-70-9100, 580-20-3414, 536-14-5809]
- Column: first
- Samples: [Emma, Noah, Olivia, Liam, Sophia]
- Column: middle
- Samples: [Avaya, Everest, Brooklynne, Irvin, Danae]
- Column: last
- Samples: [Smith, Thompson, Johnson, White, Williams]
- Column: phone
- Samples: [367-171-6840, 212-423-7734, 212-425-6932, 951-567-8925, 428-265-1568]
- Column: email
- Samples: [[email protected], [email protected], [email protected], [email protected], [email protected]]
- Column: address_1
- Samples: [387 Wellington Ave., 75 W. Berkshire St., 36 Second St., 7607 Sunnyslope Street, 755 Galvin Street]
- Column: address_2
- Samples: [Unit 1, None, None, None, None]
- Column: city
- Samples: [Albuquerque, New York City, New York City, Indianapolis, Indianapolis]
- Column: state
- Samples: [NM, NY, NY, IN, IN]
- Column: zipcode
- Samples: [47246, 10040, 10162, 49047, 40852]
- Column: district_id
- Samples: [18, 1, 1, 5, 5]
- Table: district
- Column: district_id
- Samples: [1, 2, 3, 4, 5]
- Column: city
- Samples: [New York City, Jacksonville, Columbus, Charlotte, Indianapolis]
- Column: state_abbrev
- Samples: [NY, FL, OH, NC, IN]
- Column: division
- Samples: [Middle Atlantic, South Atlantic, East North Central, South Atlantic, East North Central]
- Table: events
- Column: Date received
- Samples: [2014-07-03, 2012-04-12, 2012-04-03, 2012-03-14, 2012-03-05]
- Column: Product
- Samples: [Bank account or service, Bank account or service, Bank account or service, Credit card, Bank account or service]
- Column: Sub-product
- Samples: [Checking account, Savings account, Checking account, None, Checking account]
- Column: Issue
- Samples: [Deposits and withdrawals, Account opening, closing, or management, Account opening, closing, or management, Billing disputes, Account opening, closing, or management]
- Column: Sub-issue
- Samples: [None, None, None, None, None]
- Column: Consumer complaint narrative
- Samples: [None, None, None, None, None]
- Column: Tags
- Samples: [None, None, None, None, None]
- Column: Consumer consent provided?
- Samples: [N/A, N/A, N/A, N/A, N/A]
- Column: Submitted via
- Samples: [Email, Email, Email, Email, Email]
- Column: Date sent to company
- Samples: [2014-07-09, 2012-04-13, 2012-04-03, 2012-03-14, 2012-03-06]
- Column: Company response to consumer
- Samples: [Closed with explanation, Closed with relief, Closed without relief, Closed with relief, Closed with relief]
- Column: Timely response?
- Samples: [Yes, Yes, Yes, Yes, Yes]
- Column: Consumer disputed?
- Samples: [No, No, No, No, No]
- Column: Complaint ID
- Samples: [CR0922485, CR0057298, CR0043811, CR0035411, CR0030939]
- Column: Client_ID
- Samples: [C00001925, C00003141, C00000297, C00004275, C00000900]
- Table: reviews
- Column: Date
- Samples: [2017-10-04, 2017-10-02, 2017-08-21, 2017-12-17, 2016-05-27]
- Column: Stars
- Samples: [5, 5, 5, 5, 5]
- Column: Reviews
- Samples: [Great job, Eagle National! Each person was professional and helped us ..., Matthew Richardson is professional and helpful. He helped us find the ..., We had a past experience with Eagle National Mortgage and would withou..., We have been dealing with Brad Thomka from the beginning of what start..., I can't express how grateful I am for the support that Zach provided t... (truncated)]
- Column: Product
- Samples: [Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage]
- Column: district_id
- Samples: [65, 66, 23, 55, 24]
| SELECT CAST(SUM(CASE WHEN T1.priority = 1 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.priority) 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 T4.State = 'California' |
|
Solve the following sql problem:
Calculate the difference in the average age of elderly and middle-aged clients in the Northeast region.
Schema:
SCHEMA:
- Table: state
- Column: StateCode
- Samples: [AL, AR, AZ, CA, CO]
- Column: State
- Samples: [Alabama, Arkansas, Arizona, California, Colorado]
- Column: Region
- Samples: [South, South, West, West, West]
- Table: callcenterlogs
- Column: Date received
- Samples: [2017-03-27, 2017-03-27, 2017-03-27, 2017-03-23, 2017-03-22]
- Column: Complaint ID
- Samples: [CR2406263, CR2405641, CR2405629, CR2400594, CR2399607]
- Column: rand client
- Samples: [C00004587, C00003328, C00001685, C00001945, C00004303]
- Column: phonefinal
- Samples: [977-806-9726, 322-598-7152, 508-311-5237, 265-394-2727, 206-008-0460]
- Column: vru+line
- Samples: [AA0103, AA0205, AA0110, AA0113, AA0102]
- Column: call_id
- Samples: [34536, 34537, 34538, 34540, 34541]
- Column: priority
- Samples: [0, 0, 2, 2, 1]
- Column: type
- Samples: [NW, PS, PS, PS, PS]
- Column: outcome
- Samples: [AGENT, AGENT, AGENT, AGENT, AGENT]
- Column: server
- Samples: [MICHAL, TOVA, YIFAT, AVNI, STEREN]
- Column: ser_start
- Samples: [13:34:11, 10:58:22, 13:00:54, 16:18:21, 14:48:22]
- Column: ser_exit
- Samples: [13:40:23, 11:16:10, 13:13:31, 16:19:40, 14:55:19]
- Column: ser_time
- Samples: [00:06:12, 00:17:48, 00:12:37, 00:01:19, 00:06:57]
- Table: client
- Column: client_id
- Samples: [C00000001, C00000002, C00000003, C00000004, C00000005]
- Column: sex
- Samples: [Female, Male, Female, Male, Female]
- Column: day
- Samples: [13, 4, 9, 1, 3]
- Column: month
- Samples: [12, 2, 10, 12, 7]
- Column: year
- Samples: [1990, 1965, 1960, 1976, 1980]
- Column: age
- Samples: [29, 54, 59, 43, 39]
- Column: social
- Samples: [926-93-2157, 806-94-5725, 614-70-9100, 580-20-3414, 536-14-5809]
- Column: first
- Samples: [Emma, Noah, Olivia, Liam, Sophia]
- Column: middle
- Samples: [Avaya, Everest, Brooklynne, Irvin, Danae]
- Column: last
- Samples: [Smith, Thompson, Johnson, White, Williams]
- Column: phone
- Samples: [367-171-6840, 212-423-7734, 212-425-6932, 951-567-8925, 428-265-1568]
- Column: email
- Samples: [[email protected], [email protected], [email protected], [email protected], [email protected]]
- Column: address_1
- Samples: [387 Wellington Ave., 75 W. Berkshire St., 36 Second St., 7607 Sunnyslope Street, 755 Galvin Street]
- Column: address_2
- Samples: [Unit 1, None, None, None, None]
- Column: city
- Samples: [Albuquerque, New York City, New York City, Indianapolis, Indianapolis]
- Column: state
- Samples: [NM, NY, NY, IN, IN]
- Column: zipcode
- Samples: [47246, 10040, 10162, 49047, 40852]
- Column: district_id
- Samples: [18, 1, 1, 5, 5]
- Table: district
- Column: district_id
- Samples: [1, 2, 3, 4, 5]
- Column: city
- Samples: [New York City, Jacksonville, Columbus, Charlotte, Indianapolis]
- Column: state_abbrev
- Samples: [NY, FL, OH, NC, IN]
- Column: division
- Samples: [Middle Atlantic, South Atlantic, East North Central, South Atlantic, East North Central]
- Table: events
- Column: Date received
- Samples: [2014-07-03, 2012-04-12, 2012-04-03, 2012-03-14, 2012-03-05]
- Column: Product
- Samples: [Bank account or service, Bank account or service, Bank account or service, Credit card, Bank account or service]
- Column: Sub-product
- Samples: [Checking account, Savings account, Checking account, None, Checking account]
- Column: Issue
- Samples: [Deposits and withdrawals, Account opening, closing, or management, Account opening, closing, or management, Billing disputes, Account opening, closing, or management]
- Column: Sub-issue
- Samples: [None, None, None, None, None]
- Column: Consumer complaint narrative
- Samples: [None, None, None, None, None]
- Column: Tags
- Samples: [None, None, None, None, None]
- Column: Consumer consent provided?
- Samples: [N/A, N/A, N/A, N/A, N/A]
- Column: Submitted via
- Samples: [Email, Email, Email, Email, Email]
- Column: Date sent to company
- Samples: [2014-07-09, 2012-04-13, 2012-04-03, 2012-03-14, 2012-03-06]
- Column: Company response to consumer
- Samples: [Closed with explanation, Closed with relief, Closed without relief, Closed with relief, Closed with relief]
- Column: Timely response?
- Samples: [Yes, Yes, Yes, Yes, Yes]
- Column: Consumer disputed?
- Samples: [No, No, No, No, No]
- Column: Complaint ID
- Samples: [CR0922485, CR0057298, CR0043811, CR0035411, CR0030939]
- Column: Client_ID
- Samples: [C00001925, C00003141, C00000297, C00004275, C00000900]
- Table: reviews
- Column: Date
- Samples: [2017-10-04, 2017-10-02, 2017-08-21, 2017-12-17, 2016-05-27]
- Column: Stars
- Samples: [5, 5, 5, 5, 5]
- Column: Reviews
- Samples: [Great job, Eagle National! Each person was professional and helped us ..., Matthew Richardson is professional and helpful. He helped us find the ..., We had a past experience with Eagle National Mortgage and would withou..., We have been dealing with Brad Thomka from the beginning of what start..., I can't express how grateful I am for the support that Zach provided t... (truncated)]
- Column: Product
- Samples: [Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage]
- Column: district_id
- Samples: [65, 66, 23, 55, 24]
| SELECT (CAST(SUM(CASE WHEN T1.age BETWEEN 35 AND 55 THEN T1.age ELSE 0 END) AS REAL) / SUM(CASE WHEN T1.age BETWEEN 35 AND 55 THEN 1 ELSE 0 END)) - (CAST(SUM(CASE WHEN T1.age > 65 THEN T1.age ELSE 0 END) AS REAL) / SUM(CASE WHEN T1.age > 65 THEN 1 ELSE 0 END)) AS difference 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' |
|
Solve the following sql problem:
List by their ID number the 3 longest complaints.
Schema:
SCHEMA:
- Table: state
- Column: StateCode
- Samples: [AL, AR, AZ, CA, CO]
- Column: State
- Samples: [Alabama, Arkansas, Arizona, California, Colorado]
- Column: Region
- Samples: [South, South, West, West, West]
- Table: callcenterlogs
- Column: Date received
- Samples: [2017-03-27, 2017-03-27, 2017-03-27, 2017-03-23, 2017-03-22]
- Column: Complaint ID
- Samples: [CR2406263, CR2405641, CR2405629, CR2400594, CR2399607]
- Column: rand client
- Samples: [C00004587, C00003328, C00001685, C00001945, C00004303]
- Column: phonefinal
- Samples: [977-806-9726, 322-598-7152, 508-311-5237, 265-394-2727, 206-008-0460]
- Column: vru+line
- Samples: [AA0103, AA0205, AA0110, AA0113, AA0102]
- Column: call_id
- Samples: [34536, 34537, 34538, 34540, 34541]
- Column: priority
- Samples: [0, 0, 2, 2, 1]
- Column: type
- Samples: [NW, PS, PS, PS, PS]
- Column: outcome
- Samples: [AGENT, AGENT, AGENT, AGENT, AGENT]
- Column: server
- Samples: [MICHAL, TOVA, YIFAT, AVNI, STEREN]
- Column: ser_start
- Samples: [13:34:11, 10:58:22, 13:00:54, 16:18:21, 14:48:22]
- Column: ser_exit
- Samples: [13:40:23, 11:16:10, 13:13:31, 16:19:40, 14:55:19]
- Column: ser_time
- Samples: [00:06:12, 00:17:48, 00:12:37, 00:01:19, 00:06:57]
- Table: client
- Column: client_id
- Samples: [C00000001, C00000002, C00000003, C00000004, C00000005]
- Column: sex
- Samples: [Female, Male, Female, Male, Female]
- Column: day
- Samples: [13, 4, 9, 1, 3]
- Column: month
- Samples: [12, 2, 10, 12, 7]
- Column: year
- Samples: [1990, 1965, 1960, 1976, 1980]
- Column: age
- Samples: [29, 54, 59, 43, 39]
- Column: social
- Samples: [926-93-2157, 806-94-5725, 614-70-9100, 580-20-3414, 536-14-5809]
- Column: first
- Samples: [Emma, Noah, Olivia, Liam, Sophia]
- Column: middle
- Samples: [Avaya, Everest, Brooklynne, Irvin, Danae]
- Column: last
- Samples: [Smith, Thompson, Johnson, White, Williams]
- Column: phone
- Samples: [367-171-6840, 212-423-7734, 212-425-6932, 951-567-8925, 428-265-1568]
- Column: email
- Samples: [[email protected], [email protected], [email protected], [email protected], [email protected]]
- Column: address_1
- Samples: [387 Wellington Ave., 75 W. Berkshire St., 36 Second St., 7607 Sunnyslope Street, 755 Galvin Street]
- Column: address_2
- Samples: [Unit 1, None, None, None, None]
- Column: city
- Samples: [Albuquerque, New York City, New York City, Indianapolis, Indianapolis]
- Column: state
- Samples: [NM, NY, NY, IN, IN]
- Column: zipcode
- Samples: [47246, 10040, 10162, 49047, 40852]
- Column: district_id
- Samples: [18, 1, 1, 5, 5]
- Table: district
- Column: district_id
- Samples: [1, 2, 3, 4, 5]
- Column: city
- Samples: [New York City, Jacksonville, Columbus, Charlotte, Indianapolis]
- Column: state_abbrev
- Samples: [NY, FL, OH, NC, IN]
- Column: division
- Samples: [Middle Atlantic, South Atlantic, East North Central, South Atlantic, East North Central]
- Table: events
- Column: Date received
- Samples: [2014-07-03, 2012-04-12, 2012-04-03, 2012-03-14, 2012-03-05]
- Column: Product
- Samples: [Bank account or service, Bank account or service, Bank account or service, Credit card, Bank account or service]
- Column: Sub-product
- Samples: [Checking account, Savings account, Checking account, None, Checking account]
- Column: Issue
- Samples: [Deposits and withdrawals, Account opening, closing, or management, Account opening, closing, or management, Billing disputes, Account opening, closing, or management]
- Column: Sub-issue
- Samples: [None, None, None, None, None]
- Column: Consumer complaint narrative
- Samples: [None, None, None, None, None]
- Column: Tags
- Samples: [None, None, None, None, None]
- Column: Consumer consent provided?
- Samples: [N/A, N/A, N/A, N/A, N/A]
- Column: Submitted via
- Samples: [Email, Email, Email, Email, Email]
- Column: Date sent to company
- Samples: [2014-07-09, 2012-04-13, 2012-04-03, 2012-03-14, 2012-03-06]
- Column: Company response to consumer
- Samples: [Closed with explanation, Closed with relief, Closed without relief, Closed with relief, Closed with relief]
- Column: Timely response?
- Samples: [Yes, Yes, Yes, Yes, Yes]
- Column: Consumer disputed?
- Samples: [No, No, No, No, No]
- Column: Complaint ID
- Samples: [CR0922485, CR0057298, CR0043811, CR0035411, CR0030939]
- Column: Client_ID
- Samples: [C00001925, C00003141, C00000297, C00004275, C00000900]
- Table: reviews
- Column: Date
- Samples: [2017-10-04, 2017-10-02, 2017-08-21, 2017-12-17, 2016-05-27]
- Column: Stars
- Samples: [5, 5, 5, 5, 5]
- Column: Reviews
- Samples: [Great job, Eagle National! Each person was professional and helped us ..., Matthew Richardson is professional and helpful. He helped us find the ..., We had a past experience with Eagle National Mortgage and would withou..., We have been dealing with Brad Thomka from the beginning of what start..., I can't express how grateful I am for the support that Zach provided t... (truncated)]
- Column: Product
- Samples: [Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage]
- Column: district_id
- Samples: [65, 66, 23, 55, 24]
| SELECT `Complaint ID` FROM callcenterlogs ORDER BY ser_time DESC LIMIT 3 |
|
Solve the following sql problem:
How many clients have an email account other than gmail.com?
Schema:
SCHEMA:
- Table: state
- Column: StateCode
- Samples: [AL, AR, AZ, CA, CO]
- Column: State
- Samples: [Alabama, Arkansas, Arizona, California, Colorado]
- Column: Region
- Samples: [South, South, West, West, West]
- Table: callcenterlogs
- Column: Date received
- Samples: [2017-03-27, 2017-03-27, 2017-03-27, 2017-03-23, 2017-03-22]
- Column: Complaint ID
- Samples: [CR2406263, CR2405641, CR2405629, CR2400594, CR2399607]
- Column: rand client
- Samples: [C00004587, C00003328, C00001685, C00001945, C00004303]
- Column: phonefinal
- Samples: [977-806-9726, 322-598-7152, 508-311-5237, 265-394-2727, 206-008-0460]
- Column: vru+line
- Samples: [AA0103, AA0205, AA0110, AA0113, AA0102]
- Column: call_id
- Samples: [34536, 34537, 34538, 34540, 34541]
- Column: priority
- Samples: [0, 0, 2, 2, 1]
- Column: type
- Samples: [NW, PS, PS, PS, PS]
- Column: outcome
- Samples: [AGENT, AGENT, AGENT, AGENT, AGENT]
- Column: server
- Samples: [MICHAL, TOVA, YIFAT, AVNI, STEREN]
- Column: ser_start
- Samples: [13:34:11, 10:58:22, 13:00:54, 16:18:21, 14:48:22]
- Column: ser_exit
- Samples: [13:40:23, 11:16:10, 13:13:31, 16:19:40, 14:55:19]
- Column: ser_time
- Samples: [00:06:12, 00:17:48, 00:12:37, 00:01:19, 00:06:57]
- Table: client
- Column: client_id
- Samples: [C00000001, C00000002, C00000003, C00000004, C00000005]
- Column: sex
- Samples: [Female, Male, Female, Male, Female]
- Column: day
- Samples: [13, 4, 9, 1, 3]
- Column: month
- Samples: [12, 2, 10, 12, 7]
- Column: year
- Samples: [1990, 1965, 1960, 1976, 1980]
- Column: age
- Samples: [29, 54, 59, 43, 39]
- Column: social
- Samples: [926-93-2157, 806-94-5725, 614-70-9100, 580-20-3414, 536-14-5809]
- Column: first
- Samples: [Emma, Noah, Olivia, Liam, Sophia]
- Column: middle
- Samples: [Avaya, Everest, Brooklynne, Irvin, Danae]
- Column: last
- Samples: [Smith, Thompson, Johnson, White, Williams]
- Column: phone
- Samples: [367-171-6840, 212-423-7734, 212-425-6932, 951-567-8925, 428-265-1568]
- Column: email
- Samples: [[email protected], [email protected], [email protected], [email protected], [email protected]]
- Column: address_1
- Samples: [387 Wellington Ave., 75 W. Berkshire St., 36 Second St., 7607 Sunnyslope Street, 755 Galvin Street]
- Column: address_2
- Samples: [Unit 1, None, None, None, None]
- Column: city
- Samples: [Albuquerque, New York City, New York City, Indianapolis, Indianapolis]
- Column: state
- Samples: [NM, NY, NY, IN, IN]
- Column: zipcode
- Samples: [47246, 10040, 10162, 49047, 40852]
- Column: district_id
- Samples: [18, 1, 1, 5, 5]
- Table: district
- Column: district_id
- Samples: [1, 2, 3, 4, 5]
- Column: city
- Samples: [New York City, Jacksonville, Columbus, Charlotte, Indianapolis]
- Column: state_abbrev
- Samples: [NY, FL, OH, NC, IN]
- Column: division
- Samples: [Middle Atlantic, South Atlantic, East North Central, South Atlantic, East North Central]
- Table: events
- Column: Date received
- Samples: [2014-07-03, 2012-04-12, 2012-04-03, 2012-03-14, 2012-03-05]
- Column: Product
- Samples: [Bank account or service, Bank account or service, Bank account or service, Credit card, Bank account or service]
- Column: Sub-product
- Samples: [Checking account, Savings account, Checking account, None, Checking account]
- Column: Issue
- Samples: [Deposits and withdrawals, Account opening, closing, or management, Account opening, closing, or management, Billing disputes, Account opening, closing, or management]
- Column: Sub-issue
- Samples: [None, None, None, None, None]
- Column: Consumer complaint narrative
- Samples: [None, None, None, None, None]
- Column: Tags
- Samples: [None, None, None, None, None]
- Column: Consumer consent provided?
- Samples: [N/A, N/A, N/A, N/A, N/A]
- Column: Submitted via
- Samples: [Email, Email, Email, Email, Email]
- Column: Date sent to company
- Samples: [2014-07-09, 2012-04-13, 2012-04-03, 2012-03-14, 2012-03-06]
- Column: Company response to consumer
- Samples: [Closed with explanation, Closed with relief, Closed without relief, Closed with relief, Closed with relief]
- Column: Timely response?
- Samples: [Yes, Yes, Yes, Yes, Yes]
- Column: Consumer disputed?
- Samples: [No, No, No, No, No]
- Column: Complaint ID
- Samples: [CR0922485, CR0057298, CR0043811, CR0035411, CR0030939]
- Column: Client_ID
- Samples: [C00001925, C00003141, C00000297, C00004275, C00000900]
- Table: reviews
- Column: Date
- Samples: [2017-10-04, 2017-10-02, 2017-08-21, 2017-12-17, 2016-05-27]
- Column: Stars
- Samples: [5, 5, 5, 5, 5]
- Column: Reviews
- Samples: [Great job, Eagle National! Each person was professional and helped us ..., Matthew Richardson is professional and helpful. He helped us find the ..., We had a past experience with Eagle National Mortgage and would withou..., We have been dealing with Brad Thomka from the beginning of what start..., I can't express how grateful I am for the support that Zach provided t... (truncated)]
- Column: Product
- Samples: [Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage]
- Column: district_id
- Samples: [65, 66, 23, 55, 24]
| SELECT COUNT(email) FROM client WHERE email NOT LIKE '%@gmail.com' |
|
Solve the following sql problem:
Identify by their ID all clients who did not give their consent permission.
Schema:
SCHEMA:
- Table: state
- Column: StateCode
- Samples: [AL, AR, AZ, CA, CO]
- Column: State
- Samples: [Alabama, Arkansas, Arizona, California, Colorado]
- Column: Region
- Samples: [South, South, West, West, West]
- Table: callcenterlogs
- Column: Date received
- Samples: [2017-03-27, 2017-03-27, 2017-03-27, 2017-03-23, 2017-03-22]
- Column: Complaint ID
- Samples: [CR2406263, CR2405641, CR2405629, CR2400594, CR2399607]
- Column: rand client
- Samples: [C00004587, C00003328, C00001685, C00001945, C00004303]
- Column: phonefinal
- Samples: [977-806-9726, 322-598-7152, 508-311-5237, 265-394-2727, 206-008-0460]
- Column: vru+line
- Samples: [AA0103, AA0205, AA0110, AA0113, AA0102]
- Column: call_id
- Samples: [34536, 34537, 34538, 34540, 34541]
- Column: priority
- Samples: [0, 0, 2, 2, 1]
- Column: type
- Samples: [NW, PS, PS, PS, PS]
- Column: outcome
- Samples: [AGENT, AGENT, AGENT, AGENT, AGENT]
- Column: server
- Samples: [MICHAL, TOVA, YIFAT, AVNI, STEREN]
- Column: ser_start
- Samples: [13:34:11, 10:58:22, 13:00:54, 16:18:21, 14:48:22]
- Column: ser_exit
- Samples: [13:40:23, 11:16:10, 13:13:31, 16:19:40, 14:55:19]
- Column: ser_time
- Samples: [00:06:12, 00:17:48, 00:12:37, 00:01:19, 00:06:57]
- Table: client
- Column: client_id
- Samples: [C00000001, C00000002, C00000003, C00000004, C00000005]
- Column: sex
- Samples: [Female, Male, Female, Male, Female]
- Column: day
- Samples: [13, 4, 9, 1, 3]
- Column: month
- Samples: [12, 2, 10, 12, 7]
- Column: year
- Samples: [1990, 1965, 1960, 1976, 1980]
- Column: age
- Samples: [29, 54, 59, 43, 39]
- Column: social
- Samples: [926-93-2157, 806-94-5725, 614-70-9100, 580-20-3414, 536-14-5809]
- Column: first
- Samples: [Emma, Noah, Olivia, Liam, Sophia]
- Column: middle
- Samples: [Avaya, Everest, Brooklynne, Irvin, Danae]
- Column: last
- Samples: [Smith, Thompson, Johnson, White, Williams]
- Column: phone
- Samples: [367-171-6840, 212-423-7734, 212-425-6932, 951-567-8925, 428-265-1568]
- Column: email
- Samples: [[email protected], [email protected], [email protected], [email protected], [email protected]]
- Column: address_1
- Samples: [387 Wellington Ave., 75 W. Berkshire St., 36 Second St., 7607 Sunnyslope Street, 755 Galvin Street]
- Column: address_2
- Samples: [Unit 1, None, None, None, None]
- Column: city
- Samples: [Albuquerque, New York City, New York City, Indianapolis, Indianapolis]
- Column: state
- Samples: [NM, NY, NY, IN, IN]
- Column: zipcode
- Samples: [47246, 10040, 10162, 49047, 40852]
- Column: district_id
- Samples: [18, 1, 1, 5, 5]
- Table: district
- Column: district_id
- Samples: [1, 2, 3, 4, 5]
- Column: city
- Samples: [New York City, Jacksonville, Columbus, Charlotte, Indianapolis]
- Column: state_abbrev
- Samples: [NY, FL, OH, NC, IN]
- Column: division
- Samples: [Middle Atlantic, South Atlantic, East North Central, South Atlantic, East North Central]
- Table: events
- Column: Date received
- Samples: [2014-07-03, 2012-04-12, 2012-04-03, 2012-03-14, 2012-03-05]
- Column: Product
- Samples: [Bank account or service, Bank account or service, Bank account or service, Credit card, Bank account or service]
- Column: Sub-product
- Samples: [Checking account, Savings account, Checking account, None, Checking account]
- Column: Issue
- Samples: [Deposits and withdrawals, Account opening, closing, or management, Account opening, closing, or management, Billing disputes, Account opening, closing, or management]
- Column: Sub-issue
- Samples: [None, None, None, None, None]
- Column: Consumer complaint narrative
- Samples: [None, None, None, None, None]
- Column: Tags
- Samples: [None, None, None, None, None]
- Column: Consumer consent provided?
- Samples: [N/A, N/A, N/A, N/A, N/A]
- Column: Submitted via
- Samples: [Email, Email, Email, Email, Email]
- Column: Date sent to company
- Samples: [2014-07-09, 2012-04-13, 2012-04-03, 2012-03-14, 2012-03-06]
- Column: Company response to consumer
- Samples: [Closed with explanation, Closed with relief, Closed without relief, Closed with relief, Closed with relief]
- Column: Timely response?
- Samples: [Yes, Yes, Yes, Yes, Yes]
- Column: Consumer disputed?
- Samples: [No, No, No, No, No]
- Column: Complaint ID
- Samples: [CR0922485, CR0057298, CR0043811, CR0035411, CR0030939]
- Column: Client_ID
- Samples: [C00001925, C00003141, C00000297, C00004275, C00000900]
- Table: reviews
- Column: Date
- Samples: [2017-10-04, 2017-10-02, 2017-08-21, 2017-12-17, 2016-05-27]
- Column: Stars
- Samples: [5, 5, 5, 5, 5]
- Column: Reviews
- Samples: [Great job, Eagle National! Each person was professional and helped us ..., Matthew Richardson is professional and helpful. He helped us find the ..., We had a past experience with Eagle National Mortgage and would withou..., We have been dealing with Brad Thomka from the beginning of what start..., I can't express how grateful I am for the support that Zach provided t... (truncated)]
- Column: Product
- Samples: [Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage]
- Column: district_id
- Samples: [65, 66, 23, 55, 24]
| SELECT Client_ID FROM events WHERE `Consumer consent provided?` = 'N/A' OR 'Consumer consent provided?' IS NULL OR 'Consumer consent provided?' = '' |
|
Solve the following sql problem:
List by their ID the complaints received by the company on 25/09/2014 that took the longest.
Schema:
SCHEMA:
- Table: state
- Column: StateCode
- Samples: [AL, AR, AZ, CA, CO]
- Column: State
- Samples: [Alabama, Arkansas, Arizona, California, Colorado]
- Column: Region
- Samples: [South, South, West, West, West]
- Table: callcenterlogs
- Column: Date received
- Samples: [2017-03-27, 2017-03-27, 2017-03-27, 2017-03-23, 2017-03-22]
- Column: Complaint ID
- Samples: [CR2406263, CR2405641, CR2405629, CR2400594, CR2399607]
- Column: rand client
- Samples: [C00004587, C00003328, C00001685, C00001945, C00004303]
- Column: phonefinal
- Samples: [977-806-9726, 322-598-7152, 508-311-5237, 265-394-2727, 206-008-0460]
- Column: vru+line
- Samples: [AA0103, AA0205, AA0110, AA0113, AA0102]
- Column: call_id
- Samples: [34536, 34537, 34538, 34540, 34541]
- Column: priority
- Samples: [0, 0, 2, 2, 1]
- Column: type
- Samples: [NW, PS, PS, PS, PS]
- Column: outcome
- Samples: [AGENT, AGENT, AGENT, AGENT, AGENT]
- Column: server
- Samples: [MICHAL, TOVA, YIFAT, AVNI, STEREN]
- Column: ser_start
- Samples: [13:34:11, 10:58:22, 13:00:54, 16:18:21, 14:48:22]
- Column: ser_exit
- Samples: [13:40:23, 11:16:10, 13:13:31, 16:19:40, 14:55:19]
- Column: ser_time
- Samples: [00:06:12, 00:17:48, 00:12:37, 00:01:19, 00:06:57]
- Table: client
- Column: client_id
- Samples: [C00000001, C00000002, C00000003, C00000004, C00000005]
- Column: sex
- Samples: [Female, Male, Female, Male, Female]
- Column: day
- Samples: [13, 4, 9, 1, 3]
- Column: month
- Samples: [12, 2, 10, 12, 7]
- Column: year
- Samples: [1990, 1965, 1960, 1976, 1980]
- Column: age
- Samples: [29, 54, 59, 43, 39]
- Column: social
- Samples: [926-93-2157, 806-94-5725, 614-70-9100, 580-20-3414, 536-14-5809]
- Column: first
- Samples: [Emma, Noah, Olivia, Liam, Sophia]
- Column: middle
- Samples: [Avaya, Everest, Brooklynne, Irvin, Danae]
- Column: last
- Samples: [Smith, Thompson, Johnson, White, Williams]
- Column: phone
- Samples: [367-171-6840, 212-423-7734, 212-425-6932, 951-567-8925, 428-265-1568]
- Column: email
- Samples: [[email protected], [email protected], [email protected], [email protected], [email protected]]
- Column: address_1
- Samples: [387 Wellington Ave., 75 W. Berkshire St., 36 Second St., 7607 Sunnyslope Street, 755 Galvin Street]
- Column: address_2
- Samples: [Unit 1, None, None, None, None]
- Column: city
- Samples: [Albuquerque, New York City, New York City, Indianapolis, Indianapolis]
- Column: state
- Samples: [NM, NY, NY, IN, IN]
- Column: zipcode
- Samples: [47246, 10040, 10162, 49047, 40852]
- Column: district_id
- Samples: [18, 1, 1, 5, 5]
- Table: district
- Column: district_id
- Samples: [1, 2, 3, 4, 5]
- Column: city
- Samples: [New York City, Jacksonville, Columbus, Charlotte, Indianapolis]
- Column: state_abbrev
- Samples: [NY, FL, OH, NC, IN]
- Column: division
- Samples: [Middle Atlantic, South Atlantic, East North Central, South Atlantic, East North Central]
- Table: events
- Column: Date received
- Samples: [2014-07-03, 2012-04-12, 2012-04-03, 2012-03-14, 2012-03-05]
- Column: Product
- Samples: [Bank account or service, Bank account or service, Bank account or service, Credit card, Bank account or service]
- Column: Sub-product
- Samples: [Checking account, Savings account, Checking account, None, Checking account]
- Column: Issue
- Samples: [Deposits and withdrawals, Account opening, closing, or management, Account opening, closing, or management, Billing disputes, Account opening, closing, or management]
- Column: Sub-issue
- Samples: [None, None, None, None, None]
- Column: Consumer complaint narrative
- Samples: [None, None, None, None, None]
- Column: Tags
- Samples: [None, None, None, None, None]
- Column: Consumer consent provided?
- Samples: [N/A, N/A, N/A, N/A, N/A]
- Column: Submitted via
- Samples: [Email, Email, Email, Email, Email]
- Column: Date sent to company
- Samples: [2014-07-09, 2012-04-13, 2012-04-03, 2012-03-14, 2012-03-06]
- Column: Company response to consumer
- Samples: [Closed with explanation, Closed with relief, Closed without relief, Closed with relief, Closed with relief]
- Column: Timely response?
- Samples: [Yes, Yes, Yes, Yes, Yes]
- Column: Consumer disputed?
- Samples: [No, No, No, No, No]
- Column: Complaint ID
- Samples: [CR0922485, CR0057298, CR0043811, CR0035411, CR0030939]
- Column: Client_ID
- Samples: [C00001925, C00003141, C00000297, C00004275, C00000900]
- Table: reviews
- Column: Date
- Samples: [2017-10-04, 2017-10-02, 2017-08-21, 2017-12-17, 2016-05-27]
- Column: Stars
- Samples: [5, 5, 5, 5, 5]
- Column: Reviews
- Samples: [Great job, Eagle National! Each person was professional and helped us ..., Matthew Richardson is professional and helpful. He helped us find the ..., We had a past experience with Eagle National Mortgage and would withou..., We have been dealing with Brad Thomka from the beginning of what start..., I can't express how grateful I am for the support that Zach provided t... (truncated)]
- Column: Product
- Samples: [Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage]
- Column: district_id
- Samples: [65, 66, 23, 55, 24]
| SELECT `Complaint ID` FROM events WHERE strftime('%J', `Date sent to company`) - strftime('%J', `Date received`) = ( SELECT MAX(strftime('%J', `Date sent to company`) - strftime('%J', `Date received`)) FROM events WHERE `Date sent to company` = '2014-09-25' ) AND `Date sent to company` = '2014-09-25' |
|
Solve the following sql problem:
List priority 2 complaints by date received.
Schema:
SCHEMA:
- Table: state
- Column: StateCode
- Samples: [AL, AR, AZ, CA, CO]
- Column: State
- Samples: [Alabama, Arkansas, Arizona, California, Colorado]
- Column: Region
- Samples: [South, South, West, West, West]
- Table: callcenterlogs
- Column: Date received
- Samples: [2017-03-27, 2017-03-27, 2017-03-27, 2017-03-23, 2017-03-22]
- Column: Complaint ID
- Samples: [CR2406263, CR2405641, CR2405629, CR2400594, CR2399607]
- Column: rand client
- Samples: [C00004587, C00003328, C00001685, C00001945, C00004303]
- Column: phonefinal
- Samples: [977-806-9726, 322-598-7152, 508-311-5237, 265-394-2727, 206-008-0460]
- Column: vru+line
- Samples: [AA0103, AA0205, AA0110, AA0113, AA0102]
- Column: call_id
- Samples: [34536, 34537, 34538, 34540, 34541]
- Column: priority
- Samples: [0, 0, 2, 2, 1]
- Column: type
- Samples: [NW, PS, PS, PS, PS]
- Column: outcome
- Samples: [AGENT, AGENT, AGENT, AGENT, AGENT]
- Column: server
- Samples: [MICHAL, TOVA, YIFAT, AVNI, STEREN]
- Column: ser_start
- Samples: [13:34:11, 10:58:22, 13:00:54, 16:18:21, 14:48:22]
- Column: ser_exit
- Samples: [13:40:23, 11:16:10, 13:13:31, 16:19:40, 14:55:19]
- Column: ser_time
- Samples: [00:06:12, 00:17:48, 00:12:37, 00:01:19, 00:06:57]
- Table: client
- Column: client_id
- Samples: [C00000001, C00000002, C00000003, C00000004, C00000005]
- Column: sex
- Samples: [Female, Male, Female, Male, Female]
- Column: day
- Samples: [13, 4, 9, 1, 3]
- Column: month
- Samples: [12, 2, 10, 12, 7]
- Column: year
- Samples: [1990, 1965, 1960, 1976, 1980]
- Column: age
- Samples: [29, 54, 59, 43, 39]
- Column: social
- Samples: [926-93-2157, 806-94-5725, 614-70-9100, 580-20-3414, 536-14-5809]
- Column: first
- Samples: [Emma, Noah, Olivia, Liam, Sophia]
- Column: middle
- Samples: [Avaya, Everest, Brooklynne, Irvin, Danae]
- Column: last
- Samples: [Smith, Thompson, Johnson, White, Williams]
- Column: phone
- Samples: [367-171-6840, 212-423-7734, 212-425-6932, 951-567-8925, 428-265-1568]
- Column: email
- Samples: [[email protected], [email protected], [email protected], [email protected], [email protected]]
- Column: address_1
- Samples: [387 Wellington Ave., 75 W. Berkshire St., 36 Second St., 7607 Sunnyslope Street, 755 Galvin Street]
- Column: address_2
- Samples: [Unit 1, None, None, None, None]
- Column: city
- Samples: [Albuquerque, New York City, New York City, Indianapolis, Indianapolis]
- Column: state
- Samples: [NM, NY, NY, IN, IN]
- Column: zipcode
- Samples: [47246, 10040, 10162, 49047, 40852]
- Column: district_id
- Samples: [18, 1, 1, 5, 5]
- Table: district
- Column: district_id
- Samples: [1, 2, 3, 4, 5]
- Column: city
- Samples: [New York City, Jacksonville, Columbus, Charlotte, Indianapolis]
- Column: state_abbrev
- Samples: [NY, FL, OH, NC, IN]
- Column: division
- Samples: [Middle Atlantic, South Atlantic, East North Central, South Atlantic, East North Central]
- Table: events
- Column: Date received
- Samples: [2014-07-03, 2012-04-12, 2012-04-03, 2012-03-14, 2012-03-05]
- Column: Product
- Samples: [Bank account or service, Bank account or service, Bank account or service, Credit card, Bank account or service]
- Column: Sub-product
- Samples: [Checking account, Savings account, Checking account, None, Checking account]
- Column: Issue
- Samples: [Deposits and withdrawals, Account opening, closing, or management, Account opening, closing, or management, Billing disputes, Account opening, closing, or management]
- Column: Sub-issue
- Samples: [None, None, None, None, None]
- Column: Consumer complaint narrative
- Samples: [None, None, None, None, None]
- Column: Tags
- Samples: [None, None, None, None, None]
- Column: Consumer consent provided?
- Samples: [N/A, N/A, N/A, N/A, N/A]
- Column: Submitted via
- Samples: [Email, Email, Email, Email, Email]
- Column: Date sent to company
- Samples: [2014-07-09, 2012-04-13, 2012-04-03, 2012-03-14, 2012-03-06]
- Column: Company response to consumer
- Samples: [Closed with explanation, Closed with relief, Closed without relief, Closed with relief, Closed with relief]
- Column: Timely response?
- Samples: [Yes, Yes, Yes, Yes, Yes]
- Column: Consumer disputed?
- Samples: [No, No, No, No, No]
- Column: Complaint ID
- Samples: [CR0922485, CR0057298, CR0043811, CR0035411, CR0030939]
- Column: Client_ID
- Samples: [C00001925, C00003141, C00000297, C00004275, C00000900]
- Table: reviews
- Column: Date
- Samples: [2017-10-04, 2017-10-02, 2017-08-21, 2017-12-17, 2016-05-27]
- Column: Stars
- Samples: [5, 5, 5, 5, 5]
- Column: Reviews
- Samples: [Great job, Eagle National! Each person was professional and helped us ..., Matthew Richardson is professional and helpful. He helped us find the ..., We had a past experience with Eagle National Mortgage and would withou..., We have been dealing with Brad Thomka from the beginning of what start..., I can't express how grateful I am for the support that Zach provided t... (truncated)]
- Column: Product
- Samples: [Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage]
- Column: district_id
- Samples: [65, 66, 23, 55, 24]
| SELECT DISTINCT `Complaint ID` FROM callcenterlogs WHERE priority = 2 ORDER BY `Date received` DESC |
|
Solve the following sql problem:
How many complaints are not in process with an agent?
Schema:
SCHEMA:
- Table: state
- Column: StateCode
- Samples: [AL, AR, AZ, CA, CO]
- Column: State
- Samples: [Alabama, Arkansas, Arizona, California, Colorado]
- Column: Region
- Samples: [South, South, West, West, West]
- Table: callcenterlogs
- Column: Date received
- Samples: [2017-03-27, 2017-03-27, 2017-03-27, 2017-03-23, 2017-03-22]
- Column: Complaint ID
- Samples: [CR2406263, CR2405641, CR2405629, CR2400594, CR2399607]
- Column: rand client
- Samples: [C00004587, C00003328, C00001685, C00001945, C00004303]
- Column: phonefinal
- Samples: [977-806-9726, 322-598-7152, 508-311-5237, 265-394-2727, 206-008-0460]
- Column: vru+line
- Samples: [AA0103, AA0205, AA0110, AA0113, AA0102]
- Column: call_id
- Samples: [34536, 34537, 34538, 34540, 34541]
- Column: priority
- Samples: [0, 0, 2, 2, 1]
- Column: type
- Samples: [NW, PS, PS, PS, PS]
- Column: outcome
- Samples: [AGENT, AGENT, AGENT, AGENT, AGENT]
- Column: server
- Samples: [MICHAL, TOVA, YIFAT, AVNI, STEREN]
- Column: ser_start
- Samples: [13:34:11, 10:58:22, 13:00:54, 16:18:21, 14:48:22]
- Column: ser_exit
- Samples: [13:40:23, 11:16:10, 13:13:31, 16:19:40, 14:55:19]
- Column: ser_time
- Samples: [00:06:12, 00:17:48, 00:12:37, 00:01:19, 00:06:57]
- Table: client
- Column: client_id
- Samples: [C00000001, C00000002, C00000003, C00000004, C00000005]
- Column: sex
- Samples: [Female, Male, Female, Male, Female]
- Column: day
- Samples: [13, 4, 9, 1, 3]
- Column: month
- Samples: [12, 2, 10, 12, 7]
- Column: year
- Samples: [1990, 1965, 1960, 1976, 1980]
- Column: age
- Samples: [29, 54, 59, 43, 39]
- Column: social
- Samples: [926-93-2157, 806-94-5725, 614-70-9100, 580-20-3414, 536-14-5809]
- Column: first
- Samples: [Emma, Noah, Olivia, Liam, Sophia]
- Column: middle
- Samples: [Avaya, Everest, Brooklynne, Irvin, Danae]
- Column: last
- Samples: [Smith, Thompson, Johnson, White, Williams]
- Column: phone
- Samples: [367-171-6840, 212-423-7734, 212-425-6932, 951-567-8925, 428-265-1568]
- Column: email
- Samples: [[email protected], [email protected], [email protected], [email protected], [email protected]]
- Column: address_1
- Samples: [387 Wellington Ave., 75 W. Berkshire St., 36 Second St., 7607 Sunnyslope Street, 755 Galvin Street]
- Column: address_2
- Samples: [Unit 1, None, None, None, None]
- Column: city
- Samples: [Albuquerque, New York City, New York City, Indianapolis, Indianapolis]
- Column: state
- Samples: [NM, NY, NY, IN, IN]
- Column: zipcode
- Samples: [47246, 10040, 10162, 49047, 40852]
- Column: district_id
- Samples: [18, 1, 1, 5, 5]
- Table: district
- Column: district_id
- Samples: [1, 2, 3, 4, 5]
- Column: city
- Samples: [New York City, Jacksonville, Columbus, Charlotte, Indianapolis]
- Column: state_abbrev
- Samples: [NY, FL, OH, NC, IN]
- Column: division
- Samples: [Middle Atlantic, South Atlantic, East North Central, South Atlantic, East North Central]
- Table: events
- Column: Date received
- Samples: [2014-07-03, 2012-04-12, 2012-04-03, 2012-03-14, 2012-03-05]
- Column: Product
- Samples: [Bank account or service, Bank account or service, Bank account or service, Credit card, Bank account or service]
- Column: Sub-product
- Samples: [Checking account, Savings account, Checking account, None, Checking account]
- Column: Issue
- Samples: [Deposits and withdrawals, Account opening, closing, or management, Account opening, closing, or management, Billing disputes, Account opening, closing, or management]
- Column: Sub-issue
- Samples: [None, None, None, None, None]
- Column: Consumer complaint narrative
- Samples: [None, None, None, None, None]
- Column: Tags
- Samples: [None, None, None, None, None]
- Column: Consumer consent provided?
- Samples: [N/A, N/A, N/A, N/A, N/A]
- Column: Submitted via
- Samples: [Email, Email, Email, Email, Email]
- Column: Date sent to company
- Samples: [2014-07-09, 2012-04-13, 2012-04-03, 2012-03-14, 2012-03-06]
- Column: Company response to consumer
- Samples: [Closed with explanation, Closed with relief, Closed without relief, Closed with relief, Closed with relief]
- Column: Timely response?
- Samples: [Yes, Yes, Yes, Yes, Yes]
- Column: Consumer disputed?
- Samples: [No, No, No, No, No]
- Column: Complaint ID
- Samples: [CR0922485, CR0057298, CR0043811, CR0035411, CR0030939]
- Column: Client_ID
- Samples: [C00001925, C00003141, C00000297, C00004275, C00000900]
- Table: reviews
- Column: Date
- Samples: [2017-10-04, 2017-10-02, 2017-08-21, 2017-12-17, 2016-05-27]
- Column: Stars
- Samples: [5, 5, 5, 5, 5]
- Column: Reviews
- Samples: [Great job, Eagle National! Each person was professional and helped us ..., Matthew Richardson is professional and helpful. He helped us find the ..., We had a past experience with Eagle National Mortgage and would withou..., We have been dealing with Brad Thomka from the beginning of what start..., I can't express how grateful I am for the support that Zach provided t... (truncated)]
- Column: Product
- Samples: [Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage]
- Column: district_id
- Samples: [65, 66, 23, 55, 24]
| SELECT COUNT(outcome) FROM callcenterlogs WHERE outcome != 'AGENT' |
|
Solve the following sql problem:
How many Credit Card complaints did Sharon handle?
Schema:
SCHEMA:
- Table: state
- Column: StateCode
- Samples: [AL, AR, AZ, CA, CO]
- Column: State
- Samples: [Alabama, Arkansas, Arizona, California, Colorado]
- Column: Region
- Samples: [South, South, West, West, West]
- Table: callcenterlogs
- Column: Date received
- Samples: [2017-03-27, 2017-03-27, 2017-03-27, 2017-03-23, 2017-03-22]
- Column: Complaint ID
- Samples: [CR2406263, CR2405641, CR2405629, CR2400594, CR2399607]
- Column: rand client
- Samples: [C00004587, C00003328, C00001685, C00001945, C00004303]
- Column: phonefinal
- Samples: [977-806-9726, 322-598-7152, 508-311-5237, 265-394-2727, 206-008-0460]
- Column: vru+line
- Samples: [AA0103, AA0205, AA0110, AA0113, AA0102]
- Column: call_id
- Samples: [34536, 34537, 34538, 34540, 34541]
- Column: priority
- Samples: [0, 0, 2, 2, 1]
- Column: type
- Samples: [NW, PS, PS, PS, PS]
- Column: outcome
- Samples: [AGENT, AGENT, AGENT, AGENT, AGENT]
- Column: server
- Samples: [MICHAL, TOVA, YIFAT, AVNI, STEREN]
- Column: ser_start
- Samples: [13:34:11, 10:58:22, 13:00:54, 16:18:21, 14:48:22]
- Column: ser_exit
- Samples: [13:40:23, 11:16:10, 13:13:31, 16:19:40, 14:55:19]
- Column: ser_time
- Samples: [00:06:12, 00:17:48, 00:12:37, 00:01:19, 00:06:57]
- Table: client
- Column: client_id
- Samples: [C00000001, C00000002, C00000003, C00000004, C00000005]
- Column: sex
- Samples: [Female, Male, Female, Male, Female]
- Column: day
- Samples: [13, 4, 9, 1, 3]
- Column: month
- Samples: [12, 2, 10, 12, 7]
- Column: year
- Samples: [1990, 1965, 1960, 1976, 1980]
- Column: age
- Samples: [29, 54, 59, 43, 39]
- Column: social
- Samples: [926-93-2157, 806-94-5725, 614-70-9100, 580-20-3414, 536-14-5809]
- Column: first
- Samples: [Emma, Noah, Olivia, Liam, Sophia]
- Column: middle
- Samples: [Avaya, Everest, Brooklynne, Irvin, Danae]
- Column: last
- Samples: [Smith, Thompson, Johnson, White, Williams]
- Column: phone
- Samples: [367-171-6840, 212-423-7734, 212-425-6932, 951-567-8925, 428-265-1568]
- Column: email
- Samples: [[email protected], [email protected], [email protected], [email protected], [email protected]]
- Column: address_1
- Samples: [387 Wellington Ave., 75 W. Berkshire St., 36 Second St., 7607 Sunnyslope Street, 755 Galvin Street]
- Column: address_2
- Samples: [Unit 1, None, None, None, None]
- Column: city
- Samples: [Albuquerque, New York City, New York City, Indianapolis, Indianapolis]
- Column: state
- Samples: [NM, NY, NY, IN, IN]
- Column: zipcode
- Samples: [47246, 10040, 10162, 49047, 40852]
- Column: district_id
- Samples: [18, 1, 1, 5, 5]
- Table: district
- Column: district_id
- Samples: [1, 2, 3, 4, 5]
- Column: city
- Samples: [New York City, Jacksonville, Columbus, Charlotte, Indianapolis]
- Column: state_abbrev
- Samples: [NY, FL, OH, NC, IN]
- Column: division
- Samples: [Middle Atlantic, South Atlantic, East North Central, South Atlantic, East North Central]
- Table: events
- Column: Date received
- Samples: [2014-07-03, 2012-04-12, 2012-04-03, 2012-03-14, 2012-03-05]
- Column: Product
- Samples: [Bank account or service, Bank account or service, Bank account or service, Credit card, Bank account or service]
- Column: Sub-product
- Samples: [Checking account, Savings account, Checking account, None, Checking account]
- Column: Issue
- Samples: [Deposits and withdrawals, Account opening, closing, or management, Account opening, closing, or management, Billing disputes, Account opening, closing, or management]
- Column: Sub-issue
- Samples: [None, None, None, None, None]
- Column: Consumer complaint narrative
- Samples: [None, None, None, None, None]
- Column: Tags
- Samples: [None, None, None, None, None]
- Column: Consumer consent provided?
- Samples: [N/A, N/A, N/A, N/A, N/A]
- Column: Submitted via
- Samples: [Email, Email, Email, Email, Email]
- Column: Date sent to company
- Samples: [2014-07-09, 2012-04-13, 2012-04-03, 2012-03-14, 2012-03-06]
- Column: Company response to consumer
- Samples: [Closed with explanation, Closed with relief, Closed without relief, Closed with relief, Closed with relief]
- Column: Timely response?
- Samples: [Yes, Yes, Yes, Yes, Yes]
- Column: Consumer disputed?
- Samples: [No, No, No, No, No]
- Column: Complaint ID
- Samples: [CR0922485, CR0057298, CR0043811, CR0035411, CR0030939]
- Column: Client_ID
- Samples: [C00001925, C00003141, C00000297, C00004275, C00000900]
- Table: reviews
- Column: Date
- Samples: [2017-10-04, 2017-10-02, 2017-08-21, 2017-12-17, 2016-05-27]
- Column: Stars
- Samples: [5, 5, 5, 5, 5]
- Column: Reviews
- Samples: [Great job, Eagle National! Each person was professional and helped us ..., Matthew Richardson is professional and helpful. He helped us find the ..., We had a past experience with Eagle National Mortgage and would withou..., We have been dealing with Brad Thomka from the beginning of what start..., I can't express how grateful I am for the support that Zach provided t... (truncated)]
- Column: Product
- Samples: [Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage]
- Column: district_id
- Samples: [65, 66, 23, 55, 24]
| SELECT COUNT(T1.`Complaint ID`) FROM callcenterlogs AS T1 INNER JOIN events AS T2 ON T1.`Complaint ID` = T2.`Complaint ID` WHERE T2.Product = 'Credit card' AND T1.server = 'SHARON' |
|
Solve the following sql problem:
In which region have the most 1-star reviews been done?
Schema:
SCHEMA:
- Table: state
- Column: StateCode
- Samples: [AL, AR, AZ, CA, CO]
- Column: State
- Samples: [Alabama, Arkansas, Arizona, California, Colorado]
- Column: Region
- Samples: [South, South, West, West, West]
- Table: callcenterlogs
- Column: Date received
- Samples: [2017-03-27, 2017-03-27, 2017-03-27, 2017-03-23, 2017-03-22]
- Column: Complaint ID
- Samples: [CR2406263, CR2405641, CR2405629, CR2400594, CR2399607]
- Column: rand client
- Samples: [C00004587, C00003328, C00001685, C00001945, C00004303]
- Column: phonefinal
- Samples: [977-806-9726, 322-598-7152, 508-311-5237, 265-394-2727, 206-008-0460]
- Column: vru+line
- Samples: [AA0103, AA0205, AA0110, AA0113, AA0102]
- Column: call_id
- Samples: [34536, 34537, 34538, 34540, 34541]
- Column: priority
- Samples: [0, 0, 2, 2, 1]
- Column: type
- Samples: [NW, PS, PS, PS, PS]
- Column: outcome
- Samples: [AGENT, AGENT, AGENT, AGENT, AGENT]
- Column: server
- Samples: [MICHAL, TOVA, YIFAT, AVNI, STEREN]
- Column: ser_start
- Samples: [13:34:11, 10:58:22, 13:00:54, 16:18:21, 14:48:22]
- Column: ser_exit
- Samples: [13:40:23, 11:16:10, 13:13:31, 16:19:40, 14:55:19]
- Column: ser_time
- Samples: [00:06:12, 00:17:48, 00:12:37, 00:01:19, 00:06:57]
- Table: client
- Column: client_id
- Samples: [C00000001, C00000002, C00000003, C00000004, C00000005]
- Column: sex
- Samples: [Female, Male, Female, Male, Female]
- Column: day
- Samples: [13, 4, 9, 1, 3]
- Column: month
- Samples: [12, 2, 10, 12, 7]
- Column: year
- Samples: [1990, 1965, 1960, 1976, 1980]
- Column: age
- Samples: [29, 54, 59, 43, 39]
- Column: social
- Samples: [926-93-2157, 806-94-5725, 614-70-9100, 580-20-3414, 536-14-5809]
- Column: first
- Samples: [Emma, Noah, Olivia, Liam, Sophia]
- Column: middle
- Samples: [Avaya, Everest, Brooklynne, Irvin, Danae]
- Column: last
- Samples: [Smith, Thompson, Johnson, White, Williams]
- Column: phone
- Samples: [367-171-6840, 212-423-7734, 212-425-6932, 951-567-8925, 428-265-1568]
- Column: email
- Samples: [[email protected], [email protected], [email protected], [email protected], [email protected]]
- Column: address_1
- Samples: [387 Wellington Ave., 75 W. Berkshire St., 36 Second St., 7607 Sunnyslope Street, 755 Galvin Street]
- Column: address_2
- Samples: [Unit 1, None, None, None, None]
- Column: city
- Samples: [Albuquerque, New York City, New York City, Indianapolis, Indianapolis]
- Column: state
- Samples: [NM, NY, NY, IN, IN]
- Column: zipcode
- Samples: [47246, 10040, 10162, 49047, 40852]
- Column: district_id
- Samples: [18, 1, 1, 5, 5]
- Table: district
- Column: district_id
- Samples: [1, 2, 3, 4, 5]
- Column: city
- Samples: [New York City, Jacksonville, Columbus, Charlotte, Indianapolis]
- Column: state_abbrev
- Samples: [NY, FL, OH, NC, IN]
- Column: division
- Samples: [Middle Atlantic, South Atlantic, East North Central, South Atlantic, East North Central]
- Table: events
- Column: Date received
- Samples: [2014-07-03, 2012-04-12, 2012-04-03, 2012-03-14, 2012-03-05]
- Column: Product
- Samples: [Bank account or service, Bank account or service, Bank account or service, Credit card, Bank account or service]
- Column: Sub-product
- Samples: [Checking account, Savings account, Checking account, None, Checking account]
- Column: Issue
- Samples: [Deposits and withdrawals, Account opening, closing, or management, Account opening, closing, or management, Billing disputes, Account opening, closing, or management]
- Column: Sub-issue
- Samples: [None, None, None, None, None]
- Column: Consumer complaint narrative
- Samples: [None, None, None, None, None]
- Column: Tags
- Samples: [None, None, None, None, None]
- Column: Consumer consent provided?
- Samples: [N/A, N/A, N/A, N/A, N/A]
- Column: Submitted via
- Samples: [Email, Email, Email, Email, Email]
- Column: Date sent to company
- Samples: [2014-07-09, 2012-04-13, 2012-04-03, 2012-03-14, 2012-03-06]
- Column: Company response to consumer
- Samples: [Closed with explanation, Closed with relief, Closed without relief, Closed with relief, Closed with relief]
- Column: Timely response?
- Samples: [Yes, Yes, Yes, Yes, Yes]
- Column: Consumer disputed?
- Samples: [No, No, No, No, No]
- Column: Complaint ID
- Samples: [CR0922485, CR0057298, CR0043811, CR0035411, CR0030939]
- Column: Client_ID
- Samples: [C00001925, C00003141, C00000297, C00004275, C00000900]
- Table: reviews
- Column: Date
- Samples: [2017-10-04, 2017-10-02, 2017-08-21, 2017-12-17, 2016-05-27]
- Column: Stars
- Samples: [5, 5, 5, 5, 5]
- Column: Reviews
- Samples: [Great job, Eagle National! Each person was professional and helped us ..., Matthew Richardson is professional and helpful. He helped us find the ..., We had a past experience with Eagle National Mortgage and would withou..., We have been dealing with Brad Thomka from the beginning of what start..., I can't express how grateful I am for the support that Zach provided t... (truncated)]
- Column: Product
- Samples: [Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage]
- Column: district_id
- Samples: [65, 66, 23, 55, 24]
| SELECT T3.Region FROM reviews 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.Stars = 1 GROUP BY T3.Region ORDER BY COUNT(T3.Region) DESC LIMIT 1 |
|
Solve the following sql problem:
In what years were the clients who demanded more problems with Certificate of deposit born?
Schema:
SCHEMA:
- Table: state
- Column: StateCode
- Samples: [AL, AR, AZ, CA, CO]
- Column: State
- Samples: [Alabama, Arkansas, Arizona, California, Colorado]
- Column: Region
- Samples: [South, South, West, West, West]
- Table: callcenterlogs
- Column: Date received
- Samples: [2017-03-27, 2017-03-27, 2017-03-27, 2017-03-23, 2017-03-22]
- Column: Complaint ID
- Samples: [CR2406263, CR2405641, CR2405629, CR2400594, CR2399607]
- Column: rand client
- Samples: [C00004587, C00003328, C00001685, C00001945, C00004303]
- Column: phonefinal
- Samples: [977-806-9726, 322-598-7152, 508-311-5237, 265-394-2727, 206-008-0460]
- Column: vru+line
- Samples: [AA0103, AA0205, AA0110, AA0113, AA0102]
- Column: call_id
- Samples: [34536, 34537, 34538, 34540, 34541]
- Column: priority
- Samples: [0, 0, 2, 2, 1]
- Column: type
- Samples: [NW, PS, PS, PS, PS]
- Column: outcome
- Samples: [AGENT, AGENT, AGENT, AGENT, AGENT]
- Column: server
- Samples: [MICHAL, TOVA, YIFAT, AVNI, STEREN]
- Column: ser_start
- Samples: [13:34:11, 10:58:22, 13:00:54, 16:18:21, 14:48:22]
- Column: ser_exit
- Samples: [13:40:23, 11:16:10, 13:13:31, 16:19:40, 14:55:19]
- Column: ser_time
- Samples: [00:06:12, 00:17:48, 00:12:37, 00:01:19, 00:06:57]
- Table: client
- Column: client_id
- Samples: [C00000001, C00000002, C00000003, C00000004, C00000005]
- Column: sex
- Samples: [Female, Male, Female, Male, Female]
- Column: day
- Samples: [13, 4, 9, 1, 3]
- Column: month
- Samples: [12, 2, 10, 12, 7]
- Column: year
- Samples: [1990, 1965, 1960, 1976, 1980]
- Column: age
- Samples: [29, 54, 59, 43, 39]
- Column: social
- Samples: [926-93-2157, 806-94-5725, 614-70-9100, 580-20-3414, 536-14-5809]
- Column: first
- Samples: [Emma, Noah, Olivia, Liam, Sophia]
- Column: middle
- Samples: [Avaya, Everest, Brooklynne, Irvin, Danae]
- Column: last
- Samples: [Smith, Thompson, Johnson, White, Williams]
- Column: phone
- Samples: [367-171-6840, 212-423-7734, 212-425-6932, 951-567-8925, 428-265-1568]
- Column: email
- Samples: [[email protected], [email protected], [email protected], [email protected], [email protected]]
- Column: address_1
- Samples: [387 Wellington Ave., 75 W. Berkshire St., 36 Second St., 7607 Sunnyslope Street, 755 Galvin Street]
- Column: address_2
- Samples: [Unit 1, None, None, None, None]
- Column: city
- Samples: [Albuquerque, New York City, New York City, Indianapolis, Indianapolis]
- Column: state
- Samples: [NM, NY, NY, IN, IN]
- Column: zipcode
- Samples: [47246, 10040, 10162, 49047, 40852]
- Column: district_id
- Samples: [18, 1, 1, 5, 5]
- Table: district
- Column: district_id
- Samples: [1, 2, 3, 4, 5]
- Column: city
- Samples: [New York City, Jacksonville, Columbus, Charlotte, Indianapolis]
- Column: state_abbrev
- Samples: [NY, FL, OH, NC, IN]
- Column: division
- Samples: [Middle Atlantic, South Atlantic, East North Central, South Atlantic, East North Central]
- Table: events
- Column: Date received
- Samples: [2014-07-03, 2012-04-12, 2012-04-03, 2012-03-14, 2012-03-05]
- Column: Product
- Samples: [Bank account or service, Bank account or service, Bank account or service, Credit card, Bank account or service]
- Column: Sub-product
- Samples: [Checking account, Savings account, Checking account, None, Checking account]
- Column: Issue
- Samples: [Deposits and withdrawals, Account opening, closing, or management, Account opening, closing, or management, Billing disputes, Account opening, closing, or management]
- Column: Sub-issue
- Samples: [None, None, None, None, None]
- Column: Consumer complaint narrative
- Samples: [None, None, None, None, None]
- Column: Tags
- Samples: [None, None, None, None, None]
- Column: Consumer consent provided?
- Samples: [N/A, N/A, N/A, N/A, N/A]
- Column: Submitted via
- Samples: [Email, Email, Email, Email, Email]
- Column: Date sent to company
- Samples: [2014-07-09, 2012-04-13, 2012-04-03, 2012-03-14, 2012-03-06]
- Column: Company response to consumer
- Samples: [Closed with explanation, Closed with relief, Closed without relief, Closed with relief, Closed with relief]
- Column: Timely response?
- Samples: [Yes, Yes, Yes, Yes, Yes]
- Column: Consumer disputed?
- Samples: [No, No, No, No, No]
- Column: Complaint ID
- Samples: [CR0922485, CR0057298, CR0043811, CR0035411, CR0030939]
- Column: Client_ID
- Samples: [C00001925, C00003141, C00000297, C00004275, C00000900]
- Table: reviews
- Column: Date
- Samples: [2017-10-04, 2017-10-02, 2017-08-21, 2017-12-17, 2016-05-27]
- Column: Stars
- Samples: [5, 5, 5, 5, 5]
- Column: Reviews
- Samples: [Great job, Eagle National! Each person was professional and helped us ..., Matthew Richardson is professional and helpful. He helped us find the ..., We had a past experience with Eagle National Mortgage and would withou..., We have been dealing with Brad Thomka from the beginning of what start..., I can't express how grateful I am for the support that Zach provided t... (truncated)]
- Column: Product
- Samples: [Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage]
- Column: district_id
- Samples: [65, 66, 23, 55, 24]
| SELECT T1.year FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Sub-product` = '(CD) Certificate of deposit' GROUP BY T1.year ORDER BY COUNT(T1.year) DESC LIMIT 1 |
|
Solve the following sql problem:
How many cases of billing dispute issues occurred in the Mountain division?
Schema:
SCHEMA:
- Table: state
- Column: StateCode
- Samples: [AL, AR, AZ, CA, CO]
- Column: State
- Samples: [Alabama, Arkansas, Arizona, California, Colorado]
- Column: Region
- Samples: [South, South, West, West, West]
- Table: callcenterlogs
- Column: Date received
- Samples: [2017-03-27, 2017-03-27, 2017-03-27, 2017-03-23, 2017-03-22]
- Column: Complaint ID
- Samples: [CR2406263, CR2405641, CR2405629, CR2400594, CR2399607]
- Column: rand client
- Samples: [C00004587, C00003328, C00001685, C00001945, C00004303]
- Column: phonefinal
- Samples: [977-806-9726, 322-598-7152, 508-311-5237, 265-394-2727, 206-008-0460]
- Column: vru+line
- Samples: [AA0103, AA0205, AA0110, AA0113, AA0102]
- Column: call_id
- Samples: [34536, 34537, 34538, 34540, 34541]
- Column: priority
- Samples: [0, 0, 2, 2, 1]
- Column: type
- Samples: [NW, PS, PS, PS, PS]
- Column: outcome
- Samples: [AGENT, AGENT, AGENT, AGENT, AGENT]
- Column: server
- Samples: [MICHAL, TOVA, YIFAT, AVNI, STEREN]
- Column: ser_start
- Samples: [13:34:11, 10:58:22, 13:00:54, 16:18:21, 14:48:22]
- Column: ser_exit
- Samples: [13:40:23, 11:16:10, 13:13:31, 16:19:40, 14:55:19]
- Column: ser_time
- Samples: [00:06:12, 00:17:48, 00:12:37, 00:01:19, 00:06:57]
- Table: client
- Column: client_id
- Samples: [C00000001, C00000002, C00000003, C00000004, C00000005]
- Column: sex
- Samples: [Female, Male, Female, Male, Female]
- Column: day
- Samples: [13, 4, 9, 1, 3]
- Column: month
- Samples: [12, 2, 10, 12, 7]
- Column: year
- Samples: [1990, 1965, 1960, 1976, 1980]
- Column: age
- Samples: [29, 54, 59, 43, 39]
- Column: social
- Samples: [926-93-2157, 806-94-5725, 614-70-9100, 580-20-3414, 536-14-5809]
- Column: first
- Samples: [Emma, Noah, Olivia, Liam, Sophia]
- Column: middle
- Samples: [Avaya, Everest, Brooklynne, Irvin, Danae]
- Column: last
- Samples: [Smith, Thompson, Johnson, White, Williams]
- Column: phone
- Samples: [367-171-6840, 212-423-7734, 212-425-6932, 951-567-8925, 428-265-1568]
- Column: email
- Samples: [[email protected], [email protected], [email protected], [email protected], [email protected]]
- Column: address_1
- Samples: [387 Wellington Ave., 75 W. Berkshire St., 36 Second St., 7607 Sunnyslope Street, 755 Galvin Street]
- Column: address_2
- Samples: [Unit 1, None, None, None, None]
- Column: city
- Samples: [Albuquerque, New York City, New York City, Indianapolis, Indianapolis]
- Column: state
- Samples: [NM, NY, NY, IN, IN]
- Column: zipcode
- Samples: [47246, 10040, 10162, 49047, 40852]
- Column: district_id
- Samples: [18, 1, 1, 5, 5]
- Table: district
- Column: district_id
- Samples: [1, 2, 3, 4, 5]
- Column: city
- Samples: [New York City, Jacksonville, Columbus, Charlotte, Indianapolis]
- Column: state_abbrev
- Samples: [NY, FL, OH, NC, IN]
- Column: division
- Samples: [Middle Atlantic, South Atlantic, East North Central, South Atlantic, East North Central]
- Table: events
- Column: Date received
- Samples: [2014-07-03, 2012-04-12, 2012-04-03, 2012-03-14, 2012-03-05]
- Column: Product
- Samples: [Bank account or service, Bank account or service, Bank account or service, Credit card, Bank account or service]
- Column: Sub-product
- Samples: [Checking account, Savings account, Checking account, None, Checking account]
- Column: Issue
- Samples: [Deposits and withdrawals, Account opening, closing, or management, Account opening, closing, or management, Billing disputes, Account opening, closing, or management]
- Column: Sub-issue
- Samples: [None, None, None, None, None]
- Column: Consumer complaint narrative
- Samples: [None, None, None, None, None]
- Column: Tags
- Samples: [None, None, None, None, None]
- Column: Consumer consent provided?
- Samples: [N/A, N/A, N/A, N/A, N/A]
- Column: Submitted via
- Samples: [Email, Email, Email, Email, Email]
- Column: Date sent to company
- Samples: [2014-07-09, 2012-04-13, 2012-04-03, 2012-03-14, 2012-03-06]
- Column: Company response to consumer
- Samples: [Closed with explanation, Closed with relief, Closed without relief, Closed with relief, Closed with relief]
- Column: Timely response?
- Samples: [Yes, Yes, Yes, Yes, Yes]
- Column: Consumer disputed?
- Samples: [No, No, No, No, No]
- Column: Complaint ID
- Samples: [CR0922485, CR0057298, CR0043811, CR0035411, CR0030939]
- Column: Client_ID
- Samples: [C00001925, C00003141, C00000297, C00004275, C00000900]
- Table: reviews
- Column: Date
- Samples: [2017-10-04, 2017-10-02, 2017-08-21, 2017-12-17, 2016-05-27]
- Column: Stars
- Samples: [5, 5, 5, 5, 5]
- Column: Reviews
- Samples: [Great job, Eagle National! Each person was professional and helped us ..., Matthew Richardson is professional and helpful. He helped us find the ..., We had a past experience with Eagle National Mortgage and would withou..., We have been dealing with Brad Thomka from the beginning of what start..., I can't express how grateful I am for the support that Zach provided t... (truncated)]
- Column: Product
- Samples: [Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage]
- Column: district_id
- Samples: [65, 66, 23, 55, 24]
| SELECT COUNT(T1.Issue) FROM events AS T1 INNER JOIN client AS T2 ON T1.Client_ID = T2.client_id INNER JOIN district AS T3 ON T2.district_id = T3.district_id WHERE T1.Issue = 'Billing disputes' AND T3.division = 'Mountain' |
|
Solve the following sql problem:
How many male clients are from the state of Massachusetts?
Schema:
SCHEMA:
- Table: state
- Column: StateCode
- Samples: [AL, AR, AZ, CA, CO]
- Column: State
- Samples: [Alabama, Arkansas, Arizona, California, Colorado]
- Column: Region
- Samples: [South, South, West, West, West]
- Table: callcenterlogs
- Column: Date received
- Samples: [2017-03-27, 2017-03-27, 2017-03-27, 2017-03-23, 2017-03-22]
- Column: Complaint ID
- Samples: [CR2406263, CR2405641, CR2405629, CR2400594, CR2399607]
- Column: rand client
- Samples: [C00004587, C00003328, C00001685, C00001945, C00004303]
- Column: phonefinal
- Samples: [977-806-9726, 322-598-7152, 508-311-5237, 265-394-2727, 206-008-0460]
- Column: vru+line
- Samples: [AA0103, AA0205, AA0110, AA0113, AA0102]
- Column: call_id
- Samples: [34536, 34537, 34538, 34540, 34541]
- Column: priority
- Samples: [0, 0, 2, 2, 1]
- Column: type
- Samples: [NW, PS, PS, PS, PS]
- Column: outcome
- Samples: [AGENT, AGENT, AGENT, AGENT, AGENT]
- Column: server
- Samples: [MICHAL, TOVA, YIFAT, AVNI, STEREN]
- Column: ser_start
- Samples: [13:34:11, 10:58:22, 13:00:54, 16:18:21, 14:48:22]
- Column: ser_exit
- Samples: [13:40:23, 11:16:10, 13:13:31, 16:19:40, 14:55:19]
- Column: ser_time
- Samples: [00:06:12, 00:17:48, 00:12:37, 00:01:19, 00:06:57]
- Table: client
- Column: client_id
- Samples: [C00000001, C00000002, C00000003, C00000004, C00000005]
- Column: sex
- Samples: [Female, Male, Female, Male, Female]
- Column: day
- Samples: [13, 4, 9, 1, 3]
- Column: month
- Samples: [12, 2, 10, 12, 7]
- Column: year
- Samples: [1990, 1965, 1960, 1976, 1980]
- Column: age
- Samples: [29, 54, 59, 43, 39]
- Column: social
- Samples: [926-93-2157, 806-94-5725, 614-70-9100, 580-20-3414, 536-14-5809]
- Column: first
- Samples: [Emma, Noah, Olivia, Liam, Sophia]
- Column: middle
- Samples: [Avaya, Everest, Brooklynne, Irvin, Danae]
- Column: last
- Samples: [Smith, Thompson, Johnson, White, Williams]
- Column: phone
- Samples: [367-171-6840, 212-423-7734, 212-425-6932, 951-567-8925, 428-265-1568]
- Column: email
- Samples: [[email protected], [email protected], [email protected], [email protected], [email protected]]
- Column: address_1
- Samples: [387 Wellington Ave., 75 W. Berkshire St., 36 Second St., 7607 Sunnyslope Street, 755 Galvin Street]
- Column: address_2
- Samples: [Unit 1, None, None, None, None]
- Column: city
- Samples: [Albuquerque, New York City, New York City, Indianapolis, Indianapolis]
- Column: state
- Samples: [NM, NY, NY, IN, IN]
- Column: zipcode
- Samples: [47246, 10040, 10162, 49047, 40852]
- Column: district_id
- Samples: [18, 1, 1, 5, 5]
- Table: district
- Column: district_id
- Samples: [1, 2, 3, 4, 5]
- Column: city
- Samples: [New York City, Jacksonville, Columbus, Charlotte, Indianapolis]
- Column: state_abbrev
- Samples: [NY, FL, OH, NC, IN]
- Column: division
- Samples: [Middle Atlantic, South Atlantic, East North Central, South Atlantic, East North Central]
- Table: events
- Column: Date received
- Samples: [2014-07-03, 2012-04-12, 2012-04-03, 2012-03-14, 2012-03-05]
- Column: Product
- Samples: [Bank account or service, Bank account or service, Bank account or service, Credit card, Bank account or service]
- Column: Sub-product
- Samples: [Checking account, Savings account, Checking account, None, Checking account]
- Column: Issue
- Samples: [Deposits and withdrawals, Account opening, closing, or management, Account opening, closing, or management, Billing disputes, Account opening, closing, or management]
- Column: Sub-issue
- Samples: [None, None, None, None, None]
- Column: Consumer complaint narrative
- Samples: [None, None, None, None, None]
- Column: Tags
- Samples: [None, None, None, None, None]
- Column: Consumer consent provided?
- Samples: [N/A, N/A, N/A, N/A, N/A]
- Column: Submitted via
- Samples: [Email, Email, Email, Email, Email]
- Column: Date sent to company
- Samples: [2014-07-09, 2012-04-13, 2012-04-03, 2012-03-14, 2012-03-06]
- Column: Company response to consumer
- Samples: [Closed with explanation, Closed with relief, Closed without relief, Closed with relief, Closed with relief]
- Column: Timely response?
- Samples: [Yes, Yes, Yes, Yes, Yes]
- Column: Consumer disputed?
- Samples: [No, No, No, No, No]
- Column: Complaint ID
- Samples: [CR0922485, CR0057298, CR0043811, CR0035411, CR0030939]
- Column: Client_ID
- Samples: [C00001925, C00003141, C00000297, C00004275, C00000900]
- Table: reviews
- Column: Date
- Samples: [2017-10-04, 2017-10-02, 2017-08-21, 2017-12-17, 2016-05-27]
- Column: Stars
- Samples: [5, 5, 5, 5, 5]
- Column: Reviews
- Samples: [Great job, Eagle National! Each person was professional and helped us ..., Matthew Richardson is professional and helpful. He helped us find the ..., We had a past experience with Eagle National Mortgage and would withou..., We have been dealing with Brad Thomka from the beginning of what start..., I can't express how grateful I am for the support that Zach provided t... (truncated)]
- Column: Product
- Samples: [Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage, Eagle National Mortgage]
- Column: district_id
- Samples: [65, 66, 23, 55, 24]
| SELECT COUNT(T3.sex) 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 T1.state = 'Massachusetts' AND T3.sex = 'Male' |