Files
vibrantlabsai--ragas/examples/ragas_examples/text2sql/datasets/booksql_sample.csv
T
2026-07-13 13:35:10 +08:00

21 KiB

1QuerySQLLevelssplit
2What is the balance due from Richard Aguirre?select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = "Richard Aguirre" ) mediumtrain
3What is the balance due from Sarah Oconnor?select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = "Sarah Oconnor" ) mediumtrain
4What is my average invoice from Jeffrey Moore?select avg(amount) from (select distinct transaction_id, amount from master_txn_table where customers = "Jeffrey Moore" and transaction_type = 'invoice')hardtrain
5How much open credit does customer Andrew Bennett?select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = "Andrew Bennett" ) easytrain
6What is my average invoice from Jeremy Strong?select avg(amount) from (select distinct transaction_id, amount from master_txn_table where customers = "Jeremy Strong" and transaction_type = 'invoice')hardtrain
7What is my average invoice from Lisa Mitchell?select avg(amount) from (select distinct transaction_id, amount from master_txn_table where customers = "Lisa Mitchell" and transaction_type = 'invoice')hardtrain
8Justin Estes has received how many invoices?select count(distinct transaction_id) from master_txn_table where customers = "Justin Estes" and transaction_type = 'invoice'mediumtrain
9Display the total number of transactions with Jonathan Bartonselect count(distinct transaction_id) from master_txn_table where customers = "Jonathan Barton"mediumtrain
10How much open credit does customer Tracy Bean?select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = "Tracy Bean" ) easytrain
11How much open credit does customer Wanda Welch?select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = "Wanda Welch" ) easytrain
12How much open credit does customer Kathleen George?select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = "Kathleen George" ) easytrain
13How much we received from Providing independent operation of railroad terminals?select sum(credit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Income', 'Other Income') and instr(account,"Providing independent operation of railroad terminals")hardtrain
14What was the most recent invoice for Leslie Beck?select transaction_id from master_txn_table where transaction_type = 'invoice' and customers = "Leslie Beck" order by transaction_date desc limit 1mediumtrain
15How much open credit does customer Sylvia Williams?select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = "Sylvia Williams" ) easytrain
16Display all transactions involving Crystal Toddselect distinct transaction_id from master_txn_table where customers = "Crystal Todd"mediumtrain
17How much open credit does customer Robert Bowers?select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = "Robert Bowers" ) easytrain
18How much open credit does customer Andrew Vaughan?select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = "Andrew Vaughan" ) easytrain
19How much open credit does customer Karen Bonilla?select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = "Karen Bonilla" ) easytrain
20How much has Colleen Ward been paying us every monthselect date(transaction_date, 'start of month'), sum(credit) from master_txn_table where customers = "Colleen Ward" group by date(transaction_date, 'start of month')hardtrain
21What are my total sales by Duplexes?select sum(credit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Income','Other Income') and product_service = "Duplexes"hardtrain
22What was the total amount earned in Intravenous Therapy This fiscal year to date?select sum(credit) from master_txn_table where transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date, '-3 months', 'start of year','+1 year', '+3 months', '-1 day') and product_service = 'Intravenous Therapy' and transaction_type in ('invoice', 'sales recept')mediumtrain
23What is my average invoice from Nicholas Kim?select avg(amount) from (select distinct transaction_id, amount from master_txn_table where customers = "Nicholas Kim" and transaction_type = 'invoice')hardtrain
24How much has Tracy Rojas been paying us every monthselect date(transaction_date, 'start of month'), sum(credit) from master_txn_table where customers = "Tracy Rojas" group by date(transaction_date, 'start of month')hardtrain
25How much open credit does customer Suzanne Hayes?select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = "Suzanne Hayes" ) easytrain
26What are the invoice dates for customers with the customer name Natasha Lin?SELECT transaction_date from (select distinct transaction_id, transaction_date from master_txn_table where customers="Natasha Lin" and transaction_type = 'invoice') mediumtrain
27When was the last time we billed for Loading and unloadingselect transaction_date from master_txn_table where product_service = "Loading and unloading" order by transaction_date desc limit 1; mediumtrain
28How much open credit does customer Robert Roberts?select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = "Robert Roberts" ) easytrain
29In the This fiscal year, what has been my total revenue from Catherine Lindsey?select sum(credit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Income','Other Income') and customers = "Catherine Lindsey" and transaction_date BETWEEN date(current_date, '-3 months', 'start of year', '+3 months') AND date(current_date) hardtrain
30How much open credit does customer Jacob Melendez?select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = "Jacob Melendez" ) easytrain
31Display all transactions involving Julie Randallselect distinct transaction_id from master_txn_table where customers = "Julie Randall"mediumtrain
32How much has Shannon Hernandez been paying us every monthselect date(transaction_date, 'start of month'), sum(credit) from master_txn_table where customers = "Shannon Hernandez" group by date(transaction_date, 'start of month')hardtrain
33How much open credit does customer Miguel Villarreal?select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = "Miguel Villarreal" ) easytrain
34How much open credit does customer Brian Wheeler?select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = "Brian Wheeler" ) easytrain
35How many credit card transactions occurred This year?select count(distinct transaction_id) from master_txn_table as T1 join payment_method as T2 on T1.payment_method = T2.payment_method where T2.credit_card = "yes" and T1.transaction_date BETWEEN date(current_date, 'start of year') AND date(current_date) hardtrain
36How much open credit does customer Tonya Lee?select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = "Tonya Lee" ) easytrain
37Show all transactions with Mr Andrea Smithselect distinct transaction_id from master_txn_table where customers = 'Andrea Smith' or vendor = 'Andrea Smith'mediumtrain
38How much has Samantha Aguilar been paying us every monthselect date(transaction_date, 'start of month'), sum(credit) from master_txn_table where customers = "Samantha Aguilar" group by date(transaction_date, 'start of month')hardtrain
39Show number of transactions with Carol Smithselect count(distinct transaction_id) from master_txn_table where customers = 'Carol Smith' or vendor = 'Carol Smith'mediumtrain
40How much open credit does customer Natalie Myers?select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = "Natalie Myers" ) easytrain
41How much we received from Fuel?select sum(credit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Income', 'Other Income') and instr(account,"Fuel")hardtrain
42As of This month to date, how many invoices for Brent Rodriguez were still outstanding?select count(distinct transaction_id) from master_txn_table where customers = "Brent Rodriguez" and transaction_type = 'invoice' and open_balance >0 and transaction_date BETWEEN date( current_date, "start of month") AND date( current_date) mediumtrain
43How much open credit does customer Melissa Weaver?select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = "Melissa Weaver" ) easytrain
44Show all transactions with Mr Corey Durhamselect distinct transaction_id from master_txn_table where customers = 'Corey Durham' or vendor = 'Corey Durham'mediumtrain
45How much open credit does customer Karen Brown?select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = "Karen Brown" ) easytrain
46How much open credit does customer Julie Flynn MD?select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = "Julie Flynn MD" ) easytrain
47What are my total sales by Oil and gas wells?select sum(credit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Income','Other Income') and product_service = "Oil and gas wells"hardtrain
48How much open credit does customer Robert Hammond?select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = "Robert Hammond" ) easytrain
49What is my last invoice from Vicki Page?select distinct transaction_id, amount, transaction_date from master_txn_table where customers = "Vicki Page" and transaction_type = 'invoice' order by transaction_date desc limit 1 mediumtrain
50How much open credit does customer Casey King?select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = "Casey King" ) easytrain
51How much open credit does customer Gail Hoover?select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = "Gail Hoover" ) easytrain
52How much open credit does customer Jeremy Benson?select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = "Jeremy Benson" ) easytrain
53How much open credit does customer Susan Williamson?select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = "Susan Williamson" ) easytrain
54What was the mean invoice amount for Barbara Scott?select avg(credit) from master_txn_table where transaction_type = 'invoice' and customers = "Barbara Scott" mediumtrain
55How much open credit does customer Jerry Nunez?select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = "Jerry Nunez" ) easytrain
56What is my average invoice from Robert Edwards?select avg(amount) from (select distinct transaction_id, amount from master_txn_table where customers = "Robert Edwards" and transaction_type = 'invoice')hardtrain
57How much open credit does customer Sabrina Newton?select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = "Sabrina Newton" ) easytrain
58What is my average invoice from Anna Martin?select avg(amount) from (select distinct transaction_id, amount from master_txn_table where customers = "Anna Martin" and transaction_type = 'invoice')hardtrain
59How many invoices have we sent to Nathaniel Montgomery?select count(distinct transaction_id) from master_txn_table where customers = "Nathaniel Montgomery" and transaction_type = 'invoice'mediumtrain
60What's the profit Last 12 months?select sum(credit - debit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Income','Other Income','Expense','Other Expense') and transaction_date BETWEEN date( current_date, "-12 months", "start of month") AND date( current_date, 'start of month', '-1 day') hardtrain
61Show all of Andrea Martinez's transactionsselect distinct transaction_id from master_txn_table where customers = "Andrea Martinez"mediumtrain
62How much has Monica Valentine been paying us every monthselect date(transaction_date, 'start of month'), sum(credit) from master_txn_table where customers = "Monica Valentine" group by date(transaction_date, 'start of month')hardtrain
63What is my total bill for Tammy Johnson?select sum(credit) from master_txn_table where transaction_type = 'bill' and vendor = "Tammy Johnson"mediumtrain
64How many invoices have we sent to Nathan Pineda?select count(distinct transaction_id) from master_txn_table where customers = "Nathan Pineda" and transaction_type = 'invoice'mediumtrain
65Show all transactions with Mr John Copelandselect distinct transaction_id from master_txn_table where customers = 'John Copeland' or vendor = 'John Copeland'mediumtrain
66How much we received from Manufacturing other Natural oils?select sum(credit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Income', 'Other Income') and instr(account,"Manufacturing other Natural oils")hardtrain
67Display the total number of transactions with Raymond Brownselect count(distinct transaction_id) from master_txn_table where customers = "Raymond Brown"mediumtrain
68How much we received from Other Services?select sum(credit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Income', 'Other Income') and instr(account,"Other Services")hardtrain
69What is my total bill for Sydney Gonzalez?select sum(credit) from master_txn_table where transaction_type = 'bill' and vendor = "Sydney Gonzalez"mediumtrain
70What is my average invoice from Jordan Schmidt?select avg(amount) from (select distinct transaction_id, amount from master_txn_table where customers = "Jordan Schmidt" and transaction_type = 'invoice')hardtrain
71How much we received from Acidizing and chemically treating wells?select sum(credit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Income', 'Other Income') and instr(account,"Acidizing and chemically treating wells")hardtrain
72As of in q3 last year, how many invoices for Crystal Anthony were still outstanding?select count(distinct transaction_id) from master_txn_table where customers = "Crystal Anthony" and transaction_type = 'invoice' and open_balance >0 and transaction_date BETWEEN date(current_date, '-1 year', 'start of year', '+6 month') AND date(current_date, '-1 year', 'start of year', '+9 month', '-1 day') mediumtrain
73What is my last invoice from Jody Sanchez?select distinct transaction_id, amount, transaction_date from master_txn_table where customers = "Jody Sanchez" and transaction_type = 'invoice' order by transaction_date desc limit 1 mediumtrain
74Number of invoices created for Loan Payable?select count(distinct transaction_id) from master_txn_table where transaction_type = 'invoice' and instr(account,"Loan Payable")mediumtrain
75What is my average invoice from Ashley Thompson?select avg(amount) from (select distinct transaction_id, amount from master_txn_table where customers = "Ashley Thompson" and transaction_type = 'invoice')hardtrain
76Show number of transactions with Terri Bowmanselect count(distinct transaction_id) from master_txn_table where customers = 'Terri Bowman' or vendor = 'Terri Bowman'mediumtrain
77How much we received from Wholesaling aircraft?select sum(credit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Income', 'Other Income') and instr(account,"Wholesaling aircraft")hardtrain
78How much open credit does customer Kiara Pearson?select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = "Kiara Pearson" ) easytrain
79What is my average invoice from Heather Haas?select avg(amount) from (select distinct transaction_id, amount from master_txn_table where customers = "Heather Haas" and transaction_type = 'invoice')hardtrain
80What was the most recent invoice for Roberta Shaw?select transaction_id from master_txn_table where transaction_type = 'invoice' and customers = "Roberta Shaw" order by transaction_date desc limit 1mediumtrain
81What are the invoice dates for customers with the customer name Bryan Garcia?SELECT transaction_date from (select distinct transaction_id, transaction_date from master_txn_table where customers="Bryan Garcia" and transaction_type = 'invoice') mediumtrain
82How much has Dawn Roman been paying us every monthselect date(transaction_date, 'start of month'), sum(credit) from master_txn_table where customers = "Dawn Roman" group by date(transaction_date, 'start of month')hardtrain
83Number of invoices created for Installation?select count(distinct transaction_id) from master_txn_table where transaction_type = 'invoice' and instr(account,"Installation")mediumtrain
84How much open credit does customer Eric Smith II?select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = "Eric Smith II" ) easytrain
85How much open credit does customer Andre Stevens?select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = "Andre Stevens" ) easytrain
86What was the min invoice value for Photocopying services?select min(credit) from master_txn_table where transaction_type = 'invoice' and instr(account,"Photocopying services")mediumtrain
87How much open credit does customer Helen Patrick?select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = "Helen Patrick" ) easytrain
88How much open credit does customer Jonathan Bradley?select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = "Jonathan Bradley" ) easytrain
89How much open credit does customer Anthony Olson?select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = "Anthony Olson" ) easytrain
90What is my average invoice from Kathleen Brown?select avg(amount) from (select distinct transaction_id, amount from master_txn_table where customers = "Kathleen Brown" and transaction_type = 'invoice')hardtrain
91What is my average invoice from Erik Mckenzie?select avg(amount) from (select distinct transaction_id, amount from master_txn_table where customers = "Erik Mckenzie" and transaction_type = 'invoice')hardtrain
92How much we received from Data entry services?select sum(credit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Income', 'Other Income') and instr(account,"Data entry services")hardtrain
93What is my average invoice from William Hendricks?select avg(amount) from (select distinct transaction_id, amount from master_txn_table where customers = "William Hendricks" and transaction_type = 'invoice')hardtrain
94What is my average invoice from Anthony Armstrong?select avg(amount) from (select distinct transaction_id, amount from master_txn_table where customers = "Anthony Armstrong" and transaction_type = 'invoice')hardtrain
95How much open credit does customer Harold Neal?select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = "Harold Neal" ) easytrain
96Display the total number of transactions with Margaret Alvarezselect count(distinct transaction_id) from master_txn_table where customers = "Margaret Alvarez"mediumtrain
97What are my total sales by Ships?select sum(credit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Income','Other Income') and product_service = "Ships"hardtrain
98How much open credit does customer Samuel Turner?select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = "Samuel Turner" ) easytrain
99What are my total sales by Miscellaneous?select sum(credit) from master_txn_table as T1 join chart_of_accounts as T2 on T1.account = T2.account_name where account_type in ('Income','Other Income') and product_service = "Miscellaneous"hardtrain
100How much money does Joshua Hensley still owe?select sum(open_balance) from ( select distinct transaction_id, open_balance from master_txn_table where customers = "Joshua Hensley")mediumtrain